Browse Source

161-disable-unimplemented-patterns

master
rozetko 7 years ago
parent
commit
a9b2f04dcb
  1. 2
      src/model/anomaly.ts
  2. 2
      src/module.ts
  3. 5
      src/partials/tab_analytics.html

2
src/model/anomaly.ts

@ -35,7 +35,7 @@ export class AnomalyType {
this._panelObject = {}; this._panelObject = {};
} }
_.defaults(this._panelObject, { _.defaults(this._panelObject, {
name: 'anomaly_name', confidence: 0.2, color: 'red', pattern: 'Peaks' name: 'anomaly_name', confidence: 0.2, color: 'red', pattern: 'General approach'
}); });
//this._metric = new Metric(_panelObject.metric); //this._metric = new Metric(_panelObject.metric);

2
src/module.ts

@ -43,7 +43,7 @@ class GraphCtrl extends MetricsPanelCtrl {
datasourceRequest: DatasourceRequest; datasourceRequest: DatasourceRequest;
analyticsTypes: Array<String> = ['Anomaly detection', 'Pattern Detection (not implemented yet)']; analyticsTypes: Array<String> = ['Anomaly detection', 'Pattern Detection (not implemented yet)'];
patterns: Array<String> = ['Peaks', 'Jumps', 'Drops', 'General approach']; patterns: Array<String> = ['General approach', 'Peaks', 'Jumps', 'Drops'];
anomalyTypes = []; // TODO: remove it later. Only for alert tab anomalyTypes = []; // TODO: remove it later. Only for alert tab
anomalyController: AnomalyController; anomalyController: AnomalyController;

5
src/partials/tab_analytics.html

@ -132,7 +132,10 @@
<label class="gf-form-label width-8"> Pattern type </label> <label class="gf-form-label width-8"> Pattern type </label>
<div class="gf-form-select-wrapper"> <div class="gf-form-select-wrapper">
<select class="gf-form-input width-12" ng-model="ctrl.anomalyController.newAnomalyType.pattern" ng-options="pattern as pattern for pattern in ctrl.patterns"/> <select class="gf-form-input width-12"
ng-model="ctrl.anomalyController.newAnomalyType.pattern"
ng-options="pattern as pattern disable when pattern !== 'General approach' for pattern in ctrl.patterns"
/>
</div> </div>
<label class="gf-form-label"> <label class="gf-form-label">

Loading…
Cancel
Save