Skip to content

Commit

Permalink
Fixes cluster/filter search functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
HazelGrant committed Mar 14, 2024
1 parent e9d2b20 commit 71df2fc
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions apps/dashboard/app/javascript/active_jobs/performance_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@

const activeJobsConfig = $('#active_jobs_config')[0].dataset;

var filter_id = null;
var cluster_id = null;

if (activeJobsConfig.filterId.includes('localStorage')) {
var filter_id = localStorage.getItem('jobfilter')
if (filter_id == null) {
filter_id = activeJobsConfig.filterId.match(/localStorage(.*)/)[1];
}
filter_id = localStorage.getItem('jobfilter');
} else {
var filter_id = activeJobsConfig.filter_id;
filter_id = activeJobsConfig.filterId;
};

if (filter_id == null || filter_id == undefined) {
filter_id = activeJobsConfig.filterId.match(/localStorage(.*)/)[1];
}

if (activeJobsConfig.clusterId.includes('localStorage')) {
var cluster_id = localStorage.getItem('jobcluster');
if (cluster_id == null) {
cluster_id = 'all';
}
cluster_id = localStorage.getItem('jobcluster');
} else {
var cluster_id = activeJobsConfig.cluster_id;
cluster_id = activeJobsConfig.clusterId;
}

if (cluster_id == null || cluster_id == undefined) {
cluster_id = 'all';
}

var performance_tracking_enabled = false;
Expand Down

0 comments on commit 71df2fc

Please sign in to comment.