return false;
},
get_addr_by_type: function(type) {
- return '/web/job/history/?type=' + type;
+ var job_regexp = new RegExp('/job/([^/?]+)/?');
+ var path = decodeURIComponent(window.location.pathname);
+ var result = job_regexp.exec(path);
+ var job = '';
+ if (result) {
+ job = '&job=' + result[1];
+ }
+ return '/web/job/history/?type=' + type + job;
}
}
a.href = 'javascript:void(0)';
a.addEventListener('click', function(e) {
$.fn.dataTable.ext.search.pop();
+
+ // reset select filters
+ this.table.columns().every(function() {
+ var select = this.footer().querySelector('SELECT');
+ if (select) {
+ select.value = '';
+ $(select).trigger('change');
+ }
+ })
+
this.table.columns().search('').draw();
container.style.display = 'none';
}.bind(this));
if (search_func) {
$.fn.dataTable.ext.search.push(search_func);
this.table.columns().search('').draw();
+ var job = get_url_param('job');
+ if (job) {
+ // set job filter
+ var select = this.table.column(2).footer().querySelector('SELECT');
+ select.value = job;
+ $(select).trigger('change');
+ }
this.set_mode(type);
container.style.display = '';
} else {
<div id="job_graph_container">
<div>
<div id="jobs_summary_graph"></div>
+ <div id="jobs_summary_legend"></div>
</div>
<div>
<div id="job_size_graph" style="height: 390px"></div>
var oJobGraphs = {
ids: {
jobs_summary_graph : 'jobs_summary_graph',
+ jobs_summary_legend : 'jobs_summary_legend',
job_size_graph : 'job_size_graph',
job_files_graph : 'job_files_graph',
job_actions: 'job_actions'
this.graphs.job_summary = new GraphPieClass({
jobs: Statistics.jobs_summary,
container_id: this.ids.jobs_summary_graph,
+ legend_container_id: this.ids.jobs_summary_legend,
title: this.txt.job_summary.graph_title
});
},
},
destroy_job_summary: function() {
if (this.graphs.job_summary) {
- this.graphs.job_summary.pie.destroy();
+ this.graphs.job_summary.destroy();
}
}
};