diff --git a/resources/imgs/cics-plex-dark.svg b/resources/imgs/cics-plex-dark.svg new file mode 100644 index 0000000..5effe00 --- /dev/null +++ b/resources/imgs/cics-plex-dark.svg @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/resources/imgs/cics-plex-light.svg b/resources/imgs/cics-plex-light.svg new file mode 100644 index 0000000..ab8fcd7 --- /dev/null +++ b/resources/imgs/cics-plex-light.svg @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/src/trees/CICSPlexTree.ts b/src/trees/CICSPlexTree.ts index d52a984..2ce5a7c 100644 --- a/src/trees/CICSPlexTree.ts +++ b/src/trees/CICSPlexTree.ts @@ -33,7 +33,7 @@ export class CICSPlexTree extends TreeItem { plexName: string, profile: IProfileLoaded, sessionTree: CICSSessionTree, - public readonly iconPath = getIconPathInResources("list-dark.svg", "list-light.svg") + public readonly iconPath = getIconPathInResources("cics-plex-dark.svg", "cics-plex-light.svg") ) { super(plexName, TreeItemCollapsibleState.Collapsed); this.plexName = plexName; @@ -63,38 +63,44 @@ export class CICSPlexTree extends TreeItem { this.addRegion(newRegionTree); } - // Store all filters on children resources - public findResourceFilters() { - for (const region of this.children) { - if (region instanceof CICSRegionTree) { - if (region.children) { - for (const resourceTree of region.children) { - const filter = resourceTree.getFilter(); - if (filter) { - this.resourceFilters[region.getRegionName()] = {[resourceTree.label!.toString().split(' ')[0]]: filter}; - } - } - } - } - } - } - - public async reapplyFilter() {///////////////// - for (const region of this.children) { - if (region instanceof CICSRegionTree) { - const resourceFilters = this.getResourceFilter(region.getRegionName()); - if (resourceFilters) { - for (const resourceTree of region.children!) { - if (resourceFilters[resourceTree.label!.toString().split(' ')[0]]) { - resourceTree.setFilter(resourceFilters[resourceTree.label!.toString()]); - await resourceTree.loadContents(); - resourceTree.collapsibleState = TreeItemCollapsibleState.Expanded; - } - } - } - } - } - } + // // Store all filters on children resources + // public findResourceFilters() { + // const regionsContainer = this.children.filter(child => child instanceof CICSRegionsContainer)[0]; + // if (regionsContainer){ + // for (const region of regionsContainer.getChildren()!) { + // if (region instanceof CICSRegionTree) { + // if (region.children) { + // for (const resourceTree of region.children) { + // const filter = resourceTree.getFilter(); + // if (filter) { + // this.resourceFilters[region.getRegionName()] = {[resourceTree.label!.toString().split(' ')[0]]: filter}; + // } else { + // this.resourceFilters[region.getRegionName()] = {[resourceTree.label!.toString().split(' ')[0]]: undefined}; + // } + // } + // } + // } + // } + // } + // } + + // public async reapplyFilter() { + // const regionsContainer = this.children.filter(child => child instanceof CICSRegionsContainer)[0]; + // for (const region of regionsContainer.getChildren()!) { + // if (region instanceof CICSRegionTree) { + // const resourceFilters = this.getResourceFilter(region.getRegionName()); + // if (resourceFilters) { + // for (const resourceTree of region.children!) { + // if (resourceFilters[resourceTree.label!.toString().split(' ')[0]]) { + // resourceTree.setFilter(resourceFilters[resourceTree.label!.toString()]); + // await resourceTree.loadContents(); + // resourceTree.collapsibleState = TreeItemCollapsibleState.Expanded; + // } + // } + // } + // } + // } + // } public getResourceFilter(regionName: string) { return this.resourceFilters[regionName];