]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: support custom executing template in table cells
authorKiefer Chang <kiefer.chang@suse.com>
Wed, 28 Oct 2020 07:18:26 +0000 (15:18 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Mon, 16 Nov 2020 08:02:22 +0000 (16:02 +0800)
commit0f82322f15f183615a99814a6109156dcab9cc08
tree81ed98a65eddbf43697f224839fe1f501aeadcc1
parent07cba31a03a3a311940a5338944f11ad2c87b641
mgr/dashboard: support custom executing template in table cells

Now we can modify the style of a table that has an executing state
by providing a custom config when declaring columns: e.g.,

```
    this.columns = [
      {
        prop: 'id',
        name: $localize`ID`,
        flexGrow: 1,
        cellTransformation: CellTemplate.executing,
        customTemplateConfig: {
          valueClass: 'a',
          executingClass: 'b'
        }
      },
```

Which makes the cell value render with class `a` and the executing state
(e.g. (updating)) render with class `b`.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/enum/cell-template.enum.ts