host id as alias function (#1913)

This commit is contained in:
Sriram
2024-11-27 10:32:48 +00:00
committed by GitHub
parent a6690d2985
commit e3c3c11e41
3 changed files with 5 additions and 2 deletions

View File

@@ -59,6 +59,7 @@ function convertHistory(history, items, addHostName, convertPointCallback) {
const host = _.find(hosts, { hostid: item.hostid });
scopedVars['__zbx_host'] = { value: host.host };
scopedVars['__zbx_host_name'] = { value: host.name };
scopedVars['__zbx_host_id'] = { value: host.id };
// Only add host when multiple hosts selected
if (_.keys(hosts).length > 1 && addHostName) {