Skip to content

[vuejs] Cache view: success rate column displayed as ×100 #24

@Terracosmos

Description

@Terracosmos

Symptom

On #/system/cache, the SUCCÈS / SUCCESS column shows values such as 3091%, 2473%, 2296%, 1794% — all far above 100%.

Reproduction

  1. Run app-ui + ligoj-api locally on feature/vuejs.
  2. Log in as ligoj-admin.
  3. Navigate to #/system/cache.
  4. Observe the SUCCÈS column.

Expected

A success rate is a value in [0, 100]. The column should show e.g. 30.91% (or 30.9%).

Actual

Values are 100x too large, e.g. 3091%. Looks like a percent formatter (Intl.NumberFormat({style:"percent"}) or a Vuetify filter) is applied to a raw percent number (e.g. 30.91) without dividing by 100 first, or applied to a hit-count divided by request-count expressed as a percent already.

Notes

  • Bug is reproduced on a clean checkout of feature/vuejs at HEAD 2f73197 (no local modification).
  • Likely fix: divide the input by 100 before passing to style:"percent", OR change the formatter to style:"decimal" and append % manually.

File

ui/src/views/SystemCacheView.vue — column definition for cell.success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions