|
@@ -1,6 +1,6 @@
|
|
|
import _ from 'lodash';
|
|
import _ from 'lodash';
|
|
|
-import kbn from 'app/core/utils/kbn';
|
|
|
|
|
import { Variable, containsVariable, assignModelProperties, variableTypes } from './variable';
|
|
import { Variable, containsVariable, assignModelProperties, variableTypes } from './variable';
|
|
|
|
|
+import { stringToJsRegex } from '@grafana/ui';
|
|
|
|
|
|
|
|
function getNoneOption() {
|
|
function getNoneOption() {
|
|
|
return { text: 'None', value: '', isNone: true };
|
|
return { text: 'None', value: '', isNone: true };
|
|
@@ -148,7 +148,7 @@ export class QueryVariable implements Variable {
|
|
|
options = [];
|
|
options = [];
|
|
|
|
|
|
|
|
if (this.regex) {
|
|
if (this.regex) {
|
|
|
- regex = kbn.stringToJsRegex(this.templateSrv.replace(this.regex, {}, 'regex'));
|
|
|
|
|
|
|
+ regex = stringToJsRegex(this.templateSrv.replace(this.regex, {}, 'regex'));
|
|
|
}
|
|
}
|
|
|
for (i = 0; i < metricNames.length; i++) {
|
|
for (i = 0; i < metricNames.length; i++) {
|
|
|
const item = metricNames[i];
|
|
const item = metricNames[i];
|