handle multi-line triggers description, fix #485

This commit is contained in:
Alexander Zobnin
2017-12-14 15:48:32 +03:00
parent 34e829bc23
commit 02d8748d33
16 changed files with 98 additions and 20 deletions

View File

@@ -28,8 +28,14 @@
</span>
{{trigger.age && "for " + trigger.age}}
<span class="alert-list-info alert-list-info-left" ng-if="ctrl.panel.descriptionField">
{{trigger.comments}}
<span class="alert-list-info alert-list-info-left zbx-description"
ng-if="ctrl.panel.descriptionField && !ctrl.panel.descriptionAtNewLine"
ng-bind-html="trigger.comments">
</span>
</p>
<p class="alert-list-text"
ng-if="trigger.comments && ctrl.panel.descriptionField && ctrl.panel.descriptionAtNewLine">
<span class="alert-list-info zbx-description" ng-bind-html="trigger.comments">
</span>
</p>
</div>
@@ -43,7 +49,7 @@
<span class="alert-list-text">{{trigger.lastchange || "last change unknown"}}</span>
</div>
<div class="trigger-info-block">
<div class="trigger-info-block zbx-status-icons">
<a ng-if="trigger.url" href="{{trigger.url}}" target="_blank">
<i class="fa fa-external-link"></i>
</a>

View File

@@ -31,6 +31,12 @@
checked="ctrl.panel.descriptionField"
on-change="ctrl.render()">
</gf-form-switch>
<gf-form-switch class="gf-form" ng-if="ctrl.panel.descriptionField"
label-class="width-9"
label="At the new line"
checked="ctrl.panel.descriptionAtNewLine"
on-change="ctrl.render()">
</gf-form-switch>
</div>
<div class="section gf-form-group">