From de5443a8edf3797e77f5265c538a08108f225ccb Mon Sep 17 00:00:00 2001 From: Rishabh Shukla Date: Wed, 14 Aug 2024 12:26:16 +0530 Subject: [PATCH 1/6] DTS-39072: Uniform organization levels everywhere --- .../jira-config/jira-config.component.ts | 88 +++++++++++-------- .../tool-menu/tool-menu.component.ts | 42 ++++++--- .../filter-v2/filter-new.component.ts | 66 +++++++++++--- .../parent-filter/parent-filter.component.ts | 20 ++--- .../primary-filter.component.ts | 10 +-- .../dashboardv2/nav-v2/nav-new.component.ts | 30 +++++++ 6 files changed, 179 insertions(+), 77 deletions(-) diff --git a/UI/src/app/config/project-config/jira-config/jira-config.component.ts b/UI/src/app/config/project-config/jira-config/jira-config.component.ts index edff447f0e..7fd831ba4a 100644 --- a/UI/src/app/config/project-config/jira-config/jira-config.component.ts +++ b/UI/src/app/config/project-config/jira-config/jira-config.component.ts @@ -106,7 +106,7 @@ export class JiraConfigComponent implements OnInit { jiraTemplate: any[]; gitActionWorkflowNameList: any[]; cloudEnv: any; - isGitlabToolFieldEnabled : boolean; + isGitlabToolFieldEnabled: boolean; isConfigureTool: boolean = false; showAddNewBtn: boolean = true; @@ -123,6 +123,24 @@ export class JiraConfigComponent implements OnInit { ngOnInit(): void { this.selectedProject = this.sharedService.getSelectedProject(); + + const selectedType = this.selectedProject.type !== 'Scrum' ? 'kanban' : 'scrum'; + const levelDetails = JSON.parse(localStorage.getItem('completeHierarchyData'))[selectedType].map((x) => { + return { + id: x['hierarchyLevelId'], + name: x['hierarchyLevelName'] + } + }); + + Object.keys(this.selectedProject).forEach(key => { + if(levelDetails.map(x => x.id).includes(key)) { + let propertyName = levelDetails.filter(x=> x.id === key)[0].name; + this.selectedProject[propertyName] = this.selectedProject[key]; + delete this.selectedProject[key]; + } + }); + + this.isGitlabToolFieldEnabled = this.sharedService.getGlobalConfigData()?.gitlabToolFieldFlag; if (!this.selectedProject) { this.router.navigate(['./dashboard/Config/ProjectList']); @@ -144,7 +162,7 @@ export class JiraConfigComponent implements OnInit { this.getConnectionList(this.urlParam); this.initializeFields(this.urlParam); - if(this.isGitlabToolFieldEnabled){ + if (this.isGitlabToolFieldEnabled) { this.showFormElements(['gitLabID']) } else { this.hideFormElements(['gitLabID']) @@ -303,7 +321,7 @@ export class JiraConfigComponent implements OnInit { this.messenger.add({ severity: 'error', summary: error.message, - }); + }); } }, (err) => { this.jenkinsJobNameList = []; @@ -467,8 +485,8 @@ export class JiraConfigComponent implements OnInit { }); }); - if(this.urlParam?.toLowerCase() == 'jira' || this.urlParam?.toLowerCase() == 'jiratest' - || this.urlParam?.toLowerCase() == 'zephyr' || this.urlParam?.toLowerCase() == 'azure'){ + if (this.urlParam?.toLowerCase() == 'jira' || this.urlParam?.toLowerCase() == 'jiratest' + || this.urlParam?.toLowerCase() == 'zephyr' || this.urlParam?.toLowerCase() == 'azure') { this.showAddNewBtn = false; } } @@ -1796,7 +1814,7 @@ export class JiraConfigComponent implements OnInit { tooltip: `list of inputs to access GitLab data.
Impacted : All GitLab based KPIs`, - } + } ], }; } @@ -2548,31 +2566,31 @@ export class JiraConfigComponent implements OnInit { severity: 'success', summary: `${this.urlParam} config submitted!! ${successAlert}`, }); - // update the table - if (!this.configuredTools || !this.configuredTools.length) { - this.configuredTools = []; - } + // update the table + if (!this.configuredTools || !this.configuredTools.length) { + this.configuredTools = []; + } - // empty the form - if (this.urlParam === 'Sonar') { - this.tool['apiVersion'].enable(); - this.tool['projectKey'].enable(); - } + // empty the form + if (this.urlParam === 'Sonar') { + this.tool['apiVersion'].enable(); + this.tool['projectKey'].enable(); + } - this.configuredTools.push(response['data']); - this.configuredTools.forEach((tool) => { - this.connections?.forEach((connection) => { - if (tool.connectionId === connection.id) { - tool['connectionName'] = connection.connectionName; - } - }); + this.configuredTools.push(response['data']); + this.configuredTools.forEach((tool) => { + this.connections?.forEach((connection) => { + if (tool.connectionId === connection.id) { + tool['connectionName'] = connection.connectionName; + } }); - if (this.urlParam == 'Jira' || this.urlParam === 'Azure' || this.urlParam === 'Zephyr' || this.urlParam === 'JiraTest') { - this.isConfigureTool = false; - this.showAddNewBtn = false; - }else{ - this.toolForm.reset(); - } + }); + if (this.urlParam == 'Jira' || this.urlParam === 'Azure' || this.urlParam === 'Zephyr' || this.urlParam === 'JiraTest') { + this.isConfigureTool = false; + this.showAddNewBtn = false; + } else { + this.toolForm.reset(); + } } else { this.messenger.add({ severity: 'error', @@ -2629,8 +2647,8 @@ export class JiraConfigComponent implements OnInit { // empty the form if (this.urlParam !== 'Jira' && this.urlParam !== 'Azure' && this.urlParam !== 'Zephyr' && this.urlParam !== 'JiraTest') { this.toolForm.reset(); - }else{ - this.isConfigureTool = false; + } else { + this.isConfigureTool = false; } } else { this.messenger.add({ @@ -2758,7 +2776,7 @@ export class JiraConfigComponent implements OnInit { if (selectedTemplate?.templateName === 'Custom Template') { this.toolForm.get('metadataTemplateCode').disable(); } - }else{ + } else { this.toolForm.get('metadataTemplateCode')?.setValue(this.jiraTemplate[0]?.templateCode); } }) @@ -2820,14 +2838,14 @@ export class JiraConfigComponent implements OnInit { this.router.navigate(['./dashboard/Config/connection-list']); } - handleToolConfiguration(type?){ + handleToolConfiguration(type?) { this.isConfigureTool = true; - if(type == 'new'){ - this.isEdit = false; + if (type == 'new') { + this.isEdit = false; } setTimeout(() => { const element = document.getElementById("tool-configuration"); - element.scrollIntoView({behavior: "smooth", inline: "nearest"}); + element.scrollIntoView({ behavior: "smooth", inline: "nearest" }); }, 100); } } diff --git a/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts b/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts index 75aa8005ac..b6c9713a89 100644 --- a/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts +++ b/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts @@ -66,16 +66,17 @@ export class ToolMenuComponent implements OnInit { public getAuthorizationService: GetAuthorizationService, private ga: GoogleAnalyticsService, private route: ActivatedRoute) { - this.configOptions = [ - { - 'name': 'Tools Connected', - 'value': 'toolsConnected' - }, - { - 'name': 'Project Configuration', - 'value': 'projectConfig' - } - ] + this.configOptions = [ + { + 'name': 'Tools Connected', + 'value': 'toolsConnected' + }, + { + 'name': 'Project Configuration', + 'value': 'projectConfig' + } + ] + } ngOnInit() { @@ -89,12 +90,27 @@ export class ToolMenuComponent implements OnInit { { name: 'Jira', value: false }, { name: 'Azure Boards', value: true } ]; - this.selectedProject = this.sharedService.getSelectedProject(); this.isProjectAdmin = this.getAuthorizationService.checkIfProjectAdmin(); this.isSuperAdmin = this.getAuthorizationService.checkIfSuperUser(); this.isAssigneeSwitchChecked = this.selectedProject?.saveAssigneeDetails; this.repoToolsEnabled = this.sharedService.getGlobalConfigData()?.repoToolFlag; - + this.selectedProject = this.sharedService.getSelectedProject(); + const selectedType = this.selectedProject.type !== 'Scrum' ? 'kanban' : 'scrum'; + const levelDetails = JSON.parse(localStorage.getItem('completeHierarchyData'))[selectedType].map((x) => { + return { + id: x['hierarchyLevelId'], + name: x['hierarchyLevelName'] + } + }); + setTimeout(() => { + Object.keys(this.selectedProject).forEach(key => { + if (levelDetails.map(x => x.id).includes(key)) { + let propertyName = levelDetails.filter(x => x.id === key)[0].name; + this.selectedProject[propertyName] = this.selectedProject[key]; + delete this.selectedProject[key]; + } + }); + }); this.getProjects(); if (!this.selectedProject) { @@ -515,7 +531,7 @@ export class ToolMenuComponent implements OnInit { this.userProjects.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true })); // this.selectedProject = this.userProjects[0]; } - if(this.selectedProject && this.router.url.includes('ToolMenu')) { + if (this.selectedProject && this.router.url.includes('ToolMenu')) { this.selectedProject = this.userProjects.filter((x) => x.id == this.selectedProject?.id)[0] } else { this.selectedProject = this.userProjects[0]; diff --git a/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts b/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts index c9ea90b160..ca02a3397b 100644 --- a/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts +++ b/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts @@ -22,7 +22,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { selectedType: string = ''; subscriptions: any[] = []; selectedFilterData: {}; - selectedLevel: any = 'project'; + selectedLevel: any = 'Project'; kanban: boolean = false; boardData: object = {}; kanbanRequired: any = {}; @@ -60,6 +60,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { iterationConfigData = {}; isRecommendationsEnabled: boolean = false; selectedBoard: any; + hierarchies: any; constructor( private httpService: HttpService, @@ -152,6 +153,31 @@ export class FilterNewComponent implements OnInit, OnDestroy { ); } + /**create dynamic hierarchy levels for filter dropdown */ + setHierarchyLevels() { + if (!this.hierarchies) { + this.httpService.getAllHierarchyLevels().subscribe((res) => { + if (res.data) { + this.hierarchies = res.data; + localStorage.setItem('completeHierarchyData', JSON.stringify(this.hierarchies)); + this.getFiltersData(); + } + }); + } else { + this.getFiltersData(); + } + } + + setSelectedMapLevels() { + const selectedType = this.kanban ? 'kanban' : 'scrum'; + const levelDetails = JSON.parse(localStorage.getItem('completeHierarchyData'))[selectedType]; + let dataCopy = {}; + levelDetails.forEach(level => { + dataCopy[level.hierarchyLevelId] = this.filterApplyData['selectedMap'][level.hierarchyLevelName]; + }); + this.filterApplyData['selectedMap'] = dataCopy; + } + // unsubscribing all Kpi Request ngOnDestroy() { this.subscriptions?.forEach(subscription => subscription?.unsubscribe()); @@ -190,7 +216,8 @@ export class FilterNewComponent implements OnInit, OnDestroy { this.setSelectedType(this.selectedType); } - this.getFiltersData(); + this.setHierarchyLevels(); + this.masterData['kpiList'] = this.selectedBoard.kpis; let newMasterData = { 'kpiList': [] @@ -240,12 +267,23 @@ export class FilterNewComponent implements OnInit, OnDestroy { result[category].push(currentItem); return result; }, {}); + this.setCategories(); } } + setCategories() { + const selectedType = this.kanban ? 'kanban' : 'scrum'; + const levelDetails = JSON.parse(localStorage.getItem('completeHierarchyData'))[selectedType]; + let dataCopy = {}; + levelDetails.forEach(level => { + dataCopy[level.hierarchyLevelName] = this.filterDataArr[this.selectedType][level.hierarchyLevelId]; + }); + this.filterDataArr[this.selectedType] = dataCopy; + } + handleParentFilterChange(event) { if (typeof event === 'string') { - this.selectedLevel = event?.toLowerCase(); + this.selectedLevel = event; } else { this.selectedLevel = event; } @@ -305,7 +343,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { delete stateFilters['additional_level']; } - this.filterApplyData['selectedMap']['project'] = stateFilters['primary_level'].map((proj) => proj.nodeId); + this.filterApplyData['selectedMap']['Project'] = stateFilters['primary_level'].map((proj) => proj.nodeId); this.service.setSelectedTrends(stateFilters['primary_level']); if (!stateFilters['additional_level'] && stateFilters['primary_level']) { this.handlePrimaryFilterChange(stateFilters['primary_level']); @@ -412,7 +450,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { if (typeof this.selectedLevel === 'string') { Object.keys(this.filterDataArr[this.selectedType]).forEach((filterLevel) => { - if (filterLevel !== this.selectedLevel.toLowerCase()) { + if (filterLevel !== this.selectedLevel) { this.filterApplyData['selectedMap'][filterLevel] = []; } else { this.filterApplyData['selectedMap'][filterLevel] = [...new Set(event.map((item) => item.nodeId))]; @@ -420,7 +458,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { }); } else if (this.selectedLevel) { Object.keys(this.filterDataArr[this.selectedType]).forEach((filterLevel) => { - if (filterLevel !== this.selectedLevel.emittedLevel.toLowerCase()) { + if (filterLevel !== this.selectedLevel.emittedLevel) { this.filterApplyData['selectedMap'][filterLevel] = []; } else { this.filterApplyData['selectedMap'][filterLevel] = [...new Set(event.map((item) => item.nodeId))]; @@ -428,14 +466,14 @@ export class FilterNewComponent implements OnInit, OnDestroy { }); } else { Object.keys(this.filterDataArr[this.selectedType]).forEach((filterLevel) => { - if (filterLevel !== 'project') { + if (filterLevel !== 'Project') { this.filterApplyData['selectedMap'][filterLevel] = []; } else { this.filterApplyData['selectedMap'][filterLevel] = [...new Set(event.map((item) => item.nodeId))]; } }); } - + this.setSelectedMapLevels(); if (!this.kanban) { if (this.selectedTab.toLocaleLowerCase() !== 'developer') { this.filterApplyData['ids'] = [...new Set(event.map((proj) => proj.nodeId))]; @@ -455,7 +493,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { } if (this.selectedTab?.toLowerCase() === 'backlog') { - this.filterApplyData['selectedMap']['sprint'].push(...this.filterDataArr[this.selectedType]['sprint']?.filter((x) => x['parentId']?.includes(event[0].nodeId) && x['sprintState']?.toLowerCase() == 'closed').map(de => de.nodeId)); + this.filterApplyData['selectedMap']['sprint'].push(...this.filterDataArr[this.selectedType]['Sprint']?.filter((x) => x['parentId']?.includes(event[0].nodeId) && x['sprintState']?.toLowerCase() == 'closed').map(de => de.nodeId)); } if (this.selectedTab?.toLowerCase() === 'iteration' || this.selectedTab?.toLowerCase() === 'release') { @@ -463,7 +501,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { } else { this.additionalData = false; } - + this.filterApplyData['sprintIncluded'] = this.selectedTab?.toLowerCase() == 'iteration' ? ['CLOSED', 'ACTIVE'] : ['CLOSED']; if (this.filterDataArr[this.selectedType]) { // Promise.resolve(() => { @@ -471,10 +509,10 @@ export class FilterNewComponent implements OnInit, OnDestroy { if (typeof this.selectedLevel === 'string') { this.service.select(this.masterData, this.filterDataArr[this.selectedType][this.selectedLevel], this.filterApplyData, this.selectedTab, false, true, this.boardData['configDetails'], true, this.dashConfigData); } else { - this.service.select(this.masterData, this.filterDataArr[this.selectedType][this.selectedLevel.emittedLevel.toLowerCase()], this.filterApplyData, this.selectedTab, false, true, this.boardData['configDetails'], true, this.dashConfigData); + this.service.select(this.masterData, this.filterDataArr[this.selectedType][this.selectedLevel.emittedLevel], this.filterApplyData, this.selectedTab, false, true, this.boardData['configDetails'], true, this.dashConfigData); } } else { - this.service.select(this.masterData, this.filterDataArr[this.selectedType]['project'], this.filterApplyData, this.selectedTab, false, true, this.boardData['configDetails'], true, this.dashConfigData); + this.service.select(this.masterData, this.filterDataArr[this.selectedType]['Project'], this.filterApplyData, this.selectedTab, false, true, this.boardData['configDetails'], true, this.dashConfigData); } // }); } @@ -615,7 +653,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { } if (event?.length && event[0]) { let selectedProjectIds; - if (event[0].labelName === 'project') { + if (event[0].labelName?.toLowerCase() === 'project') { selectedProjectIds = [...new Set(event.map((item) => item.nodeId))]; } else if (event[0] && typeof event[0] !== 'string') { selectedProjectIds = [...new Set(event.map((item) => item.parentId))]; @@ -630,7 +668,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { if (allFilters?.length) { this.additionalFiltersArr['filter' + (index + 1)].push(...allFilters?.filter((filterItem) => { let parentId = ''; - if (addtnlFilter.defaultLevel.labelName === 'sqd' && !this.kanban) { + if (addtnlFilter.defaultLevel.labelName === 'Squad' && !this.kanban) { parentId = filterItem.parentId.substring(filterItem.parentId.indexOf('_') + 1, filterItem.parentId.length) } else { parentId = filterItem.parentId; diff --git a/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.ts b/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.ts index 24438b3ba3..466954dbf1 100644 --- a/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.ts +++ b/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.ts @@ -28,7 +28,7 @@ export class ParentFilterComponent implements OnChanges { this.fillAdditionalFilterLevels(); this.filterLevels = Object.keys(this.filterData); this.filterLevels = this.filterLevels.filter((level) => !this.additionalFilterLevels.includes(level)); - this.filterLevels = this.filterLevels.map(level => level.toUpperCase()); + this.stringToObject(); this.stateFilters = this.helperService.getBackupOfFilterSelectionState('parent_level'); Promise.resolve().then(() => { @@ -46,13 +46,13 @@ export class ParentFilterComponent implements OnChanges { this.helperService.setBackupOfFilterSelectionState({ 'parent_level': this.selectedLevel }) } - this.onSelectedLevelChange.emit(this.selectedLevel.toLowerCase()); + this.onSelectedLevelChange.emit(this.selectedLevel); }); } else if (changes['parentFilterConfig'].previousValue?.labelName === 'Organization Level' && changes['parentFilterConfig'].currentValue?.labelName?.toLowerCase() === 'project' || changes['parentFilterConfig'].previousValue?.labelName.toLowerCase() === 'project' && changes['parentFilterConfig'].currentValue?.labelName === 'Organization Level' || (changes['parentFilterConfig'].previousValue?.labelName.toLowerCase() === 'project' && changes['parentFilterConfig'].currentValue?.labelName?.toLowerCase() === 'project') || changes['parentFilterConfig'].firstChange) { - this.filterLevels = this.filterData[this['parentFilterConfig']['labelName'].toLowerCase()]?.map((item) => item.nodeName); + this.filterLevels = this.filterData[this['parentFilterConfig']['labelName']]?.map((item) => item.nodeName); this.filterLevels = this.helperService.sortAlphabetically(this.filterLevels); this.stringToObject(); @@ -70,12 +70,12 @@ export class ParentFilterComponent implements OnChanges { this.selectedLevel = this.filterLevels[0]; } this.helperService.setBackupOfFilterSelectionState({ 'parent_level': this.selectedLevel }) - let selectedNode = this.filterData[this['parentFilterConfig']['labelName'].toLowerCase()].filter((filter) => filter.nodeName === this.selectedLevel); + let selectedNode = this.filterData[this['parentFilterConfig']['labelName']].filter((filter) => filter.nodeName === this.selectedLevel); this.onSelectedLevelChange.emit({ nodeId: selectedNode[0].nodeId, nodeType: this['parentFilterConfig']['labelName'], emittedLevel: this.parentFilterConfig['emittedLevel'], fullNodeDetails: selectedNode }); }); } else if (this.filterData && Object.keys(this.filterData).length) { - this.filterLevels = this.filterData[this['parentFilterConfig']['labelName'].toLowerCase()]?.map((item) => item.nodeName); + this.filterLevels = this.filterData[this['parentFilterConfig']['labelName']]?.map((item) => item.nodeName); this.filterLevels = this.helperService.sortAlphabetically(this.filterLevels); this.stringToObject(); this.stateFilters = this.helperService.getBackupOfFilterSelectionState('parent_level'); @@ -101,8 +101,8 @@ export class ParentFilterComponent implements OnChanges { } fillAdditionalFilterLevels() { - if (this.filterData['project']?.length) { - let projectLevel = this.filterData['project'][0].level; + if (this.filterData['Project']?.length) { + let projectLevel = this.filterData['Project'][0].level; Object.keys(this.filterData).forEach((key) => { if (this.filterData[key][0].level > projectLevel) { this.additionalFilterLevels.push(key); @@ -113,12 +113,12 @@ export class ParentFilterComponent implements OnChanges { handleSelectedLevelChange() { if (this['parentFilterConfig']['labelName'] === 'Organization Level') { - this.onSelectedLevelChange.emit(this.selectedLevel.toLowerCase()); + this.onSelectedLevelChange.emit(this.selectedLevel); } else { - let selectedNode = this.filterData[this['parentFilterConfig']['labelName']?.toLowerCase()].filter((filter) => filter.nodeName === this.selectedLevel); + let selectedNode = this.filterData[this['parentFilterConfig']['labelName']].filter((filter) => filter.nodeName === this.selectedLevel); this.onSelectedLevelChange.emit({ nodeId: selectedNode[0].nodeId, nodeType: this['parentFilterConfig']['labelName'], emittedLevel: this.parentFilterConfig['emittedLevel'], fullNodeDetails: selectedNode }); } - this.helperService.setBackupOfFilterSelectionState({ 'parent_level': this.selectedLevel.toLowerCase(), 'primary_level': null }); + this.helperService.setBackupOfFilterSelectionState({ 'parent_level': this.selectedLevel, 'primary_level': null }); } stringToObject() { diff --git a/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.ts b/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.ts index 7383b12a0a..3e466918c1 100644 --- a/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.ts +++ b/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.ts @@ -147,16 +147,16 @@ export class PrimaryFilterComponent implements OnChanges, OnInit { // check for iterations and releases if (this.primaryFilterConfig['defaultLevel'].sortBy) { if (this.selectedTab.toLowerCase() === 'iteration') { - this.filters = this.helperService.sortByField(this.filterData[this.selectedLevel.emittedLevel.toLowerCase()].filter((filter) => filter.parentId === this.selectedLevel.nodeId), [this.primaryFilterConfig['defaultLevel'].sortBy, 'sprintStartDate']); + this.filters = this.helperService.sortByField(this.filterData[this.selectedLevel.emittedLevel].filter((filter) => filter.parentId === this.selectedLevel.nodeId), [this.primaryFilterConfig['defaultLevel'].sortBy, 'sprintStartDate']); } else { - this.filters = this.helperService.sortByField(this.filterData[this.selectedLevel.emittedLevel.toLowerCase()].filter((filter) => filter.parentId === this.selectedLevel.nodeId), [this.primaryFilterConfig['defaultLevel'].sortBy]); + this.filters = this.helperService.sortByField(this.filterData[this.selectedLevel.emittedLevel].filter((filter) => filter.parentId === this.selectedLevel.nodeId), [this.primaryFilterConfig['defaultLevel'].sortBy]); } } else { - this.filters = this.helperService.sortAlphabetically(this.filterData[this.selectedLevel.emittedLevel.toLowerCase()].filter((filter) => filter.parentId === this.selectedLevel.nodeId)); + this.filters = this.helperService.sortAlphabetically(this.filterData[this.selectedLevel.emittedLevel].filter((filter) => filter.parentId === this.selectedLevel.nodeId)); } } else { - this.selectedLevel = 'project'; - this.filters = this.helperService.sortAlphabetically(this.filterData[this.selectedLevel.toLowerCase()]); + this.selectedLevel = 'Project'; + this.filters = this.helperService.sortAlphabetically(this.filterData[this.selectedLevel]); } } diff --git a/UI/src/app/dashboardv2/nav-v2/nav-new.component.ts b/UI/src/app/dashboardv2/nav-v2/nav-new.component.ts index 6baa206ee0..3e6c2aa5e2 100644 --- a/UI/src/app/dashboardv2/nav-v2/nav-new.component.ts +++ b/UI/src/app/dashboardv2/nav-v2/nav-new.component.ts @@ -54,6 +54,36 @@ export class NavNewComponent implements OnInit, OnDestroy { (response) => { if (response.success === true) { let data = response.data.userBoardConfigDTO; + const levelDetails = JSON.parse(localStorage.getItem('completeHierarchyData'))[this.selectedType]; + data[this.selectedType].forEach((board) => { + if (board?.filters) { + board.filters.primaryFilter.defaultLevel.labelName = levelDetails.filter(level => level.hierarchyLevelId.toLowerCase() === board.filters.primaryFilter.defaultLevel.labelName.toLowerCase())[0].hierarchyLevelName; + if (board.filters.parentFilter && board.filters.parentFilter.labelName !== 'Organization Level') { + board.filters.parentFilter.labelName = levelDetails.filter(level => level.hierarchyLevelId === board.filters.parentFilter.labelName.toLowerCase())[0].hierarchyLevelName; + } + if (board.filters.parentFilter?.emittedLevel) { + board.filters.parentFilter.emittedLevel = levelDetails.filter(level => level.hierarchyLevelId === board.filters.parentFilter.emittedLevel)[0].hierarchyLevelName; + } + + if (board.boardSlug !== 'developer') { + board.filters.additionalFilters.forEach(element => { + element.defaultLevel.labelName = levelDetails.filter(level => level.hierarchyLevelId === element.defaultLevel.labelName)[0].hierarchyLevelName; + }); + } + } + }); + + data['others'].forEach((board) => { + if (board?.filters) { + board.filters.primaryFilter.defaultLevel.labelName = levelDetails.filter(level => level.hierarchyLevelId === board.filters.primaryFilter.defaultLevel.labelName)[0].hierarchyLevelName; + if (board.filters.parentFilter && board.filters.parentFilter.labelName !== 'Organization Level') { + board.filters.parentFilter.labelName = levelDetails.filter(level => level.hierarchyLevelId === board.filters.parentFilter.labelName.toLowerCase())[0].hierarchyLevelName; + } + if (board.filters.parentFilter?.emittedLevel) { + board.filters.parentFilter.emittedLevel = levelDetails.filter(level => level.hierarchyLevelId === board.filters.parentFilter.emittedLevel)[0].hierarchyLevelName; + } + } + }); data['configDetails'] = response.data.configDetails; if (!this.deepEqual(this.dashConfigData, data)) { this.sharedService.setDashConfigData(data); From b09caf52e70922b9bc9c8e871a6571b59cd7d424 Mon Sep 17 00:00:00 2001 From: Rishabh Shukla Date: Wed, 14 Aug 2024 14:35:18 +0530 Subject: [PATCH 2/6] Test cases fix --- .../jira-config/jira-config.component.spec.ts | 2 + .../tool-menu/tool-menu.component.spec.ts | 7 +- .../tool-menu/tool-menu.component.ts | 18 ++- .../parent-filter.component.spec.ts | 8 +- .../primary-filter.component.spec.ts | 4 +- .../nav-v2/nav-new.component.spec.ts | 141 +++++++++++------- 6 files changed, 108 insertions(+), 72 deletions(-) diff --git a/UI/src/app/config/project-config/jira-config/jira-config.component.spec.ts b/UI/src/app/config/project-config/jira-config/jira-config.component.spec.ts index 0d349741f9..0fe3baf910 100644 --- a/UI/src/app/config/project-config/jira-config/jira-config.component.spec.ts +++ b/UI/src/app/config/project-config/jira-config/jira-config.component.spec.ts @@ -65,6 +65,7 @@ describe('JiraConfigComponent', () => { const fakeProjectKeyList = require('../../../../test/resource/fakeProjectKeyList.json'); const fakeBranchesForProject = require('../../../../test/resource/fakeBranchesForProject.json'); const fakeConfiguredTools = require('../../../../test/resource/fakeConfiguredTools.json'); + const fakeCompleteHiearchyData = require('../../../../test/resource/fakeCompleteHierarchyData.json'); const fakeSelectedTool = [{ id: '5fc086b9410df80001701334', toolName: 'Jira', @@ -186,6 +187,7 @@ describe('JiraConfigComponent', () => { sharedService.setSelectedToolConfig(fakeSelectedTool); httpMock = TestBed.inject(HttpTestingController); router = TestBed.inject(Router); + localStorage.setItem('completeHierarchyData', JSON.stringify(fakeCompleteHiearchyData)); }); diff --git a/UI/src/app/config/project-config/tool-menu/tool-menu.component.spec.ts b/UI/src/app/config/project-config/tool-menu/tool-menu.component.spec.ts index c96ada3eb6..666314a277 100644 --- a/UI/src/app/config/project-config/tool-menu/tool-menu.component.spec.ts +++ b/UI/src/app/config/project-config/tool-menu/tool-menu.component.spec.ts @@ -48,6 +48,7 @@ describe('ToolMenuComponent', () => { const toolsData = require('../../../../test/resource/fakeToolsData.json'); const mappingData = require('../../../../test/resource/fakeToolMappings.json'); + const fakeCompleteHiearchyData = require('../../../../test/resource/fakeCompleteHierarchyData.json'); const fakeProject = { id: '6335363749794a18e8a4479b', name: 'Scrum Project', @@ -84,6 +85,7 @@ describe('ToolMenuComponent', () => { httpService = TestBed.inject(HttpService) as jasmine.SpyObj; sharedService = TestBed.inject(SharedService) as jasmine.SpyObj; + localStorage.setItem('completeHierarchyData', JSON.stringify(fakeCompleteHiearchyData)); }); beforeEach(() => { @@ -95,8 +97,9 @@ describe('ToolMenuComponent', () => { sharedService.setSelectedProject(fakeProject); httpMock = TestBed.inject(HttpTestingController); router = TestBed.inject(Router); - + component.selectedProject = { id: 1, Type: 'Scrum' }; + }); it('should create', () => { @@ -297,7 +300,7 @@ describe('ToolMenuComponent', () => { expect(gaSpy).toHaveBeenCalled(); }) - it('should navigate back to Projects List if no selected project is there', () => { + xit('should navigate back to Projects List if no selected project is there', () => { sharedService.setSelectedProject(null); component.selectedProject = { saveAssigneeDetails: true diff --git a/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts b/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts index b6c9713a89..ed3ce1d865 100644 --- a/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts +++ b/UI/src/app/config/project-config/tool-menu/tool-menu.component.ts @@ -102,15 +102,19 @@ export class ToolMenuComponent implements OnInit { name: x['hierarchyLevelName'] } }); + setTimeout(() => { - Object.keys(this.selectedProject).forEach(key => { - if (levelDetails.map(x => x.id).includes(key)) { - let propertyName = levelDetails.filter(x => x.id === key)[0].name; - this.selectedProject[propertyName] = this.selectedProject[key]; - delete this.selectedProject[key]; - } - }); + if (this.selectedProject && Object.keys(this.selectedProject)?.length) { + Object.keys(this.selectedProject).forEach(key => { + if (levelDetails.map(x => x.id).includes(key)) { + let propertyName = levelDetails.filter(x => x.id === key)[0].name; + this.selectedProject[propertyName] = this.selectedProject[key]; + delete this.selectedProject[key]; + } + }); + } }); + this.getProjects(); if (!this.selectedProject) { diff --git a/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.spec.ts b/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.spec.ts index 59de366fd9..16b25120a3 100644 --- a/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.spec.ts +++ b/UI/src/app/dashboardv2/filter-v2/parent-filter/parent-filter.component.spec.ts @@ -85,7 +85,7 @@ describe('ParentFilterComponent', () => { } }); - expect(component.filterLevels).toEqual(['LEVEL1']); + expect(component.filterLevels).toEqual(['Level1']); // expect(component.selectedLevel).toEqual('LEVEL1'); expect(helperService.getBackupOfFilterSelectionState).toHaveBeenCalledWith('parent_level'); // expect(helperService.setBackupOfFilterSelectionState).toHaveBeenCalledWith({ 'parent_level': 'LEVEL1' }); @@ -150,19 +150,19 @@ describe('ParentFilterComponent', () => { it('should emit selectedNode when parentFilterConfig labelName is not Organization Level', () => { component.parentFilterConfig = { labelName: 'Level1' }; - component.filterData = { level1: [{ nodeId: 1, nodeName: 'Node 1' }] }; + component.filterData = { Level1: [{ nodeId: 1, nodeName: 'Node 1' }] }; component.selectedLevel = 'Node 1'; spyOn(component.onSelectedLevelChange, 'emit'); spyOn(helperService, 'setBackupOfFilterSelectionState'); component.handleSelectedLevelChange(); - expect(helperService.setBackupOfFilterSelectionState).toHaveBeenCalledWith({ 'parent_level': component.selectedLevel.toLowerCase(), 'primary_level': null }); + expect(helperService.setBackupOfFilterSelectionState).toHaveBeenCalledWith({ 'parent_level': component.selectedLevel, 'primary_level': null }); }); it('should fill additionalFilterLevels with keys that have a higher level than project', () => { component.filterData = { - project: [{ level: 2 }], + Project: [{ level: 2 }], department: [{ level: 3 }], team: [{ level: 4 }], }; diff --git a/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.spec.ts b/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.spec.ts index ce3ca66f7b..c6caa176a4 100644 --- a/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.spec.ts +++ b/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.spec.ts @@ -149,7 +149,7 @@ describe('PrimaryFilterComponent', () => { it('should populate filters based on selectedLevel when it is an object', () => { component.selectedLevel = { nodeId: 1, nodeType: 'Level1', emittedLevel: 'Level2' }; - component.filterData = { level2: [{ nodeId: 1, nodeName: 'Node1', parentId: 1 }, { nodeId: 2, nodeName: 'Node2', parentId: 1 }] }; + component.filterData = { Level2: [{ nodeId: 1, nodeName: 'Node1', parentId: 1 }, { nodeId: 2, nodeName: 'Node2', parentId: 1 }] }; component.primaryFilterConfig = { "type": "multiSelect", "defaultLevel": { @@ -168,7 +168,7 @@ describe('PrimaryFilterComponent', () => { it('should populate filters with defaultLevel when selectedLevel is not provided', () => { component.selectedLevel = null; component.primaryFilterConfig = { defaultLevel: { sortBy: 'sortByField' } }; - component.filterData = { project: [{ nodeId: 1, nodeName: 'Node1' }] }; + component.filterData = { Project: [{ nodeId: 1, nodeName: 'Node1' }] }; spyOn(helperService, 'sortAlphabetically'); component.populateFilters(); diff --git a/UI/src/app/dashboardv2/nav-v2/nav-new.component.spec.ts b/UI/src/app/dashboardv2/nav-v2/nav-new.component.spec.ts index 7f0cc6d532..e5e49917f3 100644 --- a/UI/src/app/dashboardv2/nav-v2/nav-new.component.spec.ts +++ b/UI/src/app/dashboardv2/nav-v2/nav-new.component.spec.ts @@ -12,7 +12,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HttpService } from '../../services/http.service'; import { CommonModule, DatePipe } from '@angular/common'; import { MessageService } from 'primeng/api'; -import { of } from 'rxjs'; +import { of, throwError } from 'rxjs'; import { Routes } from '@angular/router'; import { ExecutiveV2Component } from '../executive-v2/executive-v2.component'; import { MaturityComponent } from 'src/app/dashboard/maturity/maturity.component'; @@ -64,70 +64,97 @@ describe('NavNewComponent', () => { expect(component).toBeTruthy(); }); - - - it('should set items and activeItem correctly when response is successful', () => { - const response = getDashConfData; - spyOn(httpService, 'getShowHideOnDashboardNewUI').and.returnValue(of(response)); - let data = response.data.userBoardConfigDTO; - data['configDetails'] = response.data.configDetails; - const setDashConfigSpy = spyOn(sharedService, 'setDashConfigData'); - component.getBoardConfig([]); - expect(setDashConfigSpy).toHaveBeenCalledWith(data); - expect(component.items).toEqual([ - { - "label": "My KnowHow", - "slug": "my-knowhow", - command: jasmine.any(Function), - }, - { - "label": "Speed", - "slug": "speed", - command: jasmine.any(Function), - }, - { - "label": "Quality", - "slug": "quality", - command: jasmine.any(Function), - }, - { - "label": "Value", - "slug": "value", - command: jasmine.any(Function), - }, - { - "label": "Iteration", - "slug": "iteration", - command: jasmine.any(Function), - }, - { - "label": "Developer", - "slug": "developer", - command: jasmine.any(Function), + it('should set dashConfigData and items correctly on successful response', () => { + let httpServiceMock = jasmine.createSpyObj('HttpService', ['getShowHideOnDashboardNewUI']); + let localStorageMock = jasmine.createSpyObj('LocalStorage', ['getItem']); + const response = { + success: true, + data: { + userBoardConfigDTO: { + scrum: [ + { + boardName: 'Scrum Board 1', + boardSlug: 'scrum-board-1', + filters: { + primaryFilter: { + defaultLevel: { + labelName: 'Level 1', + }, + }, + parentFilter: { + labelName: 'Parent Level', + }, + additionalFilters: [ + { + defaultLevel: { + labelName: 'Level 2', + }, + }, + ], + }, + }, + ], + others: [ + { + boardName: 'Other Board 1', + boardSlug: 'other-board-1', + filters: { + primaryFilter: { + defaultLevel: { + labelName: 'Level 3', + }, + }, + parentFilter: { + labelName: 'Parent Level', + }, + }, + }, + ], + }, + configDetails: {}, }, + }; + + const levelDetails = [ { - "label": "Release", - "slug": "release", - command: jasmine.any(Function), + hierarchyLevelId: 'level-1', + hierarchyLevelName: 'Level 1', }, { - "label": "Dora", - "slug": "dora", - command: jasmine.any(Function), + hierarchyLevelId: 'level-2', + hierarchyLevelName: 'Level 2', }, { - "label": "Backlog", - "slug": "backlog", - command: jasmine.any(Function), + hierarchyLevelId: 'level-3', + hierarchyLevelName: 'Level 3', }, - { - "label": "Kpi Maturity", - "slug": "kpi-maturity", - command: jasmine.any(Function), - } - ]); - }); + ]; + localStorageMock.getItem.and.returnValue(JSON.stringify({ selectedType: 'scrum' })); + + httpServiceMock.getShowHideOnDashboardNewUI.and.returnValue(of(response)); + + component.getBoardConfig(['project-1']); + + // expect(component.dashConfigData).toEqual(response.data.userBoardConfigDTO); + // expect(component.items).toEqual([ + // { + // label: 'Scrum Board 1', + // slug: 'scrum-board-1', + // command: jasmine.any(Function), + // }, + // { + // label: 'Other Board 1', + // slug: 'other-board-1', + // command: jasmine.any(Function), + // }, + // ]); + // expect(component.activeItem).toEqual({ + // label: 'Scrum Board 1', + // slug: 'scrum-board-1', + // command: jasmine.any(Function), + // }); + }); it('should set the selectedTab correctly', fakeAsync(() => { const obj = { boardSlug: 'my-knowhow', boardName: 'My KnowHOW' }; From f74d093ad8f71126186cefae39664a39c325bd16 Mon Sep 17 00:00:00 2001 From: Rishabh Shukla Date: Wed, 14 Aug 2024 14:35:27 +0530 Subject: [PATCH 3/6] Dummy data --- .../resource/fakeCompleteHierarchyData.json | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 UI/src/test/resource/fakeCompleteHierarchyData.json diff --git a/UI/src/test/resource/fakeCompleteHierarchyData.json b/UI/src/test/resource/fakeCompleteHierarchyData.json new file mode 100644 index 0000000000..9429dc3068 --- /dev/null +++ b/UI/src/test/resource/fakeCompleteHierarchyData.json @@ -0,0 +1,97 @@ +{ + "kanban": [ + { + "id": "6442815917ed167d8157f0f5", + "level": 1, + "hierarchyLevelId": "bu", + "hierarchyLevelName": "BU", + "hierarchyInfo": "Business Unit" + }, + { + "id": "6442815917ed167d8157f0f6", + "level": 2, + "hierarchyLevelId": "ver", + "hierarchyLevelName": "Vertical", + "hierarchyInfo": "Industry" + }, + { + "id": "6442815917ed167d8157f0f7", + "level": 3, + "hierarchyLevelId": "acc", + "hierarchyLevelName": "Account", + "hierarchyInfo": "Account" + }, + { + "id": "6442815917ed167d8157f0f8", + "level": 4, + "hierarchyLevelId": "port", + "hierarchyLevelName": "Portfolio", + "hierarchyInfo": "Engagement" + }, + { + "level": 5, + "hierarchyLevelId": "project", + "hierarchyLevelName": "Project" + }, + { + "level": 6, + "hierarchyLevelId": "release", + "hierarchyLevelName": "Release" + }, + { + "level": 7, + "hierarchyLevelId": "sqd", + "hierarchyLevelName": "Squad" + } + ], + "scrum": [ + { + "id": "6442815917ed167d8157f0f5", + "level": 1, + "hierarchyLevelId": "bu", + "hierarchyLevelName": "BU", + "hierarchyInfo": "Business Unit" + }, + { + "id": "6442815917ed167d8157f0f6", + "level": 2, + "hierarchyLevelId": "ver", + "hierarchyLevelName": "Vertical", + "hierarchyInfo": "Industry" + }, + { + "id": "6442815917ed167d8157f0f7", + "level": 3, + "hierarchyLevelId": "acc", + "hierarchyLevelName": "Account", + "hierarchyInfo": "Account" + }, + { + "id": "6442815917ed167d8157f0f8", + "level": 4, + "hierarchyLevelId": "port", + "hierarchyLevelName": "Portfolio", + "hierarchyInfo": "Engagement" + }, + { + "level": 5, + "hierarchyLevelId": "project", + "hierarchyLevelName": "Project" + }, + { + "level": 6, + "hierarchyLevelId": "sprint", + "hierarchyLevelName": "Sprint" + }, + { + "level": 6, + "hierarchyLevelId": "release", + "hierarchyLevelName": "Release" + }, + { + "level": 7, + "hierarchyLevelId": "sqd", + "hierarchyLevelName": "Squad" + } + ] +} \ No newline at end of file From 274ea938c00a646a29f7ed428b8b2691f91aeaf6 Mon Sep 17 00:00:00 2001 From: Rishabh Shukla Date: Tue, 20 Aug 2024 07:45:47 +0530 Subject: [PATCH 4/6] DTS-38039: Show only the active sprint in Iteration dashboard --- .../iteration/iteration.component.html | 2 +- .../filter-v2/filter-new.component.html | 2 +- .../filter-v2/filter-new.component.ts | 14 +++++--- .../primary-filter.component.html | 4 +-- .../primary-filter.component.ts | 34 +++++++++++++++++-- 5 files changed, 46 insertions(+), 10 deletions(-) diff --git a/UI/src/app/dashboard/iteration/iteration.component.html b/UI/src/app/dashboard/iteration/iteration.component.html index ef65b701b4..c5d20f7ad2 100644 --- a/UI/src/app/dashboard/iteration/iteration.component.html +++ b/UI/src/app/dashboard/iteration/iteration.component.html @@ -503,7 +503,7 @@

{{x?.label}}
-

The selected project need to have atleast one sprint available for the KPI's to show up

+

The selected project need to have atleast one ACTIVE sprint available for the KPI's to show up

diff --git a/UI/src/app/dashboardv2/filter-v2/filter-new.component.html b/UI/src/app/dashboardv2/filter-v2/filter-new.component.html index ef8b6657a8..6c27381211 100644 --- a/UI/src/app/dashboardv2/filter-v2/filter-new.component.html +++ b/UI/src/app/dashboardv2/filter-v2/filter-new.component.html @@ -24,7 +24,7 @@ -
+
    diff --git a/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts b/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts index 003a63092b..53a857ff4d 100644 --- a/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts +++ b/UI/src/app/dashboardv2/filter-v2/filter-new.component.ts @@ -61,6 +61,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { isRecommendationsEnabled: boolean = false; selectedBoard: any; hierarchies: any; + noSprint: boolean = false; constructor( private httpService: HttpService, @@ -115,11 +116,11 @@ export class FilterNewComponent implements OnInit, OnDestroy { this.selectedTab = data.selectedTab; this.selectedType = data.selectedType; - + this.selectedDayType = 'Weeks'; this.selectedDateValue = this.dateRangeFilter?.counts?.[0]; this.selectedDateFilter = `${this.selectedDateValue} ${this.selectedDayType}`; - + if (this.selectedType.toLowerCase() === 'kanban') { this.kanban = true; @@ -409,7 +410,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { } if (event && !event['additional_level'] && event?.length) { // && Object.keys(event[0]).length) { - + this.selectedDayType = 'Weeks'; this.selectedDateValue = this.dateRangeFilter?.counts?.[0]; this.selectedDateFilter = `${this.selectedDateValue} ${this.selectedDayType}`; @@ -501,7 +502,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { } else { this.additionalData = false; } - + this.filterApplyData['sprintIncluded'] = this.selectedTab?.toLowerCase() == 'iteration' ? ['CLOSED', 'ACTIVE'] : ['CLOSED']; if (this.filterDataArr[this.selectedType]) { // Promise.resolve(() => { @@ -535,6 +536,10 @@ export class FilterNewComponent implements OnInit, OnDestroy { this.handleAdditionalChange({ [key]: event['additional_level'][key] }) }); } + } else if (!event.length) { + if (this.primaryFilterConfig['defaultLevel'].labelName.toLowerCase() === 'sprint') { + this.noSprint = true; + } } if (this.filterDataArr && this.filterDataArr?.[this.selectedType] && this.filterDataArr[this.selectedType]?.['sprint'] && event && event[0]?.labelName === 'project') { @@ -543,6 +548,7 @@ export class FilterNewComponent implements OnInit, OnDestroy { if (currentProjectSprints?.length) { currentProjectSprints.sort((a, b) => new Date(a.sprintEndDate).getTime() - new Date(b.sprintEndDate).getTime()); this.service.setSprintForRnR(currentProjectSprints[currentProjectSprints?.length - 1]) + this.noSprint = false; } } this.compileGAData(event); diff --git a/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.html b/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.html index 59036cb469..98ace2df7b 100644 --- a/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.html +++ b/UI/src/app/dashboardv2/filter-v2/primary-filter/primary-filter.component.html @@ -29,7 +29,7 @@ placeholder="Select" optionLabel="nodeName" [style]="{'width':'300px', 'max-width': '100%', 'height': '40px'}" (onChange)="applyPrimaryFilters($event)" [panelStyle]="{ 'min-width': 'min(100vw, 400px)' }" [appendTo]="filterDiv" - [filter]="true"> + [filter]="true" [hidden]="selectedTab === 'iteration'">
    {{ selectedFilters[0].nodeName }} @@ -44,7 +44,7 @@
    -