Skip to content

Commit

Permalink
save advanced filters
Browse files Browse the repository at this point in the history
  • Loading branch information
YohanGastoud committed Jan 20, 2022
1 parent 529360c commit 6b597ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/src/components/pages/Vulns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export default {
search_slider_min: 0,
search_slider_max: 100,
showAdvancedFilters: false,
advancedSearchFilter: null
show_all: true,
show_last_day: false,
show_last_week: false,
Expand Down Expand Up @@ -313,7 +314,7 @@ export default {
}
},
methods: {
getDataFromApi(extra_filters, page_id) {
getDataFromApi(page_id) {
this.loading = true;
// console.log(page_id)
Expand All @@ -330,7 +331,7 @@ export default {
let search = this.search.trim().toLowerCase();
this.limit = itemsPerPage;
let items = this.getVulns(page, this.limit, sortBy, sortDesc, extra_filters);
let items = this.getVulns(page, this.limit, sortBy, sortDesc, this.advancedSearchFilter);
setTimeout(() => {
resolve({
Expand All @@ -341,7 +342,9 @@ export default {
this.loading = false;
},
updateAdvancedSearchFilters(filters){
this.getDataFromApi(filters, 1);
// HERE
this.advancedSearchFilter = filters
this.getDataFromApi();
},
getVulns(page, itemsPerPage, sortBy, sortDesc, extra_filters) {
let sorted_by = '';
Expand Down

0 comments on commit 6b597ce

Please sign in to comment.