Browse Source

fix import order

pull/7/head
vargburz 1 year ago
parent
commit
d44907e87d
  1. 10
      src/panels/corpglory-dataexporter-panel/components/Panel.tsx

10
src/panels/corpglory-dataexporter-panel/components/Panel.tsx

@ -1,5 +1,4 @@
import { PanelOptions, TaskTableRowConfig, QueryTableRowConfig, DatasourceType } from '../types';
import { css } from '@emotion/css';
import { convertTimestampToDate, getDashboardUid } from '../../../utils';
import { CLOSE_ICON_BASE_64, DOWNLOAD_ICON_BASE_64, SELECT_ICON_BASE_64, UNSELECT_ICON_BASE_64 } from '../../../icons';
@ -8,6 +7,7 @@ import { deleteTask, getStaticFile, getTasks, queryApi } from '../../../services
import { getDashboardByUid, getDatasources } from '../../../services/grafana_backend_service';
import { contextSrv } from 'grafana/app/core/core';
import { css } from '@emotion/css';
import {
Table,
@ -103,10 +103,10 @@ export function Panel({ width, height, timeRange, eventBus }: Props) {
}, [dashboard, datasources]); // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => {
// if (tasks === null) {
// return;
// }
const dataFrame = getDataFrameForTaskTable([]);
if (tasks === null) {
return;
}
const dataFrame = getDataFrameForTaskTable(tasks);
setTasksDataFrame(dataFrame);
}, [tasks]); // eslint-disable-line react-hooks/exhaustive-deps

Loading…
Cancel
Save