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 { 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) {
<div>
<Table width={width} height={height - 40} data={tasksDataFrame as DataFrame} />
<HorizontalGroup justify="flex-end">
<Button
variant="primary"
aria-label="Rich history button"
icon="plus"
style={{ marginTop: '8px' }}
onClick={openDatasourceModal}
>
<Button variant="primary" icon="plus" style={{ marginTop: '8px' }} onClick={openDatasourceModal}>
Add Task
</Button>
<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
*/
annotations?: {
list: Array<any>;
list: any[];
};
/**
* Description of dashboard.
@ -79,16 +79,16 @@ export interface Dashboard {
/**
* TODO docs
*/
links?: Array<any>;
links?: any[];
/**
* TODO docs
*/
liveNow?: boolean;
panels?: Array<PanelModel>;
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<string>;
tags?: string[];
/**
* TODO docs
*/
templating?: {
list: Array<any>;
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<string>;
refresh_intervals: string[];
/**
* TODO docs
*/
time_options: Array<string>;
time_options: string[];
};
/**
* Timezone of dashboard,
*/
timezone?: ('browser' | 'utc' | string);
timezone?: 'browser' | 'utc' | string;
/**
* Title of dashboard.
*/

Loading…
Cancel
Save