From ac20953fbbd053498ce4c8c9068d3bd88e10a635 Mon Sep 17 00:00:00 2001 From: sena Date: Tue, 14 May 2024 08:54:15 +0200 Subject: [PATCH 1/8] added class filter for threads view --- .../app/src/components/threads/threads.html | 17 ++- .../app/src/components/threads/threads.ts | 111 ++++++++++++------ 2 files changed, 89 insertions(+), 39 deletions(-) diff --git a/report-ng/app/src/components/threads/threads.html b/report-ng/app/src/components/threads/threads.html index 3822f44f4..1e1c55370 100644 --- a/report-ng/app/src/components/threads/threads.html +++ b/report-ng/app/src/components/threads/threads.html @@ -40,7 +40,22 @@ - + + + + (All) + ${classStatistic.classIdentifier|className:1} + + + +
{ this._selectedStatus = this._statusConverter.getStatusForClass(params.status); await new Promise(f => setTimeout(f, 200)); - this._zoomInOnMethodsWithStatus(this._statusConverter.getStatusForClass(params.status)); + this._zoomInOnFilter(this._statusConverter.getStatusForClass(params.status), 7); })(); } else { this._selectedStatus = null; } + + if (this.queryParams.class || params.class) { + (async () => { + this._selectedClass = params.class; + await new Promise(f => setTimeout(f, 200)); + this._zoomInOnFilter(params.class, 8); + })(); + } } attached() { this._statisticsGenerator.getExecutionStatistics().then(executionStatistics => { + this._executionStatistics = executionStatistics; this._availableStatuses = []; this._availableStatuses = executionStatistics.availableStatuses; this._initDateFormatter(); @@ -119,8 +132,12 @@ export class Threads extends AbstractViewModel { this._suppressMethodFilter = true; this._selectedStatus = undefined; } + if (this._selectedClass != null) { + this._suppressMethodFilter = true; + this._selectedClass = undefined; + } this._resetColor(); - this._zoomInOnMethod(methodId); + this._zoomInOnFilter(methodId, 6); this.updateUrl({methodId: methodId}); } else if (filter?.length > 0) { this._searchRegexp = this._statusConverter.createRegexpFromSearchString(filter); @@ -167,15 +184,49 @@ export class Threads extends AbstractViewModel { this._suppressMethodFilter = false; return; } - if (this._filterActive) { - this._resetColor(); - } - if (this._selectedStatus > 0) { - this._zoomInOnMethodsWithStatus(); + if(this._selectedStatus){ + if (this._filterActive) { + this._resetColor(); + } + + this._zoomInOnFilter(this._selectedStatus, 7) this.updateUrl({status: this._statusConverter.getClassForStatus(this._selectedStatus)}); - } else { + + // make sure that filters are not combined + this._inputValue = ""; + this._selectedClass = undefined; + + } + // prevent overwriting of method and status filter when _selectedStatus is set undefined by their observers + else if (!this._selectedClass && !this._inputValue) { + this._resetZoom(); + this.queryParams = {}; + } + + } + + private _classChanged() { + if (this._suppressMethodFilter) { + this._suppressMethodFilter = false; + return; + } + if(this._selectedClass){ + if (this._filterActive) { + this._resetColor(); + } + + this._zoomInOnFilter(this._selectedClass, 8) + this.updateUrl({class: this._selectedClass}); + + // make sure that filters are not combined + this._selectedStatus = undefined; + this._inputValue = ""; + + } + // prevent overwriting of method and status filter when _selectedStatus is set undefined by their observers + else if (!this._selectedStatus && !this._inputValue) { this._resetZoom(); - this.updateUrl({}); + this.queryParams = {}; } } @@ -190,37 +241,15 @@ export class Threads extends AbstractViewModel { }); } - private _zoomInOnMethod(methodId: string) { + private _zoomInOnFilter(filter: any, valueIndex: number) { this._resetColor(); - const dataToZoomInOn = this._options.series[0].data.find(function (method) { - return method.value[6] == methodId; - }); - const zoomStart = dataToZoomInOn.value[1]; - const zoomEnd = dataToZoomInOn.value[2]; const opacity = this._opacityOfInactiveElements; - - this._options.series[0].data.forEach(function (value) { - const mid = value.value[6]; - if (mid != methodId) { - value.itemStyle.normal.opacity = opacity; - } - }); - this._chart.setOption(this._options); - this._zoom(zoomStart, zoomEnd); - } - - private _zoomInOnMethodsWithStatus(status?: data.ResultStatusType) { - const opacity = this._opacityOfInactiveElements; - let selectedStat = this._selectedStatus; let startTimes: number[] = []; let endTimes: number[] = []; - if (status) { - selectedStat = status; - } this._options.series[0].data.forEach(function (value) { - const stat = value.value[7]; - if (stat != selectedStat) { + const criterion = value.value[valueIndex]; + if (criterion != filter) { value.itemStyle.normal.opacity = opacity; } else { startTimes.push(value.value[1]); @@ -311,6 +340,9 @@ export class Threads extends AbstractViewModel { const itemColor = style.get(context.resultStatus); const duration = context.contextValues.endTime - context.contextValues.startTime; + const classId = executionStatistics.classStatistics.find(classStat => { + return classStat.classContext.contextValues.id == context.classContextId; + }).classIdentifier; data.push({ name: context.contextValues.name, @@ -322,7 +354,8 @@ export class Threads extends AbstractViewModel { duration, context.methodRunIndex, context.contextValues.id, - context.resultStatus + context.resultStatus, + classId ], itemStyle: { normal: { @@ -338,6 +371,7 @@ export class Threads extends AbstractViewModel { const sliderFromTop = gridHeight + this._sliderSpacingFromChart const dateFormatter = this._dateFormatter; const durationFormatter = this._durationFormatter; + const classNameFormatter = this._classNameValueConverter; this._cardHeight = sliderFromTop + 60; // 60px space for dataZoom-slider // Set gridLeftValue dynamically to the longest thread name @@ -356,7 +390,8 @@ export class Threads extends AbstractViewModel { params.color + ';"> ' + params.name + ' (' + params.value[5] + ')' + '
' + '
Start time: ' + dateFormatter.toView(params.value[1], 'full') + '
End time: ' + dateFormatter.toView(params.value[2], 'full') - + '
Duration: ' + durationFormatter.toView(params.value[4]); + + '
Duration: ' + durationFormatter.toView(params.value[4]) + + '
Class: ' + classNameFormatter.toView(params.value[8], ClassName.simpleName); } }, dataZoom: [ From 27ef46f3f47b374de5d450c7b41b9374c55e7db0 Mon Sep 17 00:00:00 2001 From: sena Date: Tue, 21 May 2024 11:04:00 +0200 Subject: [PATCH 2/8] use queryparams instead of extra variables --- .../app/src/components/threads/threads.html | 10 ++- .../app/src/components/threads/threads.ts | 86 +++++++++++-------- report-ng/app/src/styles/mdc.scss | 4 +- 3 files changed, 58 insertions(+), 42 deletions(-) diff --git a/report-ng/app/src/components/threads/threads.html b/report-ng/app/src/components/threads/threads.html index 1e1c55370..5b929016d 100644 --- a/report-ng/app/src/components/threads/threads.html +++ b/report-ng/app/src/components/threads/threads.html @@ -25,10 +25,11 @@ (All) @@ -42,10 +43,11 @@ (All) @@ -64,7 +66,11 @@ class="w100" value.bind="_inputValue" input.delegate="_selectionChanged()" + disabled.bind="queryParams.status || queryParams.class || _suppressMethodFilter" > + { - this._selectedStatus = this._statusConverter.getStatusForClass(params.status); - await new Promise(f => setTimeout(f, 200)); - this._zoomInOnFilter(this._statusConverter.getStatusForClass(params.status), 7); - })(); - } else { - this._selectedStatus = null; - } - - if (this.queryParams.class || params.class) { - (async () => { - this._selectedClass = params.class; - await new Promise(f => setTimeout(f, 200)); - this._zoomInOnFilter(params.class, 8); - })(); - } - } - - attached() { this._statisticsGenerator.getExecutionStatistics().then(executionStatistics => { this._executionStatistics = executionStatistics; this._availableStatuses = []; @@ -114,6 +93,18 @@ export class Threads extends AbstractViewModel { this._initDurationFormatter(); this._prepareTimeline(executionStatistics); this._initialChartLoading = false; + + }).finally(() => { + + if (params.status) { + this._zoomInOnFilter(this._statusConverter.getStatusForClass(params.status), 7); + } else { + delete this.queryParams.status + } + + if (params.class) { + this._zoomInOnFilter(params.class, 8); + } }); }; @@ -128,13 +119,13 @@ export class Threads extends AbstractViewModel { methodContexts = [executionStatistics.executionAggregate.methodContexts[methodId]]; this._searchRegexp = null; delete this.queryParams.methodName; - if (this._selectedStatus != null) { + if (this.queryParams.status != null) { this._suppressMethodFilter = true; - this._selectedStatus = undefined; + delete this.queryParams.status } - if (this._selectedClass != null) { + if (this.queryParams.class != null) { this._suppressMethodFilter = true; - this._selectedClass = undefined; + delete this.queryParams.class } this._resetColor(); this._zoomInOnFilter(methodId, 6); @@ -153,7 +144,6 @@ export class Threads extends AbstractViewModel { name: methodContext.contextValues.name + " (" + methodContext.methodRunIndex + ")" }); } - return methodInfo.sort(function (a, b) { if (a.name < b.name) { return -1; @@ -173,7 +163,7 @@ export class Threads extends AbstractViewModel { private _selectionChanged() { if (this._inputValue.length == 0) { this._searchRegexp = null; - if (this._filterActive && this._selectedStatus == null) { + if (this._filterActive && this.queryParams.status == null && this.queryParams.class == null) { this._resetZoom(); } } @@ -184,24 +174,31 @@ export class Threads extends AbstractViewModel { this._suppressMethodFilter = false; return; } - if(this._selectedStatus){ + if(this.queryParams.status){ if (this._filterActive) { this._resetColor(); } - this._zoomInOnFilter(this._selectedStatus, 7) - this.updateUrl({status: this._statusConverter.getClassForStatus(this._selectedStatus)}); + this._zoomInOnFilter(this.queryParams.status, 7) + this.updateUrl({status: this._statusConverter.getClassForStatus(this.queryParams.status)}); // make sure that filters are not combined this._inputValue = ""; - this._selectedClass = undefined; + delete this.queryParams.class } // prevent overwriting of method and status filter when _selectedStatus is set undefined by their observers - else if (!this._selectedClass && !this._inputValue) { + else if (!this.queryParams.class && !this._inputValue) { this._resetZoom(); this.queryParams = {}; } + console.log("queryparams(status)", this.queryParams) + if(this.queryParams.status){ + console.log("log: status") + } + if(this.queryParams.class){ + console.log("log: class") + } } @@ -210,24 +207,25 @@ export class Threads extends AbstractViewModel { this._suppressMethodFilter = false; return; } - if(this._selectedClass){ + if(this.queryParams.class){ if (this._filterActive) { this._resetColor(); } - this._zoomInOnFilter(this._selectedClass, 8) - this.updateUrl({class: this._selectedClass}); + this._zoomInOnFilter(this.queryParams.class, 8) + this.updateUrl({class: this.queryParams.class}); // make sure that filters are not combined - this._selectedStatus = undefined; + delete this.queryParams.status this._inputValue = ""; } // prevent overwriting of method and status filter when _selectedStatus is set undefined by their observers - else if (!this._selectedStatus && !this._inputValue) { + else if (!this.queryParams.status && !this._inputValue) { this._resetZoom(); this.queryParams = {}; } + console.log("queryparams(class)", this.queryParams) } private _zoom(zoomStart: number, zoomEnd: number) { @@ -473,4 +471,16 @@ export class Threads extends AbstractViewModel { private _handleClickEvent(event: echarts.ECElementEvent) { this._router.navigateToRoute('method', {methodId: event.value[6]}) } + + private _removeMethodFilter(){ + delete this.queryParams.methodId; + this._inputValue = ""; + + this._searchRegexp = null; + if (this._filterActive && this.queryParams.status == null && this.queryParams.class == null) { + this._resetZoom(); + } + this._getLookupOptions("", "") + console.log("queryParams (remove)", this.queryParams) + } } diff --git a/report-ng/app/src/styles/mdc.scss b/report-ng/app/src/styles/mdc.scss index f89a5db2f..bce6d459b 100644 --- a/report-ng/app/src/styles/mdc.scss +++ b/report-ng/app/src/styles/mdc.scss @@ -25,8 +25,8 @@ $on-primary: #ffffff, $on-secondary: #ffffff, ); -//@use '@material/button/mdc-button'; -//@use '@material/button'; +@use '@material/button/mdc-button'; +@use '@material/button'; @use '@material/card/mdc-card'; @use '@material/card'; @use '@material/checkbox'; From 05b7f6c5973b2190aebbe9f9098d7a85f4d91183 Mon Sep 17 00:00:00 2001 From: sena Date: Mon, 27 May 2024 10:51:28 +0200 Subject: [PATCH 3/8] removed method filter deletion button --- .../app/src/components/threads/threads.html | 5 +---- .../app/src/components/threads/threads.ts | 22 ------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/report-ng/app/src/components/threads/threads.html b/report-ng/app/src/components/threads/threads.html index 5b929016d..ee5ada20b 100644 --- a/report-ng/app/src/components/threads/threads.html +++ b/report-ng/app/src/components/threads/threads.html @@ -66,11 +66,8 @@ class="w100" value.bind="_inputValue" input.delegate="_selectionChanged()" - disabled.bind="queryParams.status || queryParams.class || _suppressMethodFilter" + disabled.bind="queryParams.status || queryParams.class" > - { @@ -192,14 +191,6 @@ export class Threads extends AbstractViewModel { this._resetZoom(); this.queryParams = {}; } - console.log("queryparams(status)", this.queryParams) - if(this.queryParams.status){ - console.log("log: status") - } - if(this.queryParams.class){ - console.log("log: class") - } - } private _classChanged() { @@ -225,7 +216,6 @@ export class Threads extends AbstractViewModel { this._resetZoom(); this.queryParams = {}; } - console.log("queryparams(class)", this.queryParams) } private _zoom(zoomStart: number, zoomEnd: number) { @@ -471,16 +461,4 @@ export class Threads extends AbstractViewModel { private _handleClickEvent(event: echarts.ECElementEvent) { this._router.navigateToRoute('method', {methodId: event.value[6]}) } - - private _removeMethodFilter(){ - delete this.queryParams.methodId; - this._inputValue = ""; - - this._searchRegexp = null; - if (this._filterActive && this.queryParams.status == null && this.queryParams.class == null) { - this._resetZoom(); - } - this._getLookupOptions("", "") - console.log("queryParams (remove)", this.queryParams) - } } From 387eb819b4b7c24483d1525e0720b5b9a1fe8be6 Mon Sep 17 00:00:00 2001 From: sena Date: Tue, 28 May 2024 11:23:40 +0200 Subject: [PATCH 4/8] intialize chart in attached(), use extra variables for filters --- .../app/src/components/threads/threads.html | 10 +-- .../app/src/components/threads/threads.ts | 87 +++++++++---------- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/report-ng/app/src/components/threads/threads.html b/report-ng/app/src/components/threads/threads.html index ee5ada20b..ab50c5b0b 100644 --- a/report-ng/app/src/components/threads/threads.html +++ b/report-ng/app/src/components/threads/threads.html @@ -25,11 +25,11 @@ (All) @@ -43,11 +43,11 @@ (All) @@ -66,7 +66,7 @@ class="w100" value.bind="_inputValue" input.delegate="_selectionChanged()" - disabled.bind="queryParams.status || queryParams.class" + disabled.bind="_selectedStatus || _selectedClass || queryParams.status || queryParams.class" > diff --git a/report-ng/app/src/components/threads/threads.ts b/report-ng/app/src/components/threads/threads.ts index f40db732c..25cf7ce71 100644 --- a/report-ng/app/src/components/threads/threads.ts +++ b/report-ng/app/src/components/threads/threads.ts @@ -51,10 +51,11 @@ export class Threads extends AbstractViewModel { private _searchRegexp: RegExp; private _inputValue; private _availableStatuses: data.ResultStatusType[] | number[]; + private _selectedStatus: data.ResultStatusType; + private _selectedClass: string; private _executionStatistics: ExecutionStatistics; private _initialChartLoading = true; private _filterActive = false; // To prevent unnecessary method calls - private _suppressMethodFilter = false; // To prevent conflict between method filter and status filter private _options: EChartsOption; @observable() private _chart: echarts.ECharts; @@ -80,10 +81,7 @@ export class Threads extends AbstractViewModel { super(); } - activate(params: any, routeConfig: RouteConfig, navInstruction: NavigationInstruction) { - super.activate(params, routeConfig, navInstruction); - this._router = navInstruction.router; - + attached() { this._statisticsGenerator.getExecutionStatistics().then(executionStatistics => { this._executionStatistics = executionStatistics; this._availableStatuses = []; @@ -92,19 +90,32 @@ export class Threads extends AbstractViewModel { this._initDurationFormatter(); this._prepareTimeline(executionStatistics); this._initialChartLoading = false; + }); + }; - }).finally(() => { + activate(params: any, routeConfig: RouteConfig, navInstruction: NavigationInstruction) { + super.activate(params, routeConfig, navInstruction); + this._router = navInstruction.router; - if (params.status) { + if (this.queryParams.status || params.status) { + (async () => { + this._selectedStatus = this._statusConverter.getStatusForClass(params.status); + await new Promise(f => setTimeout(f, 200)); this._zoomInOnFilter(this._statusConverter.getStatusForClass(params.status), 7); - } else { - delete this.queryParams.status - } + })(); + } else { + this._selectedStatus = null; + } - if (params.class) { + if (this.queryParams.class || params.class) { + (async () => { + this._selectedClass = params.class; + await new Promise(f => setTimeout(f, 200)); this._zoomInOnFilter(params.class, 8); - } - }); + })(); + } else { + this._selectedClass = null; + } }; private _getLookupOptions = async (filter: string, methodId: string): Promise => { @@ -118,12 +129,12 @@ export class Threads extends AbstractViewModel { methodContexts = [executionStatistics.executionAggregate.methodContexts[methodId]]; this._searchRegexp = null; delete this.queryParams.methodName; - if (this.queryParams.status != null) { - this._suppressMethodFilter = true; + if (this._selectedStatus != null) { + this._selectedStatus = null; delete this.queryParams.status } - if (this.queryParams.class != null) { - this._suppressMethodFilter = true; + if (this._selectedClass != null) { + this._selectedClass = null; delete this.queryParams.class } this._resetColor(); @@ -162,29 +173,20 @@ export class Threads extends AbstractViewModel { private _selectionChanged() { if (this._inputValue.length == 0) { this._searchRegexp = null; - if (this._filterActive && this.queryParams.status == null && this.queryParams.class == null) { + if (this._filterActive && this._selectedStatus == null && this._selectedClass == null) { this._resetZoom(); } } } private _statusChanged() { - if (this._suppressMethodFilter) { - this._suppressMethodFilter = false; - return; + if (this._filterActive) { + this._resetColor(); } - if(this.queryParams.status){ - if (this._filterActive) { - this._resetColor(); - } - - this._zoomInOnFilter(this.queryParams.status, 7) - this.updateUrl({status: this._statusConverter.getClassForStatus(this.queryParams.status)}); - - // make sure that filters are not combined - this._inputValue = ""; - delete this.queryParams.class + if(this._selectedStatus > 0){ + this._zoomInOnFilter(this._selectedStatus, 7) + this.updateUrl({status: this._statusConverter.getClassForStatus(this._selectedStatus)}); } // prevent overwriting of method and status filter when _selectedStatus is set undefined by their observers else if (!this.queryParams.class && !this._inputValue) { @@ -194,24 +196,15 @@ export class Threads extends AbstractViewModel { } private _classChanged() { - if (this._suppressMethodFilter) { - this._suppressMethodFilter = false; - return; + if (this._filterActive) { + this._resetColor(); } - if(this.queryParams.class){ - if (this._filterActive) { - this._resetColor(); - } - - this._zoomInOnFilter(this.queryParams.class, 8) - this.updateUrl({class: this.queryParams.class}); - - // make sure that filters are not combined - delete this.queryParams.status - this._inputValue = ""; + if(this._selectedClass){ + this._zoomInOnFilter(this._selectedClass, 8) + this.updateUrl({class: this._selectedClass}); } - // prevent overwriting of method and status filter when _selectedStatus is set undefined by their observers + // prevent overwriting of method and class filter when _selectedClass is set undefined by their observers else if (!this.queryParams.status && !this._inputValue) { this._resetZoom(); this.queryParams = {}; From 80d4c52ac9ce2111ce7f7ece99b0c831e813409e Mon Sep 17 00:00:00 2001 From: sena Date: Mon, 3 Jun 2024 12:31:39 +0200 Subject: [PATCH 5/8] fix class filter functionality --- report-ng/app/src/components/threads/threads.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/report-ng/app/src/components/threads/threads.ts b/report-ng/app/src/components/threads/threads.ts index 25cf7ce71..a49d498b5 100644 --- a/report-ng/app/src/components/threads/threads.ts +++ b/report-ng/app/src/components/threads/threads.ts @@ -322,8 +322,11 @@ export class Threads extends AbstractViewModel { const itemColor = style.get(context.resultStatus); const duration = context.contextValues.endTime - context.contextValues.startTime; const classId = executionStatistics.classStatistics.find(classStat => { - return classStat.classContext.contextValues.id == context.classContextId; - }).classIdentifier; + const classContextIds = classStat.methodContexts + .map(con => con.classContextId) + .filter((value, index, self) => self.indexOf(value) === index); + return classContextIds.includes(context.classContextId); + }).classIdentifier data.push({ name: context.contextValues.name, From 527a2ae79ead5b78a8b1d6bdba2199dc2594b00b Mon Sep 17 00:00:00 2001 From: sena Date: Mon, 10 Jun 2024 08:47:47 +0200 Subject: [PATCH 6/8] fixed filter selection after refreshing page --- report-ng/app/src/components/threads/threads.html | 2 ++ report-ng/app/src/components/threads/threads.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/report-ng/app/src/components/threads/threads.html b/report-ng/app/src/components/threads/threads.html index ab50c5b0b..3673c15b7 100644 --- a/report-ng/app/src/components/threads/threads.html +++ b/report-ng/app/src/components/threads/threads.html @@ -25,6 +25,7 @@ setTimeout(f, 200)); this._zoomInOnFilter(this._statusConverter.getStatusForClass(params.status), 7); + this.statusSelect.value = this._statusConverter.normalizeStatus(this._statusConverter.getStatusForClass(this.queryParams.status)).toString(); // necessary to keep selection after refreshing the page })(); } else { this._selectedStatus = null; @@ -112,6 +116,7 @@ export class Threads extends AbstractViewModel { this._selectedClass = params.class; await new Promise(f => setTimeout(f, 200)); this._zoomInOnFilter(params.class, 8); + this.classSelect.value = this._executionStatistics.classStatistics.find(classStat => classStat.classIdentifier == this.queryParams.class).classIdentifier; // necessary to keep selection after refreshing the page })(); } else { this._selectedClass = null; From f89d6b889bb34604ee5df4613be57972817ded9c Mon Sep 17 00:00:00 2001 From: sena Date: Mon, 10 Jun 2024 09:17:49 +0200 Subject: [PATCH 7/8] implemented PR feedback --- .../app/src/components/threads/threads.ts | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/report-ng/app/src/components/threads/threads.ts b/report-ng/app/src/components/threads/threads.ts index 3aeedcaa6..8c6e39dff 100644 --- a/report-ng/app/src/components/threads/threads.ts +++ b/report-ng/app/src/components/threads/threads.ts @@ -100,25 +100,24 @@ export class Threads extends AbstractViewModel { super.activate(params, routeConfig, navInstruction); this._router = navInstruction.router; + const self = this if (this.queryParams.status || params.status) { - (async () => { - this._selectedStatus = this._statusConverter.getStatusForClass(params.status); - await new Promise(f => setTimeout(f, 200)); - this._zoomInOnFilter(this._statusConverter.getStatusForClass(params.status), 7); - this.statusSelect.value = this._statusConverter.normalizeStatus(this._statusConverter.getStatusForClass(this.queryParams.status)).toString(); // necessary to keep selection after refreshing the page - })(); - } else { + window.setTimeout(() => { + self._selectedStatus = self._statusConverter.getStatusForClass(params.status); + self._zoomInOnFilter(self._statusConverter.getStatusForClass(params.status), 7) + self.statusSelect.value = self._statusConverter.normalizeStatus(self._statusConverter.getStatusForClass(self.queryParams.status)).toString(); // necessary to keep selection after refreshing the page + }, 200) + } else { this._selectedStatus = null; } if (this.queryParams.class || params.class) { - (async () => { - this._selectedClass = params.class; - await new Promise(f => setTimeout(f, 200)); - this._zoomInOnFilter(params.class, 8); - this.classSelect.value = this._executionStatistics.classStatistics.find(classStat => classStat.classIdentifier == this.queryParams.class).classIdentifier; // necessary to keep selection after refreshing the page - })(); - } else { + window.setTimeout(() => { + self._selectedClass = params.class; + self._zoomInOnFilter(params.class, 8); + self.classSelect.value = self._executionStatistics.classStatistics.find(classStat => classStat.classIdentifier == self.queryParams.class).classIdentifier; // necessary to keep selection after refreshing the page + }, 200) + } else { this._selectedClass = null; } }; From b5da8d4acc28b82dc3eeb4090c78bc81ddc5e5af Mon Sep 17 00:00:00 2001 From: sena Date: Mon, 10 Jun 2024 10:04:06 +0200 Subject: [PATCH 8/8] sorted class filter list --- report-ng/app/src/components/threads/threads.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/report-ng/app/src/components/threads/threads.ts b/report-ng/app/src/components/threads/threads.ts index 8c6e39dff..e94580da1 100644 --- a/report-ng/app/src/components/threads/threads.ts +++ b/report-ng/app/src/components/threads/threads.ts @@ -87,6 +87,7 @@ export class Threads extends AbstractViewModel { attached() { this._statisticsGenerator.getExecutionStatistics().then(executionStatistics => { this._executionStatistics = executionStatistics; + this._executionStatistics.classStatistics.sort((a, b) => this._classNameValueConverter.toView(a.classIdentifier, 1).localeCompare(this._classNameValueConverter.toView(b.classIdentifier, 1))) this._availableStatuses = []; this._availableStatuses = executionStatistics.availableStatuses; this._initDateFormatter();