Bug #45351
mgr/dashboard: Filtering table throws error if data is undefined
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Found this while running e2e in my machine.
Didn't copy the logs from the e2e, but was able to reproduce it in unit tests:
TypeError: Cannot read property 'length' of undefined
745 |
746 | subSearch(data: any[], currentSearch: string[], columns: CdTableColumn[]): any[] {
> 747 | if (currentSearch.length === 0 || data.length === 0) {
| ^
748 | return data;
749 | }
750 | const searchTerms: string[] = currentSearch.pop().replace(/\+/g, ' ').split(':');
at TableComponent.Object.<anonymous>.TableComponent.subSearch (src/app/shared/datatable/table/table.component.ts:747:44)
at TableComponent.Object.<anonymous>.TableComponent.updateFilter (src/app/shared/datatable/table/table.component.ts:738:19)
at src/app/shared/datatable/table/table.component.spec.ts:431:17
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:391:26)
at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/proxy.js:129:39)
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:390:52)
at Zone.Object.<anonymous>.Zone.run (node_modules/zone.js/dist/zone.js:150:43)
Related issues
History
#1 Updated by Tiago Melo almost 4 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 34867
#2 Updated by Lenz Grimmer almost 4 years ago
- Status changed from Fix Under Review to Pending Backport
- Target version set to v16.0.0
#3 Updated by Nathan Cutler almost 4 years ago
- Copied to Backport #45362: octopus: mgr/dashboard: Filtering table throws error if data is undefined added
#4 Updated by Tiago Melo almost 4 years ago
- Status changed from Pending Backport to Resolved
- Backport deleted (
octopus)
Backport will be handled in https://tracker.ceph.com/issues/45315
#5 Updated by Ernesto Puerta almost 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 151 to Testing & QA