Fix variable query editor, #1590
This commit is contained in:
@@ -87,10 +87,10 @@ export class ZabbixVariableQueryEditor extends PureComponent<VariableQueryProps,
|
||||
this.props.onChange(queryModel, `Zabbix - ${queryType}`);
|
||||
};
|
||||
|
||||
async render() {
|
||||
render() {
|
||||
const { selectedQueryType, legacyQuery, group, host, application, itemTag, item } = this.state;
|
||||
const { datasource } = this.props;
|
||||
const supportsItemTags = (await datasource?.zabbix?.isZabbix54OrHigher()) || false;
|
||||
const supportsItemTags = datasource?.zabbix?.isZabbix54OrHigherSync() || false;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -261,6 +261,10 @@ export class Zabbix implements ZabbixConnector {
|
||||
return version ? semver.gte(version, '5.4.0') : false;
|
||||
}
|
||||
|
||||
isZabbix54OrHigherSync() {
|
||||
return this.version ? semver.gte(this.version, '5.4.0') : false;
|
||||
}
|
||||
|
||||
getItemsFromTarget(target, options) {
|
||||
const parts = ['group', 'host', 'application', 'itemTag', 'item'];
|
||||
const filters = _.map(parts, (p) => target[p].filter);
|
||||
|
||||
Reference in New Issue
Block a user