rename to char

This commit is contained in:
Peter Holmberg
2019-03-18 11:17:58 +01:00
parent 515fb5903e
commit 39728c885b
3 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ import {
ResultGetter,
} from 'app/types/explore';
import { LogsDedupStrategy } from 'app/core/logs_model';
import { getNextRefIdLetter } from './query';
import { getNextRefIdChar } from './query';
export const DEFAULT_RANGE = {
from: 'now-6h',
@@ -227,7 +227,7 @@ export function generateKey(index = 0): string {
}
export function generateEmptyQuery(queries: DataQuery[], index = 0): DataQuery {
return { refId: getNextRefIdLetter(queries), key: generateKey(index) };
return { refId: getNextRefIdChar(queries), key: generateKey(index) };
}
/**

View File

@@ -1,7 +1,7 @@
import _ from 'lodash';
import { DataQuery } from '@grafana/ui/';
export const getNextRefIdLetter = (queries: DataQuery[]): string => {
export const getNextRefIdChar = (queries: DataQuery[]): string => {
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
return _.find(letters, refId => {