Skip to content

fix(GlLegend): Show dash on multiple empty cases

Miguel Rincon requested to merge fix-only-nan-data into master

What does this MR do?

Fixes first part of gitlab#228542 (closed).

Show en-dash when the series data array is not empty, but contains only NaN values.

In this case, we would see a dash (-) as in other empty cases.

Motivation

Turns out that certain Prometheus queries can give us entire series full of NaN values.

Which result in hundreds of errors:

Screen_Shot_2020-07-13_at_10.26.27_AM

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.
Edited by Miguel Rincon

Merge request reports