mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Removed Test Rule button from Angular and view
This commit is contained in:
parent
e2fe663dba
commit
8b8af6436c
@ -9,8 +9,6 @@ import appEvents from 'app/core/app_events';
|
|||||||
export class AlertTabCtrl {
|
export class AlertTabCtrl {
|
||||||
panel: any;
|
panel: any;
|
||||||
panelCtrl: any;
|
panelCtrl: any;
|
||||||
testing: boolean;
|
|
||||||
testResult: any;
|
|
||||||
subTabIndex: number;
|
subTabIndex: number;
|
||||||
conditionTypes: any;
|
conditionTypes: any;
|
||||||
alert: any;
|
alert: any;
|
||||||
@ -406,21 +404,6 @@ export class AlertTabCtrl {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
test() {
|
|
||||||
this.testing = true;
|
|
||||||
this.testResult = false;
|
|
||||||
|
|
||||||
const payload = {
|
|
||||||
dashboard: this.dashboardSrv.getCurrent().getSaveModelClone(),
|
|
||||||
panelId: this.panelCtrl.panel.id,
|
|
||||||
};
|
|
||||||
|
|
||||||
return this.backendSrv.post('/api/alerts/test', payload).then(res => {
|
|
||||||
this.testResult = res;
|
|
||||||
this.testing = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
|
@ -121,20 +121,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gf-form-button-row">
|
|
||||||
<button class="btn btn-inverse" ng-click="ctrl.test()">
|
|
||||||
Test Rule
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="gf-form-group" ng-if="ctrl.testing">
|
|
||||||
Evaluating rule <i class="fa fa-spinner fa-spin"></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="gf-form-group" ng-if="ctrl.testResult">
|
|
||||||
<json-tree root-name="result" object="ctrl.testResult" start-expanded="true"></json-tree>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user