diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-06-08 18:18:23 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-06-17 23:46:47 +0300 |
commit | 5918b48a0530a43a4dd9ee1a3f134846c948011e (patch) | |
tree | 6728686c82fa9cd31d1a8777d8acb65cd144f855 /src/components | |
parent | c687f101324f301de04e326b2937953a395a5fed (diff) | |
download | webui-vue-5918b48a0530a43a4dd9ee1a3f134846c948011e.tar.xz |
Add power supplies table to hardware status page
Adds items at /redfish/v1/Chassis/chassis/Power endpoint in
Power supplies table. Table is sortable and has a row expansion
to view details.
- Table sort mixin to reuse sort method for status values
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ib2953ad06be3fa25e9dbbbed34e37d09154431f5
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Mixins/TableSortMixin.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/components/Mixins/TableSortMixin.js b/src/components/Mixins/TableSortMixin.js new file mode 100644 index 00000000..7e988503 --- /dev/null +++ b/src/components/Mixins/TableSortMixin.js @@ -0,0 +1,11 @@ +const STATUS = ['OK', 'Warning', 'Critical']; + +const TableSortMixin = { + methods: { + sortStatus(a, b, key) { + return STATUS.indexOf(a[key]) - STATUS.indexOf(b[key]); + } + } +}; + +export default TableSortMixin; |