mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-21 23:42:03 +00:00
- 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
32 lines
703 B
TypeScript
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,
|
|
};
|
|
}
|