mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
Frontend/utils: Import has only from lodash (#17311)
This commit is contained in:
parent
83af1bdff3
commit
4b0ad174ff
@ -1,4 +1,4 @@
|
|||||||
import _ from 'lodash';
|
import { has } from 'lodash';
|
||||||
import { getValueFormat, getValueFormatterIndex, getValueFormats, stringToJsRegex } from '@grafana/ui';
|
import { getValueFormat, getValueFormatterIndex, getValueFormats, stringToJsRegex } from '@grafana/ui';
|
||||||
import deprecationWarning from '@grafana/ui/src/utils/deprecationWarning';
|
import deprecationWarning from '@grafana/ui/src/utils/deprecationWarning';
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ kbn.calculateInterval = (range, resolution, lowLimitInterval) => {
|
|||||||
|
|
||||||
kbn.describe_interval = str => {
|
kbn.describe_interval = str => {
|
||||||
const matches = str.match(kbn.interval_regex);
|
const matches = str.match(kbn.interval_regex);
|
||||||
if (!matches || !_.has(kbn.intervals_in_seconds, matches[2])) {
|
if (!matches || !has(kbn.intervals_in_seconds, matches[2])) {
|
||||||
throw new Error('Invalid interval string, expecting a number followed by one of "Mwdhmsy"');
|
throw new Error('Invalid interval string, expecting a number followed by one of "Mwdhmsy"');
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user