Browse Source

lint:fix

pull/13/head
rozetko 2 years ago
parent
commit
731e22cb28
  1. 19
      src/panels/corpglory-dataexporter-panel/components/Panel.tsx
  2. 20
      src/panels/corpglory-dataexporter-panel/types.ts

19
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 { convertTimestampToDate, convertTimeZoneTypeToName, getDashboardUid } from '../../../utils';
import { CLOSE_ICON_BASE_64, DOWNLOAD_ICON_BASE_64, SELECT_ICON_BASE_64, UNSELECT_ICON_BASE_64 } from '../../../icons'; 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[] = []; const queries: DashboardQuery[] = [];
dashboard.panels?.forEach((panel: PanelModel) => { dashboard.panels?.forEach((panel: PanelModel) => {
// @ts-ignore // @ts-ignore
if (panel.type === PANEL_ID) { if (panel.type === PANEL_ID) {
return; return;
@ -436,13 +443,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
<div> <div>
<Table width={width} height={height - 40} data={tasksDataFrame as DataFrame} /> <Table width={width} height={height - 40} data={tasksDataFrame as DataFrame} />
<HorizontalGroup justify="flex-end"> <HorizontalGroup justify="flex-end">
<Button <Button variant="primary" icon="plus" style={{ marginTop: '8px' }} onClick={openDatasourceModal}>
variant="primary"
aria-label="Rich history button"
icon="plus"
style={{ marginTop: '8px' }}
onClick={openDatasourceModal}
>
Add Task Add Task
</Button> </Button>
<Modal title="Select Queries" isOpen={isModalOpen} onDismiss={onCloseModal} className={styles.calendarModal}> <Modal title="Select Queries" isOpen={isModalOpen} onDismiss={onCloseModal} className={styles.calendarModal}>

20
src/panels/corpglory-dataexporter-panel/types.ts

@ -55,7 +55,7 @@ export interface Dashboard {
* TODO docs * TODO docs
*/ */
annotations?: { annotations?: {
list: Array<any>; list: any[];
}; };
/** /**
* Description of dashboard. * Description of dashboard.
@ -79,16 +79,16 @@ export interface Dashboard {
/** /**
* TODO docs * TODO docs
*/ */
links?: Array<any>; links?: any[];
/** /**
* TODO docs * TODO docs
*/ */
liveNow?: boolean; liveNow?: boolean;
panels?: Array<PanelModel>; panels?: PanelModel[];
/** /**
* TODO docs * TODO docs
*/ */
refresh?: (string | false); refresh?: string | false;
/** /**
* Version of the JSON schema, incremented each time a Grafana update brings * Version of the JSON schema, incremented each time a Grafana update brings
* changes to said schema. * changes to said schema.
@ -98,16 +98,16 @@ export interface Dashboard {
/** /**
* Theme of dashboard. * Theme of dashboard.
*/ */
style: ('light' | 'dark'); style: 'light' | 'dark';
/** /**
* Tags associated with dashboard. * Tags associated with dashboard.
*/ */
tags?: Array<string>; tags?: string[];
/** /**
* TODO docs * TODO docs
*/ */
templating?: { templating?: {
list: Array<any>; list: any[];
}; };
/** /**
* Time range for dashboard, e.g. last 6 hours, last 7 days, etc * 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. * Selectable intervals for auto-refresh.
*/ */
refresh_intervals: Array<string>; refresh_intervals: string[];
/** /**
* TODO docs * TODO docs
*/ */
time_options: Array<string>; time_options: string[];
}; };
/** /**
* Timezone of dashboard, * Timezone of dashboard,
*/ */
timezone?: ('browser' | 'utc' | string); timezone?: 'browser' | 'utc' | string;
/** /**
* Title of dashboard. * Title of dashboard.
*/ */

Loading…
Cancel
Save