|
|
@ -302,9 +302,10 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
this.subTabIndex = 0; |
|
|
|
this.subTabIndex = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onInitPanelActions(actions) { |
|
|
|
onInitPanelActions(actions: { text: string, click: string }[]): void { |
|
|
|
actions.push({ text: 'Export CSV', click: 'ctrl.exportCsv()' }); |
|
|
|
actions.push({ text: 'Export CSV', click: 'ctrl.exportCsv()' }); |
|
|
|
actions.push({ text: 'Toggle legend', click: 'ctrl.toggleLegend()' }); |
|
|
|
actions.push({ text: 'Toggle legend', click: 'ctrl.toggleLegend()' }); |
|
|
|
|
|
|
|
actions.push({ text: 'Export analytic units', click: 'ctrl.exportAnalyticUnits()' }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async onHasticDatasourceChange() { |
|
|
|
async onHasticDatasourceChange() { |
|
|
@ -552,6 +553,14 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async exportAnalyticUnits(): Promise<void> { |
|
|
|
|
|
|
|
const json = await this.analyticsController.exportAnalyticUnits(); |
|
|
|
|
|
|
|
this.publishAppEvent('show-modal', { |
|
|
|
|
|
|
|
src: 'public/app/partials/edit_json.html', |
|
|
|
|
|
|
|
model: { object: json, enableCopy: true } |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// getAnnotationsByTag(tag) {
|
|
|
|
// getAnnotationsByTag(tag) {
|
|
|
|
// var res = [];
|
|
|
|
// var res = [];
|
|
|
|
// for (var annotation of this.annotations) {
|
|
|
|
// for (var annotation of this.annotations) {
|
|
|
|