mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-21 23:42:03 +00:00
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
This commit is contained in:
Vendored
+21
-32
@@ -1,15 +1,17 @@
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
System.register(['app/core/utils/kbn'], function (_export, _context) {
|
||||
System.register(["app/core/utils/kbn"], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var kbn, _createClass, StatusHeatmapOptionsEditorCtrl;
|
||||
var kbn, StatusHeatmapOptionsEditorCtrl;
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function statusHeatmapOptionsEditor() {
|
||||
'use strict';
|
||||
@@ -22,45 +24,34 @@ System.register(['app/core/utils/kbn'], function (_export, _context) {
|
||||
};
|
||||
}
|
||||
|
||||
_export('statusHeatmapOptionsEditor', statusHeatmapOptionsEditor);
|
||||
_export("statusHeatmapOptionsEditor", statusHeatmapOptionsEditor);
|
||||
|
||||
return {
|
||||
setters: [function (_appCoreUtilsKbn) {
|
||||
kbn = _appCoreUtilsKbn.default;
|
||||
}],
|
||||
execute: function () {
|
||||
_createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
|
||||
_export('StatusHeatmapOptionsEditorCtrl', StatusHeatmapOptionsEditorCtrl = function () {
|
||||
_export("StatusHeatmapOptionsEditorCtrl", StatusHeatmapOptionsEditorCtrl =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function StatusHeatmapOptionsEditorCtrl($scope) {
|
||||
_classCallCheck(this, StatusHeatmapOptionsEditorCtrl);
|
||||
|
||||
_defineProperty(this, "panel", void 0);
|
||||
|
||||
_defineProperty(this, "panelCtrl", void 0);
|
||||
|
||||
_defineProperty(this, "unitFormats", void 0);
|
||||
|
||||
$scope.editor = this;
|
||||
this.panelCtrl = $scope.ctrl;
|
||||
this.panel = this.panelCtrl.panel;
|
||||
this.unitFormats = kbn.getUnitFormats();
|
||||
|
||||
this.panelCtrl.render();
|
||||
}
|
||||
|
||||
_createClass(StatusHeatmapOptionsEditorCtrl, [{
|
||||
key: 'setUnitFormat',
|
||||
key: "setUnitFormat",
|
||||
value: function setUnitFormat(subItem) {
|
||||
this.panel.data.unitFormat = subItem.value;
|
||||
this.panelCtrl.render();
|
||||
@@ -69,8 +60,6 @@ System.register(['app/core/utils/kbn'], function (_export, _context) {
|
||||
|
||||
return StatusHeatmapOptionsEditorCtrl;
|
||||
}());
|
||||
|
||||
_export('StatusHeatmapOptionsEditorCtrl', StatusHeatmapOptionsEditorCtrl);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user