From dda58518b4843068b98c7dd62c8b16e10d917659 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 13 Oct 2023 17:25:55 +1100 Subject: [PATCH] Show builds with warnings (#50) --- src/App.vue | 17 ++++++++++++++--- src/components/BuildListItem.vue | 9 ++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index 693da09..41c506f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,9 @@ Builds Failing + + Builds Warning + Builds Passing @@ -33,6 +36,7 @@ const loadTime = ref('') const loadProgress = ref(0) const filter = ref('') const passingKeyboards = ref([]) +const warningKeyboards = ref([]) const failingKeyboards = ref([]) const errorLog = ref('') const errorLogLoading = ref(false) @@ -113,21 +117,28 @@ function binKeyboards() { (acc, value, key) => { let item = { passed: value.works, + warnings: value.warnings, key: key, lastTested: new Date(value.last_tested * 1000) } - if (value.works) { - acc.good.push(item) + if (item.passed) { + if (item.warnings) { + acc.warn.push(item) + } else { + acc.good.push(item) + } } else { acc.bad.push(item) } return acc }, - { good: [], bad: [] } + { good: [], warn: [], bad: [] } ) obj.good.sort(compareKeyboardNames) + obj.warn.sort(compareKeyboardNames) obj.bad.sort(compareKeyboardNames) passingKeyboards.value = obj.good + warningKeyboards.value = obj.warn failingKeyboards.value = obj.bad } diff --git a/src/components/BuildListItem.vue b/src/components/BuildListItem.vue index 59c9ea0..84e1d8c 100644 --- a/src/components/BuildListItem.vue +++ b/src/components/BuildListItem.vue @@ -1,7 +1,7 @@