feat(alerting): set default title for alerts
This commit is contained in:
@@ -21,7 +21,8 @@ export class AlertTabCtrl {
|
|||||||
this.panel.alerting.queryRange = this.panel.alerting.queryRange || '10m';
|
this.panel.alerting.queryRange = this.panel.alerting.queryRange || '10m';
|
||||||
this.panel.alerting.warnOperator = this.panel.alerting.warnOperator || '>';
|
this.panel.alerting.warnOperator = this.panel.alerting.warnOperator || '>';
|
||||||
this.panel.alerting.critOperator = this.panel.alerting.critOperator || '>';
|
this.panel.alerting.critOperator = this.panel.alerting.critOperator || '>';
|
||||||
this.panel.alerting.title = this.panel.alerting.title || this.panel.title + ' alert';
|
var defaultTitle = (this.panelCtrl.dashboard.title + ' ' + this.panel.title + ' alert');
|
||||||
|
this.panel.alerting.title = this.panel.alerting.title || defaultTitle;
|
||||||
|
|
||||||
this.panel.targets.map(target => {
|
this.panel.targets.map(target => {
|
||||||
this.metricTargets.push(target);
|
this.metricTargets.push(target);
|
||||||
|
|||||||
@@ -60,14 +60,14 @@
|
|||||||
<h5 class="section-heading">Alert info</h5>
|
<h5 class="section-heading">Alert info</h5>
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<span class="gf-form-label width-10">Alert name</span>
|
<span class="gf-form-label width-10">Alert name</span>
|
||||||
<input type="text" class="gf-form-input width-18" ng-model="ctrl.panel.alerting.title">
|
<input type="text" class="gf-form-input width-22" ng-model="ctrl.panel.alerting.title">
|
||||||
</div>
|
</div>
|
||||||
<div class="gf-form-inline">
|
<div class="gf-form-inline">
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<span class="gf-form-label width-10" style="margin-top: -73px;">Alert description</span>
|
<span class="gf-form-label width-10" style="margin-top: -73px;">Alert description</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<textarea rows="5" ng-model="ctrl.panel.alerting.description" class="gf-form-input width-18"></textarea>
|
<textarea rows="5" ng-model="ctrl.panel.alerting.description" class="gf-form-input width-22"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user