show trigger tags, #487

This commit is contained in:
Alexander Zobnin
2017-12-14 23:43:58 +03:00
parent e6794b1542
commit 3f140c892f
19 changed files with 79 additions and 6 deletions

View File

@@ -132,6 +132,7 @@ System.register(['lodash', 'jquery', 'moment', '../datasource-zabbix/utils', 'ap
// Fields
hostField: true,
hostTechNameField: false,
showTags: true,
statusField: true,
severityField: true,
descriptionField: true,
@@ -467,6 +468,11 @@ System.register(['lodash', 'jquery', 'moment', '../datasource-zabbix/utils', 'ap
triggerObj.hostTechName = trigger.hosts[0].host;
}
// Set tags if present
if (trigger.tags && trigger.tags.length === 0) {
trigger.tags = null;
}
// Handle multi-line description
if (trigger.comments) {
trigger.comments = trigger.comments.replace('\n', '<br>');
@@ -682,11 +688,15 @@ System.register(['lodash', 'jquery', 'moment', '../datasource-zabbix/utils', 'ap
triggerCardElem.find('.alert-list-icon').css({ 'font-size': fontSize + '%' });
triggerCardElem.find('.alert-list-title').css({ 'font-size': fontSize + '%' });
triggerCardElem.find('.alert-list-text').css({ 'font-size': fontSize * 0.8 + '%' });
triggerCardElem.find('.zbx-tag').css({ 'font-size': fontSize * 0.6 + '%' });
triggerCardElem.find('.zbx-tag').css({ 'line-height': fontSize / 100 * 16 + 'px' });
} else {
// remove css
triggerCardElem.find('.alert-list-icon').css({ 'font-size': '' });
triggerCardElem.find('.alert-list-title').css({ 'font-size': '' });
triggerCardElem.find('.alert-list-text').css({ 'font-size': '' });
triggerCardElem.find('.zbx-tag').css({ 'font-size': '' });
triggerCardElem.find('.zbx-tag').css({ 'line-height': '' });
}
}