Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
webui-vue
/
6692e0c7f1f9761a2fc311f34e19af2b7f35f5e3
/
.
/
src
/
components
/
Mixins
/
TableSortMixin.js
blob: c09973506bb110d90f032fb1176305593101b607 [
file
] [
log
] [
blame
]
const
STATUS
=
[
'OK'
,
'Warning'
,
'Critical'
];
const
TableSortMixin
=
{
methods
:
{
sortStatus
(
a
,
b
,
key
)
{
return
STATUS
.
indexOf
(
a
[
key
])
-
STATUS
.
indexOf
(
b
[
key
]);
},
},
};
export
default
TableSortMixin
;