Files
grafana-statusmap/src/options_editor.ts
T
Ivan Mikheykin b06c5dffc0 feat: migrate to typescript, support 6.3.0+
- use babel to 7, update dependencies, fix #72
- proper babel build to support ngInject, fix #78
- proper buckets display in 6.3.0+, fix #76
- rename js to ts, build d3 lib as js, build src as ts
2019-12-03 13:38:01 +03:00

32 lines
703 B
TypeScript

import kbn from 'app/core/utils/kbn';
export class StatusHeatmapOptionsEditorCtrl {
panel: any;
panelCtrl: any;
unitFormats: any;
constructor($scope) {
$scope.editor = this;
this.panelCtrl = $scope.ctrl;
this.panel = this.panelCtrl.panel;
this.unitFormats = kbn.getUnitFormats();
this.panelCtrl.render();
}
setUnitFormat(subItem) {
this.panel.data.unitFormat = subItem.value;
this.panelCtrl.render();
}
}
export function statusHeatmapOptionsEditor() {
'use strict';
return {
restrict: 'E',
scope: true,
templateUrl: 'public/plugins/flant-statusmap-panel/partials/options_editor.html',
controller: StatusHeatmapOptionsEditorCtrl,
};
}