mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
13 lines
312 B
TypeScript
13 lines
312 B
TypeScript
import _ from 'lodash';
|
|
import { DataQuery } from '@grafana/ui/';
|
|
|
|
export const getNextRefIdChar = (queries: DataQuery[]): string => {
|
|
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
|
|
return _.find(letters, refId => {
|
|
return _.every(queries, other => {
|
|
return other.refId !== refId;
|
|
});
|
|
});
|
|
};
|