Project

General

Profile

Bug #45351

mgr/dashboard: Filtering table throws error if data is undefined

Added by Tiago Melo 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
dashboard/qa
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

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

Copied to mgr - Backport #45362: octopus: mgr/dashboard: Filtering table throws error if data is undefined Resolved

History

#1 Updated by Tiago Melo 9 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 34867

#2 Updated by Lenz Grimmer 9 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Target version set to v16.0.0

#3 Updated by Nathan Cutler 9 months ago

  • Copied to Backport #45362: octopus: mgr/dashboard: Filtering table throws error if data is undefined added

#4 Updated by Tiago Melo 9 months ago

  • Status changed from Pending Backport to Resolved
  • Backport deleted (octopus)

Backport will be handled in https://tracker.ceph.com/issues/45315

Also available in: Atom PDF