mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989)
* Eslint: no-duplicate-imports rule (bump grafana-eslint-config) * Chore: Fix duplicate imports (#31041) * Rebased this branch into eslint-no-duplicate-imports * updated some changes * merged uncaught duplicate imports * fixes frontend test- I hope * fixes e2e test- I hope Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
LokiMatrixResult,
|
||||
} from './types';
|
||||
import * as ResultTransformer from './result_transformer';
|
||||
import { enhanceDataFrame, lokiPointsToTimeseriesPoints } from './result_transformer';
|
||||
import { setTemplateSrv } from '@grafana/runtime';
|
||||
import { TemplateSrv } from 'app/features/templating/template_srv';
|
||||
|
||||
@@ -243,7 +242,7 @@ describe('loki result transformer', () => {
|
||||
describe('enhanceDataFrame', () => {
|
||||
it('adds links to fields', () => {
|
||||
const df = new MutableDataFrame({ fields: [{ name: 'line', values: ['nothing', 'trace1=1234', 'trace2=foo'] }] });
|
||||
enhanceDataFrame(df, {
|
||||
ResultTransformer.enhanceDataFrame(df, {
|
||||
derivedFields: [
|
||||
{
|
||||
matcherRegex: 'trace1=(\\w+)',
|
||||
@@ -302,7 +301,7 @@ describe('enhanceDataFrame', () => {
|
||||
|
||||
it('returns data as is if step, start, and end align', () => {
|
||||
const options: Partial<TransformerOptions> = { start: 1 * 1e9, end: 4 * 1e9, step: 1 };
|
||||
const result = lokiPointsToTimeseriesPoints(data, options as TransformerOptions);
|
||||
const result = ResultTransformer.lokiPointsToTimeseriesPoints(data, options as TransformerOptions);
|
||||
expect(result).toEqual([
|
||||
[1, 1000],
|
||||
[0, 2000],
|
||||
|
||||
Reference in New Issue
Block a user