Skip to content

Commit

Permalink
globalFilter - add new panel when exists globalFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Alloza committed May 12, 2024
1 parent 332310a commit f74f736
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {
const unsetPanels = this.edaPanels.filter(panel => _.isNil(panel.panel.content));

setTimeout(() => {
const treeQueryMode = this.edaPanels.some((panel) => panel.selectedQueryMode === 'EDA2');
unsetPanels.forEach(panel => {
globalFilters.forEach(filter => {
if (panel) {
if (panel && !treeQueryMode) {
filter.panelList.push(panel.panel.id);
const formatedFilter = this.globalFiltersService.formatFilter(filter);
panel.assertGlobalFilter(formatedFilter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export class GlobalFilterDialogComponent implements OnInit, OnDestroy {
} else {
for (const panel of this.allPanels) {
panel.active = this.globalFilter.panelList.includes(panel.id);

if (!Object.keys(this.globalFilter.pathList).includes(panel.id)) {
this.globalFilter.pathList[panel.id] = {
selectedTableNodes: {},
path: []
};
}
}
}

Expand Down Expand Up @@ -179,7 +186,6 @@ export class GlobalFilterDialogComponent implements OnInit, OnDestroy {
this.filteredPanels = this.allPanels.filter((p: any) => p.avaliable && p.active);
this.initTablesForFilter();
}

}

public onChangeSelectedTable(): void {
Expand Down

0 comments on commit f74f736

Please sign in to comment.