Skip to content

Commit

Permalink
Show builds with warnings (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark committed Oct 13, 2023
1 parent 3f9afe5 commit dda5851
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
17 changes: 14 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<BuildList :list="failingKeyboards" :filter="filter" @show-error-pane="showErrors">
Builds Failing
</BuildList>
<BuildList :list="warningKeyboards" :filter="filter" @show-error-pane="showErrors">
Builds Warning
</BuildList>
<BuildList :list="passingKeyboards" :filter="filter" @show-error-pane="showErrors">
Builds Passing
</BuildList>
Expand All @@ -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)
Expand Down Expand Up @@ -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
}
</script>
Expand Down
9 changes: 8 additions & 1 deletion src/components/BuildListItem.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
class="build-list-item"
:class="keyboardItem.passed ? 'passed' : 'failed'"
:class="keyboardItem.passed ? (keyboardItem.warnings ? 'warning' : 'passed') : 'failed'"
:title="lastTestedTitle"
>
{{ vendorName }}
Expand Down Expand Up @@ -63,6 +63,13 @@ ${lastTested.toISOString()}`
background: #3f9c68;
}
.build-list-item.warning {
background: #be863b;
}
.build-list-item.warning:hover {
background: #cf973b;
}
.build-list-item.failed {
background: #b22222;
}
Expand Down

0 comments on commit dda5851

Please sign in to comment.