Browse Source

hotfix

pull/13/head
rozetko 2 years ago
parent
commit
d0319ab96b
  1. 8
      src/panels/corpglory-dataexporter-panel/components/Panel.tsx

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

@ -109,7 +109,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
setQueriesDataFrame(getDataFrameForQueriesTable(queries)); setQueriesDataFrame(getDataFrameForQueriesTable(queries));
}, [queries]); // eslint-disable-line react-hooks/exhaustive-deps }, [queries]); // eslint-disable-line react-hooks/exhaustive-deps
async function updateQueries(dashboard: Dashboard | null, datasources: DataSourceSettings[] | null): Promise<void> { async function updateQueries(): Promise<void> {
if (!dashboard || !datasources) { if (!dashboard || !datasources) {
console.warn(`Can't update queries if there is no dashboard or datasources`); console.warn(`Can't update queries if there is no dashboard or datasources`);
return; return;
@ -213,8 +213,8 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
setQueries(queries.map((query: DashboardQuery) => ({ ...query, selected: false }))); setQueries(queries.map((query: DashboardQuery) => ({ ...query, selected: false })));
} }
function openDatasourceModal(dashboard: Dashboard | null, datasources: DataSourceSettings[] | null): void { function openDatasourceModal(): void {
updateQueries(dashboard, datasources); updateQueries();
setTimeRange(timeRange); setTimeRange(timeRange);
setModalVisibility(true); setModalVisibility(true);
} }
@ -441,7 +441,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
aria-label="Rich history button" aria-label="Rich history button"
icon="plus" icon="plus"
style={{ marginTop: '8px' }} style={{ marginTop: '8px' }}
onClick={() => openDatasourceModal(dashboard, datasources)} onClick={openDatasourceModal}
> >
Add Task Add Task
</Button> </Button>

Loading…
Cancel
Save