Skip to content

Commit

Permalink
Fix: Problems panel failing for versions before 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanbedi committed Jun 13, 2024
1 parent aecdb4b commit 9d80323
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ export class ZabbixAPIConnector {
};

// Before version 7.0.0 proxy_hostid was used, after - proxyid
if (semver.lte(this.version, '7.0.0')) {
if (semver.lt(this.version, '7.0.0')) {
params.selectHosts.push('proxy_hostid');
} else {
params.selectHosts.push('proxyid');
Expand Down Expand Up @@ -582,7 +582,7 @@ export class ZabbixAPIConnector {
};

// Before version 7.0.0 proxy_hostid was used, after - proxyid
if (semver.lte(this.version, '7.0.0')) {
if (semver.lt(this.version, '7.0.0')) {
params.selectHosts.push('proxy_hostid');
} else {
params.selectHosts.push('proxyid');
Expand Down Expand Up @@ -877,10 +877,10 @@ export class ZabbixAPIConnector {
const params = {
output: ['proxyid'],
};
if (semver.lte(this.version, '7.0.0')) {
params.output.push('name');
} else {
if (semver.lt(this.version, '7.0.0')) {
params.output.push('host');
} else {
params.output.push('name');
}

return this.request('proxy.get', params);
Expand Down

0 comments on commit 9d80323

Please sign in to comment.