-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4156 from whisperity/feat/show-zero-checkers/patc…
…h-frontend feat(gui): Checker status auditing
- Loading branch information
Showing
16 changed files
with
842 additions
and
46 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
web/server/vue-cli/src/components/AnalysisInfo/Checker.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<v-row | ||
no-gutters | ||
align="center" | ||
> | ||
<v-col | ||
cols="auto" | ||
> | ||
<analyzer-statistics-icon | ||
class="mr-2" | ||
:value="(enabled ? 'successful' : 'failed')" | ||
:title="'\'' + name + '\' ' + (enabled ? 'was' : 'was not') + | ||
' enabled in this analysis.'" | ||
/> | ||
</v-col> | ||
<v-col | ||
:class="'pr-1 checker-name ' + | ||
(enabled ? 'checker-enabled' : 'checker-disabled')" | ||
> | ||
{{ name }} | ||
</v-col> | ||
</v-row> | ||
</template> | ||
|
||
<script> | ||
import { AnalyzerStatisticsIcon } from "@/components/Icons"; | ||
export default { | ||
name: "Checker", | ||
components: { | ||
AnalyzerStatisticsIcon | ||
}, | ||
props: { | ||
name: { type: String, required: true }, | ||
enabled: { type: Boolean, required: true } | ||
} | ||
}; | ||
</script> | ||
<style lang="scss" scoped> | ||
.analysis-info { | ||
.checker-name { | ||
font-family: monospace; | ||
font-weight: normal; | ||
} | ||
.checker-name.checker-enabled { | ||
color: black; | ||
} | ||
.checker-name.checker-disabled { | ||
color: black; | ||
} | ||
} | ||
</style> |
126 changes: 126 additions & 0 deletions
126
web/server/vue-cli/src/components/AnalysisInfo/CheckerGroup.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<template> | ||
<v-expansion-panel> | ||
<v-expansion-panel-header | ||
class="pa-0 px-1" | ||
> | ||
<v-row | ||
no-gutters | ||
align="center" | ||
> | ||
<v-col cols="auto"> | ||
<v-chip | ||
class="mr-1 pa-1" | ||
:color="groupWideStatus" | ||
:ripple="false" | ||
:title="'Group \'' + group + '\' was' + | ||
(needDetailedCounts ? ' partially' : | ||
(groupEnabled ? '' : ' not') | ||
) + | ||
' enabled in this analysis'" | ||
outlined | ||
dark | ||
small | ||
> | ||
<v-icon | ||
v-if="!needDetailedCounts && groupEnabled" | ||
start | ||
> | ||
mdi-check | ||
</v-icon> | ||
<v-icon | ||
v-else-if="!needDetailedCounts && !groupEnabled" | ||
start | ||
> | ||
mdi-close | ||
</v-icon> | ||
<v-icon | ||
v-else-if="needDetailedCounts" | ||
start | ||
> | ||
mdi-tune | ||
</v-icon> | ||
</v-chip> | ||
</v-col> | ||
<v-col | ||
cols="auto" | ||
class="pl-2 checker-group-name primary--text" | ||
> | ||
{{ group }} | ||
</v-col> | ||
<v-col cols="auto"> | ||
<count-chips | ||
v-if="needDetailedCounts" | ||
:num-good="counts[CountKeys.Enabled]" | ||
:num-bad="counts[CountKeys.Disabled]" | ||
:num-total="counts[CountKeys.Total]" | ||
:good-text="'Number of checkers enabled (executed)'" | ||
:bad-text="'Number of checkers disabled (not executed)'" | ||
:total-text="'Number of checkers available'" | ||
:simplify-showing-if-all="true" | ||
:show-total="true" | ||
:show-dividers="false" | ||
:show-zero-chips="false" | ||
class="pl-4" | ||
/> | ||
</v-col> | ||
</v-row> | ||
</v-expansion-panel-header> | ||
<v-expansion-panel-content> | ||
<checker-rows | ||
:checkers="checkers" | ||
/> | ||
</v-expansion-panel-content> | ||
</v-expansion-panel> | ||
</template> | ||
|
||
<script> | ||
import CountChips from "@/components/CountChips"; | ||
import CheckerRows from "./CheckerRows"; | ||
import { CountKeys } from "@/mixins/analysis-info-handling.mixin"; | ||
export default { | ||
name: "CheckerGroup", | ||
components: { | ||
CheckerRows, | ||
CountChips, | ||
}, | ||
props: { | ||
group: { type: String, required: true }, | ||
checkers: { type: Array, required: true }, | ||
counts: { type: Array, required: true } | ||
}, | ||
computed: { | ||
numEnabled() { | ||
return this.counts[this.CountKeys.Enabled]; | ||
}, | ||
numDisabled() { | ||
return this.counts[this.CountKeys.Disabled]; | ||
}, | ||
needDetailedCounts() { | ||
return this.numEnabled > 0 && this.numDisabled > 0; | ||
}, | ||
groupWideStatus() { | ||
if (this.numEnabled > 0 && this.numDisabled === 0) | ||
return "success"; | ||
if (this.numEnabled === 0 && this.numDisabled > 0) | ||
return "error"; | ||
return "grey darken-1"; | ||
}, | ||
groupEnabled() { | ||
return this.groupWideStatus === "success"; | ||
}, | ||
CountKeys() { | ||
return CountKeys; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.analysis-info .checker-group-name { | ||
font-family: monospace; | ||
font-size: 112.5%; | ||
font-style: italic; | ||
font-weight: medium; | ||
} | ||
</style> |
32 changes: 32 additions & 0 deletions
32
web/server/vue-cli/src/components/AnalysisInfo/CheckerRows.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<template> | ||
<v-container | ||
class="analysis-info-checker-rows-in-columns" | ||
> | ||
<checker | ||
v-for="(checker, idx) in checkers" | ||
:key="idx" | ||
:name="checker[0]" | ||
:enabled="checker[1].enabled" | ||
/> | ||
</v-container> | ||
</template> | ||
|
||
<script> | ||
import Checker from "./Checker"; | ||
export default { | ||
name: "CheckerRows", | ||
components: { | ||
Checker | ||
}, | ||
props: { | ||
checkers: { type: Array, required: true } | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.analysis-info .analysis-info-checker-rows-in-columns { | ||
columns: 32em auto; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Checker from "./Checker"; | ||
import CheckerGroup from "./CheckerGroup"; | ||
import CheckerRows from "./CheckerRows"; | ||
|
||
export { | ||
Checker, | ||
CheckerGroup, | ||
CheckerRows | ||
}; |
Oops, something went wrong.