From 731e22cb28a93e61cd7046daf61737442b64b639 Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 20 Jan 2023 18:21:21 +0300 Subject: [PATCH] lint:fix --- .../components/Panel.tsx | 19 +++++++++--------- .../corpglory-dataexporter-panel/types.ts | 20 +++++++++---------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index d1896d1..f305e97 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -1,4 +1,12 @@ -import { PanelOptions, ExportTask, DashboardQuery, DatasourceType, ExportStatus, PanelStatus, Dashboard } from '../types'; +import { + PanelOptions, + ExportTask, + DashboardQuery, + DatasourceType, + ExportStatus, + PanelStatus, + Dashboard, +} from '../types'; import { convertTimestampToDate, convertTimeZoneTypeToName, getDashboardUid } from '../../../utils'; import { CLOSE_ICON_BASE_64, DOWNLOAD_ICON_BASE_64, SELECT_ICON_BASE_64, UNSELECT_ICON_BASE_64 } from '../../../icons'; @@ -117,7 +125,6 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { const queries: DashboardQuery[] = []; dashboard.panels?.forEach((panel: PanelModel) => { - // @ts-ignore if (panel.type === PANEL_ID) { return; @@ -436,13 +443,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
- diff --git a/src/panels/corpglory-dataexporter-panel/types.ts b/src/panels/corpglory-dataexporter-panel/types.ts index 1010848..f369b40 100644 --- a/src/panels/corpglory-dataexporter-panel/types.ts +++ b/src/panels/corpglory-dataexporter-panel/types.ts @@ -55,7 +55,7 @@ export interface Dashboard { * TODO docs */ annotations?: { - list: Array; + list: any[]; }; /** * Description of dashboard. @@ -79,16 +79,16 @@ export interface Dashboard { /** * TODO docs */ - links?: Array; + links?: any[]; /** * TODO docs */ liveNow?: boolean; - panels?: Array; + panels?: PanelModel[]; /** * TODO docs */ - refresh?: (string | false); + refresh?: string | false; /** * Version of the JSON schema, incremented each time a Grafana update brings * changes to said schema. @@ -98,16 +98,16 @@ export interface Dashboard { /** * Theme of dashboard. */ - style: ('light' | 'dark'); + style: 'light' | 'dark'; /** * Tags associated with dashboard. */ - tags?: Array; + tags?: string[]; /** * TODO docs */ templating?: { - list: Array; + list: any[]; }; /** * Time range for dashboard, e.g. last 6 hours, last 7 days, etc @@ -136,16 +136,16 @@ export interface Dashboard { /** * Selectable intervals for auto-refresh. */ - refresh_intervals: Array; + refresh_intervals: string[]; /** * TODO docs */ - time_options: Array; + time_options: string[]; }; /** * Timezone of dashboard, */ - timezone?: ('browser' | 'utc' | string); + timezone?: 'browser' | 'utc' | string; /** * Title of dashboard. */