From 9186960dd47ae229cc026dbaf4b94f604f1e5a8a Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 6 May 2022 23:26:03 +0400 Subject: [PATCH] lint fixes --- src/components/Panel.tsx | 3 +-- src/components/editors/IconsEditor.tsx | 6 +++--- src/components/editors/ThresholdsEditor.tsx | 4 ++-- src/models/options.ts | 2 +- src/models/series.ts | 2 +- src/utils.ts | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/Panel.tsx b/src/components/Panel.tsx index 6224c5f..3cba27f 100644 --- a/src/components/Panel.tsx +++ b/src/components/Panel.tsx @@ -7,8 +7,7 @@ import { DataProcessor } from '../grafana/data_processor'; import { ChartwerkGaugePod } from '@chartwerk/gauge-pod'; -import { PanelProps } from '@grafana/data'; -import { PanelData, TimeRange } from '@grafana/data'; +import { PanelData, TimeRange, PanelProps } from '@grafana/data'; import React, { useRef } from 'react'; import { css } from 'emotion'; diff --git a/src/components/editors/IconsEditor.tsx b/src/components/editors/IconsEditor.tsx index 740e942..ac6b6ee 100644 --- a/src/components/editors/IconsEditor.tsx +++ b/src/components/editors/IconsEditor.tsx @@ -86,7 +86,7 @@ const fieldNamePickerSettings = { settings: { width: 24 }, } as any; -export function IconsEditor({ onChange, value, context }: StandardEditorProps>) { +export function IconsEditor({ onChange, value, context }: StandardEditorProps) { const icons = value; const addIcon = () => { @@ -137,7 +137,7 @@ export function IconsEditor({ onChange, value, context }: StandardEditorProps {icons.map((icon, iconIdx) => { return ( -
+
removeIcon(iconIdx)}> { return ( - + ; + thresholds: ThresholdConfig[]; } type ThresholdConfig = { @@ -99,7 +99,7 @@ export function ThresholdsEditor({ onChange, value, context }: StandardEditorPro /> {config.thresholds.map((threshold, thresholdIdx) => { return ( - + ); // [0] because it is Grafan series. So 0 idx for values, 1 idx for timestamps // @ts-ignore return !_.isEmpty(lastRow) ? lastRow[0] : null;