mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 10:00:17 -04:00
26 lines
678 B
JavaScript
26 lines
678 B
JavaScript
import template from './embed-code-dialog.html';
|
|
|
|
const EmbedCodeDialog = {
|
|
controller(clientConfig) {
|
|
'ngInject';
|
|
|
|
this.query = this.resolve.query;
|
|
this.visualization = this.resolve.visualization;
|
|
|
|
this.embedUrl = `${clientConfig.basePath}embed/query/${this.query.id}/visualization/${this.visualization.id}?api_key=${this.query.api_key}`;
|
|
if (window.snapshotUrlBuilder) {
|
|
this.snapshotUrl = window.snapshotUrlBuilder(this.query, this.visualization);
|
|
}
|
|
},
|
|
bindings: {
|
|
resolve: '<',
|
|
close: '&',
|
|
dismiss: '&',
|
|
},
|
|
template,
|
|
};
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.component('embedCodeDialog', EmbedCodeDialog);
|
|
}
|