feat(alerting): set default title for alerts

This commit is contained in:
bergquist
2016-05-04 08:22:44 +02:00
parent 2ccb3956a6
commit 7757d6d636
2 changed files with 4 additions and 3 deletions
@@ -21,7 +21,8 @@ export class AlertTabCtrl {
this.panel.alerting.queryRange = this.panel.alerting.queryRange || '10m';
this.panel.alerting.warnOperator = this.panel.alerting.warnOperator || '>';
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.metricTargets.push(target);
@@ -60,14 +60,14 @@
<h5 class="section-heading">Alert info</h5>
<div class="gf-form">
<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 class="gf-form-inline">
<div class="gf-form">
<span class="gf-form-label width-10" style="margin-top: -73px;">Alert description</span>
</div>
<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>