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

[gui] Update run filter when setting the filter options #3963

Merged
merged 1 commit into from
Jul 25, 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
2 changes: 2 additions & 0 deletions web/server/vue-cli/src/components/Run/RunFilterToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export default {
? this.dateTimeToStr(this.storedAfter) : undefined;
this.updateUrl({ "stored-after": date });

this.$emit("on-run-filter-changed");
this.$emit("on-run-history-filter-changed");
}, 500));

Expand All @@ -228,6 +229,7 @@ export default {
? this.dateTimeToStr(this.storedBefore) : undefined;
this.updateUrl({ "stored-before": date });

this.$emit("on-run-filter-changed");
this.$emit("on-run-history-filter-changed");
}, 500));
},
Expand Down
20 changes: 17 additions & 3 deletions web/server/vue-cli/src/store/modules/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,24 @@ const getters = {
return state.storedAfter;
},
runFilter(state) {
if (!state.runName)
if (!state.runName && !state.storedAfter && !state.storedBefore)
return null;

return new RunFilter({ names: [ `*${state.runName}*` ] });
let names = null;
if (state.runName)
names = [ `*${state.runName}*` ];
let after = null;
if (state.storedAfter)
after = getUnixTime(state.storedAfter);
let before = null;
if (state.storedBefore)
before = getUnixTime(state.storedBefore);

return new RunFilter({
names: names,
afterTime: after,
beforeTime: before
});
},
runHistoryFilter(state) {
if (!state.runTag && !state.storedAfter && !state.storedBefore)
Expand Down Expand Up @@ -81,4 +95,4 @@ export default {
state,
mutations,
getters
};
};