Skip to content
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
5 changes: 2 additions & 3 deletions web/server/vue-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/server/vue-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"jsplumb": "^2.15.6",
"lodash": "^4.17.21",
"marked": "^4.0.10",
"semver": "^5.7.1",
"splitpanes": "^2.3.8",
"vue": "^2.6.14",
"vue-chartjs": "^3.5.1",
Expand Down
54 changes: 54 additions & 0 deletions web/server/vue-cli/src/components/AnalysisInfo/Checker.vue
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 web/server/vue-cli/src/components/AnalysisInfo/CheckerGroup.vue
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 web/server/vue-cli/src/components/AnalysisInfo/CheckerRows.vue
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>
9 changes: 9 additions & 0 deletions web/server/vue-cli/src/components/AnalysisInfo/index.js
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
};
Loading