* problems: update panel schema

* update packages (build with node 12)

* problems: use datasource from target

* problems: fix query editor after schema update

* problems: fix list layout

* update circleci node image to 12

* fix tests
This commit is contained in:
Alexander Zobnin
2019-12-25 14:24:15 +03:00
committed by GitHub
parent c1db914376
commit ff4ad1997f
11 changed files with 189 additions and 119 deletions

View File

@@ -1,4 +1,6 @@
import _ from 'lodash';
import moment from 'moment';
import { DataQuery } from '@grafana/ui/';
import * as utils from '../datasource-zabbix/utils';
import { ZBXTrigger } from './types';
@@ -20,3 +22,13 @@ export function formatLastChange(lastchangeUnix: number, customFormat?: string)
const lastchange = timestamp.format(format);
return lastchange;
}
export const getNextRefIdChar = (queries: DataQuery[]): string => {
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
return _.find(letters, refId => {
return _.every(queries, other => {
return other.refId !== refId;
});
});
};