Fix building after update to Grafana 8 components

This commit is contained in:
Alexander Zobnin
2021-08-02 18:35:34 +03:00
parent 3688174923
commit 12c4089a50
14 changed files with 82 additions and 122 deletions

View File

@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { css, cx } from 'emotion';
import { css, cx } from '@emotion/css';
import { EventsWithValidation, ValidationEvents, useTheme } from '@grafana/ui';
import { GrafanaTheme } from '@grafana/data';
import { isRegex, variableRegex } from '../utils';

View File

@@ -457,10 +457,12 @@ export function getValueMapping(item, valueMappings: any[]): ValueMapping[] | nu
return (mapping.mappings as any[]).map((m, i) => {
const valueMapping: ValueMapping = {
id: i,
// id: i,
type: MappingType.ValueToText,
value: m.value,
text: m.newvalue,
options: {
value: m.value,
text: m.newvalue,
}
};
return valueMapping;
});