fix: Grafana 7.1.0 compatibility

- remove unused injections from module's constructor
- fix trash icon multiplication in options_editor
This commit is contained in:
Ivan Mikheykin
2020-07-21 17:39:49 +03:00
parent b96d205787
commit a4d48eb591
5 changed files with 6 additions and 14 deletions
+2 -4
View File
@@ -163,21 +163,20 @@ System.register(["lodash", "./color_legend", "./options_editor", "./tooltip_edit
_export("PanelCtrl", _export("StatusHeatmapCtrl", StatusHeatmapCtrl =
/*#__PURE__*/
function (_MetricsPanelCtrl) {
StatusHeatmapCtrl.$inject = ["$scope", "$injector", "timeSrv", "annotationsSrv", "$window", "datasourceSrv", "variableSrv", "templateSrv"];
StatusHeatmapCtrl.$inject = ["$scope", "$injector", "annotationsSrv"];
_inherits(StatusHeatmapCtrl, _MetricsPanelCtrl);
// TODO remove this transient variable: use ng-model-options="{ getterSetter: true }"
/** @ngInject */
function StatusHeatmapCtrl($scope, $injector, timeSrv, annotationsSrv, $window, datasourceSrv, variableSrv, templateSrv) {
function StatusHeatmapCtrl($scope, $injector, annotationsSrv) {
var _this;
_classCallCheck(this, StatusHeatmapCtrl);
_this = _possibleConstructorReturn(this, _getPrototypeOf(StatusHeatmapCtrl).call(this, $scope, $injector));
_this.annotationsSrv = annotationsSrv;
_this.variableSrv = variableSrv;
_defineProperty(_assertThisInitialized(_this), "data", void 0);
@@ -312,7 +311,6 @@ System.register(["lodash", "./color_legend", "./options_editor", "./tooltip_edit
};
_this.annotations = [];
_this.annotationsSrv = annotationsSrv;
_this.timeSrv = timeSrv;
_this.events.on(PanelEvents.render, _this.onRender.bind(_assertThisInitialized(_this)));
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -3
View File
@@ -81,9 +81,7 @@
</div>
<div class="gf-form">
<label class="gf-form-label">
<a class="pointer" tabindex="1" ng-click="editor.onRemoveThreshold($index)">
<i class="fa fa-trash"/>
</a>
<i class="fa fa-trash pointer" ng-click="editor.onRemoveThreshold($index)"></i>
</label>
</div>
</div>
+1 -3
View File
@@ -144,7 +144,7 @@ class StatusHeatmapCtrl extends MetricsPanelCtrl {
};
/** @ngInject */
constructor($scope: any, $injector: auto.IInjectorService, timeSrv, private annotationsSrv: AnnotationsSrv, $window, datasourceSrv, public variableSrv: any, templateSrv) {
constructor($scope: any, $injector: auto.IInjectorService, private annotationsSrv: AnnotationsSrv) {
super($scope, $injector);
if(!Polygrafill.hasAppEventCompatibleEmitter(this.events)){
@@ -197,8 +197,6 @@ class StatusHeatmapCtrl extends MetricsPanelCtrl {
this.annotations = [];
this.annotationsSrv = annotationsSrv;
this.timeSrv = timeSrv;
this.events.on(PanelEvents.render, this.onRender.bind(this));
this.events.on(PanelEvents.dataReceived, this.onDataReceived.bind(this));
this.events.on(PanelEvents.dataError, this.onDataError.bind(this));
+1 -3
View File
@@ -81,9 +81,7 @@
</div>
<div class="gf-form">
<label class="gf-form-label">
<a class="pointer" tabindex="1" ng-click="editor.onRemoveThreshold($index)">
<i class="fa fa-trash"/>
</a>
<i class="fa fa-trash pointer" ng-click="editor.onRemoveThreshold($index)"></i>
</label>
</div>
</div>