|
|
@@ -103,6 +103,7 @@ class GraphCtrl extends MetricsPanelCtrl {
|
|
|
aliasColors: {},
|
|
|
// other style overrides
|
|
|
seriesOverrides: [],
|
|
|
+ alerting: {},
|
|
|
};
|
|
|
|
|
|
/** @ngInject */
|
|
|
@@ -310,6 +311,16 @@ class GraphCtrl extends MetricsPanelCtrl {
|
|
|
this.refresh();
|
|
|
}
|
|
|
|
|
|
+ convertThresholdsToAlerts() {
|
|
|
+ if (this.panel.grid && this.panel.grid.thresholds1) {
|
|
|
+ this.panel.alerting.warn_level = '< ' + this.panel.grid.threshold1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.panel.grid && this.panel.grid.thresholds2) {
|
|
|
+ this.panel.alerting.crit_level = '< ' + this.panel.grid.threshold2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
legendValuesOptionChanged() {
|
|
|
var legend = this.panel.legend;
|
|
|
legend.values = legend.min || legend.max || legend.avg || legend.current || legend.total;
|