Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
28 changes: 28 additions & 0 deletions web/server/vue-cli/src/components/Run/LoadMultipleRunsBtn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<v-btn
variant="outlined"
color="primary"
class="diff-runs-btn mr-2"
:to="{ name: 'reports',
query: {
...defaultReportFilterValues,
...reportFilterQuery
}
}"
>
<v-icon left>
mdi-vector-combine
</v-icon>
LOAD SELECTED RUNS
</v-btn>
</template>

<script setup>

import { defaultReportFilterValues } from "@/components/Report/ReportFilter";

defineProps({
reportFilterQuery: { type: Object, default: () => {} },
});

</script>
59 changes: 43 additions & 16 deletions web/server/vue-cli/src/components/Run/RunFilterToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
label="History stored before..."
prepend-inner-icon="mdi-calendar-arrow-left"
variant="outlined"
density="compact"
density="compact"
clearable
>
<template #append-inner>
Expand All @@ -81,17 +81,43 @@
</template>
</DateTimePicker>
</v-col>

<v-spacer />

<v-col cols="auto" align="right">
<v-btn
icon
class="reload-runs-btn"
title="Reload runs"
color="primary"
@click="update"
>
<v-icon>mdi-refresh</v-icon>
</v-btn>
</v-col>
</v-row>
<template #extension>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seem working but it might be better to put all the content from the template into a single div like I wrote earlier and apply the same classes to it like in the file TheHeader.vue@11.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Please do not merge until @bruntib also approves.

<div
Comment thread
feyruzb marked this conversation as resolved.
class="mb-4
mt-3
ga-3
d-flex"
align="left"
>
<LoadMultipleRunsBtn
:selected="selected"
:disabled="!enoughRunsSelected"
:report-filter-query="getSelectedRunsFilterQuery(props.selected)"
/>
<DeleteRunBtn
:selected="selected"
variant="outlined"
@on-confirm="update"
@delete-complete="emit('delete-complete')"
/>
</div>

<v-spacer />

<div align="right">
<v-btn
variant="outlined"
color="primary"
Expand All @@ -118,18 +144,8 @@
</ul>
</tooltip-help-icon>
</v-btn>

<v-btn
icon
class="reload-runs-btn"
title="Reload runs"
color="primary"
@click="update"
>
<v-icon>mdi-refresh</v-icon>
</v-btn>
</v-col>
</v-row>
</div>
</template>
</v-toolbar>
</template>

Expand All @@ -153,7 +169,7 @@ import {
import _ from "lodash";

import DateTimePicker from "@/components/DateTimePicker";
import { DeleteRunBtn } from "@/components/Run";
import { DeleteRunBtn, LoadMultipleRunsBtn } from "@/components/Run";
import TooltipHelpIcon from "@/components/TooltipHelpIcon";

const props = defineProps({
Expand Down Expand Up @@ -306,4 +322,15 @@ function updateUrl(params) {
function update() {
emit("update");
}

function getSelectedRunsFilterQuery(selected) {
return {
run: selected.map(item => item.name)
};
}

const enoughRunsSelected = computed(() => {
return props.selected.length >= 2;;
});

</script>
4 changes: 3 additions & 1 deletion web/server/vue-cli/src/components/Run/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import ExpandedRun from "./ExpandedRun";
import RunDescription from "./RunDescription";
import RunFilterToolbar from "./RunFilterToolbar";
import RunNameColumn from "./RunNameColumn";
import LoadMultipleRunsBtn from "./LoadMultipleRunsBtn.vue";

export {
AnalysisInfoBtn, AnalyzerStatisticsBtn,
AnalyzerStatisticsDialog, DeleteRunBtn,
ExpandedRun,
RunDescription, RunFilterToolbar, RunNameColumn
RunDescription, RunFilterToolbar, RunNameColumn,
LoadMultipleRunsBtn
};
8 changes: 4 additions & 4 deletions web/server/vue-cli/src/views/RunList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ const itemsPerPage = ref(
itemsPerPageOptions[0].value
);
const sortBy = ref(
route.query["sort-by"]
? [ {
key: route.query["sort-by"],
order: route.query["sort-desc"] === "true" ? "desc" : "asc"
route.query["sort-by"]
? [ {
key: route.query["sort-by"],
order: route.query["sort-desc"] === "true" ? "desc" : "asc"
} ]
: [ { key: "name", order: "asc" } ]
);
Expand Down
Loading