Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show builds with warnings #50

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading