Browse Source

Make 'General approach' be shown like 'General' #19

master
rozetko 6 years ago
parent
commit
99de00ec33
  1. 2
      src/model/anomaly.ts
  2. 1
      src/module.ts
  3. 2
      src/partials/tab_analytics.html

2
src/model/anomaly.ts

@ -48,7 +48,7 @@ export class AnomalyType {
get name(): string { return this._panelObject.name; } get name(): string { return this._panelObject.name; }
set pattern(value: string) { this._panelObject.pattern = value; } set pattern(value: string) { this._panelObject.pattern = value; }
get pattern(): string { return this._panelObject.pattern; } get pattern(): string { return this._panelObject.pattern.split(' ')[0]; }
set confidence(value: number) { this._panelObject.confidence = value; } set confidence(value: number) { this._panelObject.confidence = value; }
get confidence(): number { return this._panelObject.confidence; } get confidence(): number { return this._panelObject.confidence; }

1
src/module.ts

@ -43,7 +43,6 @@ class GraphCtrl extends MetricsPanelCtrl {
datasourceRequest: DatasourceRequest; datasourceRequest: DatasourceRequest;
patterns: Array<String> = ['General', 'Drops', 'Peaks', 'Jumps']; patterns: Array<String> = ['General', 'Drops', 'Peaks', 'Jumps'];
patternsLegacy: Array<String> = ['General', 'General approach', 'Drops', 'Peaks', 'Jumps'];
anomalyTypes = []; // TODO: remove it later. Only for alert tab anomalyTypes = []; // TODO: remove it later. Only for alert tab
anomalyController: AnomalyController; anomalyController: AnomalyController;

2
src/partials/tab_analytics.html

@ -13,7 +13,7 @@
<div class="gf-form-select-wrapper"> <div class="gf-form-select-wrapper">
<select class="gf-form-input width-12" <select class="gf-form-input width-12"
ng-model="anomalyType.pattern" ng-model="anomalyType.pattern"
ng-options="pattern as pattern for pattern in ctrl.patternsLegacy" ng-options="pattern as pattern for pattern in ctrl.patterns"
ng-disabled="true" ng-disabled="true"
/> />
</div> </div>

Loading…
Cancel
Save