triggers: option for displaying proxy, #418

This commit is contained in:
Alexander Zobnin
2018-11-07 11:11:57 +03:00
parent b45eb5ac6f
commit adc00541e1
2 changed files with 8 additions and 1 deletions

View File

@@ -19,6 +19,12 @@
checked="ctrl.panel.hostGroups" checked="ctrl.panel.hostGroups"
on-change="ctrl.render()"> on-change="ctrl.render()">
</gf-form-switch> </gf-form-switch>
<gf-form-switch class="gf-form"
label-class="width-9"
label="Host proxy"
checked="ctrl.panel.hostProxy"
on-change="ctrl.render()">
</gf-form-switch>
<gf-form-switch class="gf-form" <gf-form-switch class="gf-form"
label-class="width-9" label-class="width-9"
label="Tags" label="Tags"

View File

@@ -36,6 +36,7 @@ export const PANEL_DEFAULTS = {
hostField: true, hostField: true,
hostTechNameField: false, hostTechNameField: false,
hostGroups: false, hostGroups: false,
hostProxy: false,
showTags: true, showTags: true,
statusField: true, statusField: true,
severityField: true, severityField: true,
@@ -514,7 +515,7 @@ export class TriggerPanelCtrl extends PanelCtrl {
} else if (this.panel.hostField || this.panel.hostTechNameField) { } else if (this.panel.hostField || this.panel.hostTechNameField) {
host = this.panel.hostField ? trigger.host : trigger.hostTechName; host = this.panel.hostField ? trigger.host : trigger.hostTechName;
} }
if (trigger.proxy) { if (this.panel.hostProxy && trigger.proxy) {
host = `${trigger.proxy}: ${host}`; host = `${trigger.proxy}: ${host}`;
} }