Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<template>
<v-container
fluid
>
<v-row>
<v-col>
<v-container fluid>
<v-col>
<v-row class="ma-0 mb-4">
<h3
class="text-h5 text-primary mb-2"
class="text-h5 text-primary"
>
<v-btn
color="primary"
Expand All @@ -23,21 +21,17 @@
@click="fetchStatistics"
/>
</h3>
</v-col>
</v-row>

<v-row>
<v-col>
</v-row>
<v-row class="ma-0">
<checker-statistics-table
:items="baseStats.statistics.value"
:loading="loading"
/>

<unique-stat-warning
v-if="baseStats.reportFilter.value.isUnique"
/>
</v-col>
</v-row>
</v-row>
</v-col>
</v-container>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
:type="type"
:run-data="runData"
/>
<v-row>
<v-col>
<h3 class="title text-primary mb-2">
<v-col>
<v-row class="ma-0 mb-4">
<h3 class="title text-primary">
<v-btn
color="primary"
variant="outlined"
Expand Down Expand Up @@ -39,26 +39,32 @@
natively with <strong>CodeChecker 6.24</strong> and above.
</tooltip-help-icon>
</h3>
</v-col>
</v-row>
<v-row>
<v-col>
</v-row>
<v-row class="ma-0 mb-6">
<v-alert
icon="mdi-information"
class="mt-2"
>
In this statistics only the "Run / Tag Filter"
and the "Unique reports" are effective.
</v-alert>

<div v-if="!problematicRuns.length">
</v-row>
<v-row class="ma-0">
<v-col
v-if="!problematicRuns.length"
cols="12"
class="pa-0"
>
<checker-coverage-statistics-table
:items="statistics"
:loading="loading"
@enabled-click="showingRuns"
/>
</div>
<div v-else>
</v-col>
<v-col
v-else
cols="12"
class="pa-0"
>
<v-alert
v-if="noProperRun"
icon="mdi-alert"
Expand Down Expand Up @@ -102,9 +108,9 @@
:items="[]"
:loading="loading"
/>
</div>
</v-col>
</v-row>
</v-col>
</v-row>
</v-col>
</v-container>
</template>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<template>
<v-container fluid>
<v-row>
<v-col>
<h3
class="title text-primary mb-2"
>
<v-col>
<v-row class="ma-0 mb-4">
<h3 class="title text-primary">
<v-btn
color="primary"
variant="outlined"
Expand All @@ -21,19 +19,21 @@
@click="fetchStatistics"
/>
</h3>
</v-col>
</v-row>
<v-row>
<v-col>
<component-statistics-table
:items="statistics"
:loading="loading"
:filters="statisticsFilters"
/>

</v-row>
<v-row class="ma-0 mb-6">
<v-col
cols="12"
class="pa-0"
>
<component-statistics-table
:items="statistics"
:loading="loading"
:filters="statisticsFilters"
/>
</v-col>
<unique-stat-warning v-if="baseStats.reportFilter.value.isUnique" />
</v-col>
</v-row>
</v-row>
</v-col>
</v-container>
</template>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<template>
<v-container
fluid
>
<v-container fluid>
<statistics-dialog
v-if="type"
v-model="showRuns[type]"
:checker-name="selectedCheckerName"
:type="type"
:run-data="runData"
/>
<v-row>
<v-col>
<h3
class="title text-primary mb-2"
>
<v-col>
<v-row class="ma-0 mb-4">
<h3 class="title text-primary">
<v-btn
color="primary"
variant="outlined"
Expand Down Expand Up @@ -44,19 +40,21 @@
natively with <strong>CodeChecker 6.24</strong> and above.
</tooltip-help-icon>
</h3>
</v-col>
</v-row>
<v-row>
<v-col>
</v-row>
<v-row class="ma-0 mb-6">
<v-alert
icon="mdi-information"
class="mt-2"
>
In this statistics only the "Run / Tag Filter"
and the "Unique reports" are effective.
</v-alert>

<div v-if="!problematicRuns.length">
</v-row>
<v-row class="ma-0">
<v-col
v-if="!problematicRuns.length"
cols="12"
class="pa-0"
>
<v-row align="center">
<v-col cols="6">
<v-select
Expand Down Expand Up @@ -89,8 +87,12 @@
:loading="loading"
@enabled-click="showingRuns"
/>
</div>
<div v-else>
</v-col>
<v-col
v-else
cols="12"
class="pa-0"
>
<v-alert
v-if="noProperRun"
icon="mdi-alert"
Expand Down Expand Up @@ -134,9 +136,9 @@
:items="[]"
:loading="loading"
/>
</div>
</v-col>
</v-row>
</v-col>
</v-row>
</v-col>
</v-container>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
:items="itemsWithUuid"
:loading="loading"
:mobile-breakpoint="1000"
:item-class="getRowClass"
loading-text="Loading guideline statistics..."
no-data-text="No guideline statistics available"
item-key="uuid"
:sort-by="[{ key: 'checkers.severity', order: 'desc' }]"
:item-class="getRowClass"
no-data-text="No guideline statistics available"
@enabled-click="enabledClick"
/>
</template>
Expand All @@ -27,6 +27,33 @@ const props = defineProps({

const emit = defineEmits([ "enabled-click" ]);

function getNestedSortValue(checkers, prop) {
if (!checkers || checkers.length === 0) {
return prop === "name" ? "" : -1;
}

if (prop === "enabledInAllRuns") {
return checkers.reduce((max, current) =>
current.enabledRunLength > max.enabledRunLength ? current : max
).enabledRunLength;
}

return checkers.reduce((max, current) =>
current[prop] > max[prop] ? current : max
)[prop];
}

function checkersSortRaw(prop) {
return (a, b) => {
const aVal = getNestedSortValue(a.checkers, prop);
const bVal = getNestedSortValue(b.checkers, prop);

if (aVal < bVal) return -1;
if (aVal > bVal) return 1;
return 0;
};
}

const headers = [
{
title: "Guideline Name",
Expand All @@ -46,27 +73,32 @@ const headers = [
},
{
title: "Related Checker(s)",
key: "checkers.name"
key: "checkers.name",
sortRaw: checkersSortRaw("name")
},
{
title: "Checker Severity",
key: "checkers.severity",
align: "center"
align: "center",
sortRaw: checkersSortRaw("severity")
},
{
title: "Checker Status",
key: "checkers.enabledInAllRuns",
align: "center"
align: "center",
sortRaw: checkersSortRaw("enabledInAllRuns")
},
{
title: "Closed Reports",
key: "checkers.closed",
align: "center"
align: "center",
sortRaw: checkersSortRaw("closed")
},
{
title: "Outstanding Reports",
key: "checkers.outstanding",
align: "center"
align: "center",
sortRaw: checkersSortRaw("outstanding")
},
];

Expand All @@ -82,9 +114,9 @@ const tableHeaders = computed(function() {
if (!headers) return;

return headers.filter(_header => {
if (_header.value === "guidelineRuleTitle") {
if (_header.key === "guidelineRuleTitle") {
return hasTitle.value;
} else if (_header.value === "guidelineLevel") {
} else if (_header.key === "guidelineLevel") {
return hasLevel.value;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<v-container
fluid
>
<v-container fluid>
<reports
ref="reportsRef"
:bus="bus"
Expand Down
Loading
Loading