diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index 1af10d9..73527be 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -31,6 +31,7 @@ import { DataQuery, DataSourceSettings, TimeRange, + OrgRole, } from '@grafana/data'; import { RefreshEvent } from '@grafana/runtime'; @@ -40,6 +41,7 @@ import * as _ from 'lodash'; interface Props extends PanelProps {} export function Panel({ width, height, timeRange, eventBus }: Props) { + console.log('contextSrv', contextSrv, OrgRole.Admin); // TODO: Dashboard type const [dashboard, setDashboard] = useState(null); const [datasources, setDatasources] = useState(null); @@ -103,10 +105,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(tasks); + // if (tasks === null) { + // return; + // } + const dataFrame = getDataFrameForTaskTable([]); setTasksDataFrame(dataFrame); }, [tasks]); // eslint-disable-line react-hooks/exhaustive-deps @@ -185,6 +187,7 @@ export function Panel({ width, height, timeRange, eventBus }: Props) { } function openDatasourceModal(): void { + setTimeRange(timeRange); setModalVisibility(true); }