]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: support inline edit for datatable 64559/head
authorNizamudeen A <nia@redhat.com>
Thu, 17 Jul 2025 11:13:08 +0000 (16:43 +0530)
committerNizamudeen A <nia@redhat.com>
Fri, 19 Sep 2025 07:49:14 +0000 (13:19 +0530)
commitdf935c4065bd33ac0ec7a81060a6e99dde8f495d
tree3131d3ec6b1940b7eaa117a8645c7448b7e6088e
parent0d5b95e81274ef913d86479fac0e46ea84a3a33a
mgr/dashboard: support inline edit for datatable

adding a new celltransformation that will transform the cell to a form
control when you click on the edit button which is inside a cell.

Added a new CellTemplate `editing` which if set to a cell, then it'll
add the edit button. You can also add validators to the control by using
the `customTemplateConfig` like
```
customTemplateConfig: {
          validators: [Validators.required]
        }
```

Also using a `EditState` to keep track of the different cells I can edit
simultaneously in a single time.

Fixes: https://tracker.ceph.com/issues/72171
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts
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.scss
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/enum/cell-template.enum.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-table-editing.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/styles.scss
src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_index.scss
src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss [new file with mode: 0644]