Yoshie Muranaka | 5918b48 | 2020-06-08 08:18:23 -0700 | [diff] [blame] | 1 | const STATUS = ['OK', 'Warning', 'Critical']; |
2 | |||||
3 | const TableSortMixin = { | ||||
4 | methods: { | ||||
5 | sortStatus(a, b, key) { | ||||
6 | return STATUS.indexOf(a[key]) - STATUS.indexOf(b[key]); | ||||
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 7 | }, |
8 | }, | ||||
Yoshie Muranaka | 5918b48 | 2020-06-08 08:18:23 -0700 | [diff] [blame] | 9 | }; |
10 | |||||
11 | export default TableSortMixin; |