From: Marcin Haba Date: Wed, 17 Jul 2019 05:20:22 +0000 (+0200) Subject: baculum: Add new graph types X-Git-Tag: Release-9.6.0~199 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fd1bc8a5af41a6ec09b97e130bc0c04affe19fb;p=thirdparty%2Fbacula.git baculum: Add new graph types --- diff --git a/gui/baculum/protected/Web/JavaScript/graph.js b/gui/baculum/protected/Web/JavaScript/graph.js index 9a35cd2949..9e60632995 100644 --- a/gui/baculum/protected/Web/JavaScript/graph.js +++ b/gui/baculum/protected/Web/JavaScript/graph.js @@ -6,50 +6,82 @@ var JobClass = jQuery.klass({ start_point: [], end_point: [], - initialize: function(job) { - this.set_job(job); + initialize: function(job, type) { + this.set_job(job, type); }, - - set_job: function(job) { + set_job: function(job, type) { if (typeof(job) == "object") { this.job = job; - this.set_job_size(); this.set_start_stamp(); this.set_end_stamp(); + this.set_job_by_type(type); this.set_start_point(); this.set_end_point(); } else { alert('Job is not object'); } }, - + set_job_by_type: function(type) { + switch (type) { + case 'job_size': + case 'job_size_per_hour': + case 'job_size_per_day': + case 'avg_job_size_per_hour': + case 'avg_job_size_per_day': + this.set_job_size(); + break; + case 'job_files': + case 'job_files_per_hour': + case 'job_files_per_day': + case 'avg_job_files_per_hour': + case 'avg_job_files_per_day': + this.set_job_files(); + break; + case 'job_status_per_day': + this.set_job_status(); + break; + case 'job_count_per_hour': + case 'job_count_per_day': + // nothing to do + break; + case 'job_duration': + this.set_job_duration(); + break; + case 'avg_job_speed': + this.set_avg_job_speed(); + break; + } + }, set_start_point: function() { var xaxis = this.start_stamp; - var yaxis = this.job_size; + var yaxis = this.job_val; this.start_point = [xaxis, yaxis]; }, - set_end_point: function() { var xaxis = this.end_stamp; - var yaxis = this.job_size; + var yaxis = this.job_val; this.end_point = [xaxis, yaxis]; }, - - set_job_size: function(unit) { - var units = ['B', 'KiB', 'MiB', 'GiB', 'TiB']; - var pos = units.indexOf(unit); - var size = 0; - - if (pos != -1) { - unit = pos; + set_job_size: function() { + this.job_val = this.job.jobbytes; + }, + set_job_status: function() { + this.job_val = this.job.jobstatus; + }, + set_job_files: function() { + this.job_val = this.job.jobfiles; + }, + set_job_duration: function() { + this.job_val = this.end_stamp - this.start_stamp; + }, + set_avg_job_speed: function() { + var t = (this.end_stamp - this.start_stamp) / 1000; + if (t > 0) { + this.job_val = this.job.jobbytes / t; } else { - // default GiB - unit = 3; + this.job_val = 0; } - - this.job_size = this.job.jobbytes / Math.pow(1024, unit); }, - set_start_stamp: function() { /** * NOTE: Start time can be null if job finishes with error before @@ -60,7 +92,6 @@ var JobClass = jQuery.klass({ this.start_stamp = iso_date_to_timestamp(this.job.starttime); } }, - set_end_stamp: function() { if (this.job.endtime) { this.end_stamp = iso_date_to_timestamp(this.job.endtime); @@ -73,12 +104,6 @@ var GraphClass = jQuery.klass({ jobs_all: [], series: [], graph_obj: null, - graph_container: null, - legend_container: null, - time_range: null, - date_from: null, - date_to: null, - job_filter: null, txt: {}, filter_include: { type: 'B' @@ -88,7 +113,12 @@ var GraphClass = jQuery.klass({ end_stamp: 0 }, filter_all_mark: '@', - graph_options: { + time_range_custom_val: 'custom', + graph_options: { + xaxis: {}, + yaxis: {} + }, + graph_options_orig: { legend: { show: true, noColumns: 9, @@ -116,64 +146,159 @@ var GraphClass = jQuery.klass({ selection: { mode : 'x' }, - lines: { - show: true, - lineWidth: 0, - fill: true, - steps: true - }, grid: { color: '#000000', outlineWidth: 0 }, HtmlText: false }, - - initialize: function(jobs, txt, container, legend, time_range, date_from, date_to, client_filter, job_filter) { - this.set_jobs(jobs); - this.txt = txt; - this.set_graph_container(container); - this.set_legend_container(legend); - this.set_time_range_filter(time_range); - this.set_date_from_el(date_from); - this.set_date_to_el(date_to); - this.set_date_fields_events(date_from, date_to); - this.set_jobs_filter(job_filter); - this.set_clients_filter(client_filter); + default_graph_color: '#63c422', + ids : { + graph_type: 'graph_type', + job_filter: 'graph_jobs', + graph_container: 'graphs_container', + legend_container: 'legend_container', + time_range: 'time_range', + job_level: 'job_level' + }, + initialize: function(prop) { + this.txt = prop.txt; + this.ids.date_from = prop.date_from; + this.ids.date_to = prop.date_to; + this.ids.client_filter = prop.client_filter; + this.set_jobs(prop.jobs); + this.set_time_range(); this.set_job_list(); this.update(); this.set_events(); }, - update: function() { - this.extend_graph_options(); this.apply_jobs_filter(); this.prepare_series(); this.draw_graph(); }, + set_events: function() { + // set graph type change combobox selection event + $('#' + this.ids.graph_type).on('change', function(e) { + var jobs = []; + for (var i = 0; i < this.jobs_all.length; i++) { + jobs.push(this.jobs_all[i].job); + } + this.set_jobs(jobs); + this.update(); + }.bind(this)); - set_jobs: function(jobs, filter) { - if (!filter) { - var job; - for (var i = 0; i this.graph_options.xaxis.max) { + if (this.graph_options_orig.xaxis.max && value > this.graph_options_orig.xaxis.max) { alert('Wrong time range.'); return; } - if (value == this.graph_options.xaxis.max) { + if (value == this.graph_options_orig.xaxis.max) { value -= 86400000; } - this.graph_options.xaxis.min = value; + this.graph_options_orig.xaxis.min = value; if (set_range) { var iso_date = timestamp_to_iso_date(value); - var from_el = this.get_date_from_el(); - from_el[0].value = iso_date; + document.getElementById(this.ids.date_from).value = iso_date; } }, - set_xaxis_max: function(value, set_range) { - if (value < this.graph_options.xaxis.min) { + if (value < this.graph_options_orig.xaxis.min) { alert('Wrong time range.'); return; } - if (value == this.graph_options.xaxis.min) { + if (value == this.graph_options_orig.xaxis.min) { value += 86400000; } - this.graph_options.xaxis.max = value; + this.graph_options_orig.xaxis.max = value; if (set_range) { var iso_date = timestamp_to_iso_date(value); - var to_el = this.get_date_to_el(); - to_el[0].value = iso_date; + document.getElementById(this.ids.date_to).value = iso_date; } }, + apply_jobs_filter: function() { + var filtred_jobs = []; + var to_add; + for (var i = 0; i < this.jobs_all.length; i++) { + to_add = true; + for (var key in this.filter_include) { + if (this.jobs_all[i].hasOwnProperty(key) && this.jobs_all[i][key] != this.filter_include[key]) { + to_add = false; + break; + } + if (this.jobs_all[i].job.hasOwnProperty(key) && this.jobs_all[i].job[key] != this.filter_include[key]) { + to_add = false; + break; + } + } + if (to_add === true) { + filtred_jobs.push(this.jobs_all[i]); + } + } - set_date_fields_events: function(date_from, date_to) { - var self = this; - $('#' + date_from).on('change', function() { - var from_stamp = iso_date_to_timestamp(this.value); - self.set_xaxis_min(from_stamp); - self.update(); + var filtred_jobs_copy = filtred_jobs.slice(); + for (var i = 0; i < filtred_jobs.length; i++) { + for (var key in this.filter_exclude) { + if (filtred_jobs[i].hasOwnProperty(key) && filtred_jobs[i][key] != this.filter_exclude[key]) { + continue; + } + if (filtred_jobs[i].job.hasOwnProperty(key) && filtred_jobs[i].job[key] != this.filter_exclude[key]) { + continue; + } + delete filtred_jobs_copy[i]; + break; + } + } + this.set_jobs(filtred_jobs_copy, true); + }, + prepare_series: function() { + var graph_type = document.getElementById(this.ids.graph_type).value; + switch (graph_type) { + case 'job_size': + this.prepare_series_job_size(); + break; + case 'job_size_per_hour': + this.prepare_series_job_size_per_hour(); + break; + case 'job_size_per_day': + this.prepare_series_job_size_per_day(); + break; + case 'avg_job_size_per_hour': + this.prepare_series_avg_job_size_per_hour(); + break; + case 'avg_job_size_per_day': + this.prepare_series_avg_job_size_per_day(); + break; + case 'job_files': + this.prepare_series_job_files(); + break; + case 'job_files_per_hour': + this.prepare_series_job_files_per_hour(); + break; + case 'job_files_per_day': + this.prepare_series_job_files_per_day(); + break; + case 'avg_job_files_per_hour': + this.prepare_series_avg_job_files_per_hour(); + break; + case 'avg_job_files_per_day': + this.prepare_series_avg_job_files_per_day(); + break; + case 'job_count_per_hour': + this.prepare_series_job_count_per_hour(); + break; + case 'job_count_per_day': + this.prepare_series_job_count_per_day(); + break; + case 'job_duration': + this.prepare_series_job_duration(); + break; + case 'avg_job_speed': + this.prepare_series_avg_job_speed(); + break; + case 'job_status_per_day': + this.prepare_series_job_status_per_day(); + break; + } + }, + prepare_series_job_size: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_size.graph_title, + xaxis: { + title: this.txt.job_size.xaxis_title + }, + yaxis: { + title: this.txt.job_size.yaxis_title, + tickFormatter: function(val, axis_opts) { + return Units.get_formatted_size(val); + } + }, + lines: { + show: true, + lineWidth: 0, + fill: true, + steps: true + } }); - $('#' + date_to).on('change', function() { - var to_stamp = iso_date_to_timestamp(this.value); - self.set_xaxis_max(to_stamp); - self.update(); + this.series = []; + var series_uniq = {}; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + if (series_uniq.hasOwnProperty(this.jobs[i].job.name) == false) { + series_uniq[this.jobs[i].job.name] = []; + } + series_uniq[this.jobs[i].job.name].push(this.jobs[i].start_point, this.jobs[i].end_point, [null, null]); + + } + var serie; + for (var key in series_uniq) { + serie = []; + for (var i = 0; i < series_uniq[key].length; i++) { + serie.push(series_uniq[key][i]); + } + this.series.push({data: serie, label: key}); + } + }, + prepare_series_job_size_per_hour: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_size_per_hour.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.job_size_per_hour.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + var d = new Date(val); + return d.toLocaleDateString() + ' ' + d.getHours() + ':00'; + } + }, + yaxis: { + title: this.txt.job_size_per_hour.yaxis_title, + tickFormatter: function(val, axis_opts) { + return Units.get_formatted_size(val); + } + }, + bars: { + barWidth: 3600000, + }, + mouse : { + track : true + } }); - var date = this.get_time_range(); - this.set_time_range(date); + this.series = []; + var series_uniq = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + + } + for (var key in series_uniq) { + key = parseInt(key, 10); + this.series.push({data: [[key, series_uniq[key]]], label: key, color: this.default_graph_color}); + } }, + prepare_series_job_size_per_day: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_size_per_day.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.job_size_per_day.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + return (new Date(val)).toLocaleDateString(); + } + }, + yaxis: { + title: this.txt.job_size_per_day.yaxis_title, + tickFormatter: function(val, axis_opts) { + return Units.get_formatted_size(val); + } + }, + bars: { + barWidth: 86400000, + }, + mouse : { + track : true + } + }); - set_clients_filter: function(client_filter) { - var self = this; - $('#' + client_filter).on('change', function() { - if (this.value == self.filter_all_mark) { - delete self.filter_include['clientid']; - } else { - self.filter_include['clientid'] = parseInt(this.value, 10); + this.series = []; + var series_uniq = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + + } + for (var key in series_uniq) { + key = parseInt(key, 10); + this.series.push({data: [[key, series_uniq[key]]], label: key, color: this.default_graph_color}); + } + }, + prepare_series_avg_job_size_per_hour: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.avg_job_size_per_hour.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.avg_job_size_per_hour.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + var d = new Date(val); + return d.toLocaleDateString() + ' ' + d.getHours() + ':00'; + } + }, + yaxis: { + title: this.txt.avg_job_size_per_hour.yaxis_title, + tickFormatter: function(val, axis_opts) { + return Units.get_formatted_size(val); + } + }, + bars: { + barWidth: 3600000, + }, + mouse : { + track : true } - self.update(); }); + + this.series = []; + var series_uniq = {}; + var series_count = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + series_count[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + series_count[date]++; + + } + var val; + for (var key in series_uniq) { + val = series_uniq[key] / series_count[key]; + key = parseInt(key, 10); + this.series.push({data: [[key, val]], label: key, color: this.default_graph_color}); + } }, + prepare_series_avg_job_size_per_day: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.avg_job_size_per_day.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.avg_job_size_per_day.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + return (new Date(val)).toLocaleDateString(); + } + }, + yaxis: { + title: this.txt.avg_job_size_per_day.yaxis_title, + tickFormatter: function(val, axis_opts) { + return Units.get_formatted_size(val); + } + }, + bars: { + barWidth: 86400000, + }, + mouse : { + track : true + } + }); - set_jobs_filter: function(job_filter) { - var self = this; - this.job_filter = job_filter; - $('#' + job_filter).on('change', function() { - if (this.value == self.filter_all_mark) { - delete self.filter_include['name']; - } else { - self.filter_include['name'] = this.value; + this.series = []; + var series_uniq = {}; + var series_count = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + series_count[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + series_count[date]++; + + } + var val; + for (var key in series_uniq) { + val = series_uniq[key] / series_count[key]; + key = parseInt(key, 10); + this.series.push({data: [[key, val]], label: key, color: this.default_graph_color}); + } + }, + prepare_series_job_files: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_files.graph_title, + xaxis: { + title: this.txt.job_files.xaxis_title + }, + yaxis: { + title: this.txt.job_files.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); + } + }, + lines: { + show: true, + lineWidth: 0, + fill: true, + steps: true } - self.update(); }); + + this.series = []; + var series_uniq = {}; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + if (series_uniq.hasOwnProperty(this.jobs[i].job.name) == false) { + series_uniq[this.jobs[i].job.name] = []; + } + series_uniq[this.jobs[i].job.name].push(this.jobs[i].start_point, this.jobs[i].end_point, [null, null]); + + } + var serie; + for (var key in series_uniq) { + serie = []; + for (var i = 0; i < series_uniq[key].length; i++) { + serie.push(series_uniq[key][i]); + } + this.series.push({data: serie, label: key}); + } }, + prepare_series_job_files_per_hour: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_files_per_hour.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.job_files_per_hour.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + var d = new Date(val); + return d.toLocaleDateString() + ' ' + d.getHours() + ':00'; + } + }, + yaxis: { + title: this.txt.job_files_per_hour.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); + } + }, + bars: { + barWidth: 3600000, + }, + mouse : { + track : true + } + }); - apply_jobs_filter: function() { - var self = this; - var jobs = this.jobs_all; - var filtred_jobs = []; - var to_add; - for (var i = 0; i < jobs.length; i++) { - to_add = true; - jQuery.each(this.filter_include, function(key, value) { - if (jobs[i].hasOwnProperty(key) && jobs[i][key] != value) { - to_add = false; - return; + this.series = []; + var series_uniq = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + + } + for (var key in series_uniq) { + key = parseInt(key, 10); + this.series.push({data: [[key, series_uniq[key]]], label: key, color: this.default_graph_color}); + } + }, + prepare_series_job_files_per_day: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_files_per_day.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.job_files_per_day.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + return (new Date(val)).toLocaleDateString(); } - if (jobs[i].job.hasOwnProperty(key) && jobs[i].job[key] != value) { - to_add = false; - return; + }, + yaxis: { + title: this.txt.job_files_per_day.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); } - }); - if (to_add === true) { - filtred_jobs.push(jobs[i]); + }, + bars: { + barWidth: 86400000, + }, + mouse : { + track : true } + }); + + this.series = []; + var series_uniq = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + } + for (var key in series_uniq) { + key = parseInt(key, 10); + this.series.push({data: [[key, series_uniq[key]]], label: key, color: this.default_graph_color}); + } + }, + prepare_series_avg_job_files_per_hour: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.avg_job_files_per_hour.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.avg_job_files_per_hour.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + var d = new Date(val); + return d.toLocaleDateString() + ' ' + d.getHours() + ':00'; + } + }, + yaxis: { + title: this.txt.avg_job_files_per_hour.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); + } + }, + bars: { + barWidth: 3600000, + }, + mouse : { + track : true + } + }); - for (var i = 0; i < filtred_jobs.length; i++) { - jQuery.each(this.filter_exclude, function(key, value) { - if (filtred_jobs[i].hasOwnProperty(key) && filtred_jobs[i][key] != value) { - return; + this.series = []; + var series_uniq = {}; + var series_count = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + series_count[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + series_count[date]++; + + } + var val; + for (var key in series_uniq) { + val = series_uniq[key] / series_count[key]; + key = parseInt(key, 10); + this.series.push({data: [[key, val]], label: key, color: this.default_graph_color}); + } + }, + prepare_series_avg_job_files_per_day: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.avg_job_files_per_day.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.avg_job_files_per_day.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + return (new Date(val)).toLocaleDateString(); } - if (filtred_jobs[i].job.hasOwnProperty(key) && filtred_jobs[i].job[key] != value) { - return; + }, + yaxis: { + title: this.txt.avg_job_files_per_day.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); } - delete filtred_jobs[i]; - }); + }, + bars: { + barWidth: 86400000, + }, + mouse : { + track : true + } + }); + + this.series = []; + var series_uniq = {}; + var series_count = {}; + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + series_count[date] = 0; + } + series_uniq[date] += this.jobs[i].job_val; + series_count[date]++; + + } + var val; + for (var key in series_uniq) { + val = series_uniq[key] / series_count[key]; + key = parseInt(key, 10); + this.series.push({data: [[key, val]], label: key, color: this.default_graph_color}); } - this.set_jobs(filtred_jobs, true); }, + prepare_series_job_count_per_hour: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_count_per_hour.graph_title, + legend: { + show: false + }, + xaxis: { + title: this.txt.job_count_per_hour.xaxis_title, + mode: 'normal', + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10); + var d = new Date(val); + return d.toLocaleDateString() + ' ' + d.getHours() + ':00'; + } + }, + yaxis: { + title: this.txt.job_count_per_hour.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); + } + }, + bars: { + barWidth: 3600000, + }, + mouse : { + track : true + } + }); - prepare_series: function() { - var self = this; this.series = []; var series_uniq = {}; - var x_vals = []; - var y_vals = []; - var jobs = this.get_jobs(); - for (var i = 0; i < jobs.length; i++) { - if(jobs[i].start_stamp < this.graph_options.xaxis.min || jobs[i].end_stamp > this.graph_options.xaxis.max) { + var d, date; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { continue; } - if (series_uniq.hasOwnProperty(jobs[i].job.name) == false) { - series_uniq[jobs[i].job.name] = []; + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; } - series_uniq[jobs[i].job.name].push(jobs[i].start_point, jobs[i].end_point, [null, null]); + series_uniq[date]++; } - jQuery.each(series_uniq, function(key, value) { - var serie = []; - for (var i = 0; i this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime(); + if (series_uniq.hasOwnProperty(date) == false) { + series_uniq[date] = 0; + } + series_uniq[date]++; + + } + for (var key in series_uniq) { + key = parseInt(key, 10); + this.series.push({data: [[key, series_uniq[key]]], label: key, color: this.default_graph_color}); + } }, + prepare_series_job_duration: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_duration.graph_title, + xaxis: { + title: this.txt.job_duration.xaxis_title + }, + yaxis: { + title: this.txt.job_duration.yaxis_title, + tickFormatter: function(val, axis_opts) { + val = parseInt(val, 10) / 1000; + var value = Units.format_time_period(val, null, true); + return (value.value.toFixed(1) + ' ' + value.format + (value.value >= 1 ? 's' : '')); + } + }, + lines: { + show: true, + lineWidth: 0, + fill: true, + steps: true + } + }); + + this.series = []; + var series_uniq = {}; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + if (series_uniq.hasOwnProperty(this.jobs[i].job.name) == false) { + series_uniq[this.jobs[i].job.name] = []; + } + series_uniq[this.jobs[i].job.name].push(this.jobs[i].start_point, this.jobs[i].end_point, [null, null]); + + } + var serie; + for (var key in series_uniq) { + serie = []; + for (var i = 0; i < series_uniq[key].length; i++) { + serie.push(series_uniq[key][i]); + } + this.series.push({data: serie, label: key}); + } + }, + prepare_series_avg_job_speed: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.avg_job_speed.graph_title, + xaxis: { + title: this.txt.avg_job_speed.xaxis_title + }, + yaxis: { + title: this.txt.avg_job_speed.yaxis_title, + tickFormatter: function(val, axis_opts) { + val = parseInt(val); + var s = Units.format_speed(val, null, true, true); + return (s.value.toFixed(1) + s.format); + } + }, + lines: { + show: true, + lineWidth: 0, + fill: true, + steps: true + } + }); + + this.series = []; + var series_uniq = {}; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + if (series_uniq.hasOwnProperty(this.jobs[i].job.name) == false) { + series_uniq[this.jobs[i].job.name] = []; + } + series_uniq[this.jobs[i].job.name].push(this.jobs[i].start_point, this.jobs[i].end_point, [null, null]); - extend_graph_options: function() { - this.graph_options.legend.container = this.get_legend_container(); - this.graph_options.title = this.txt.graph_title; - this.graph_options.xaxis.title = this.txt.xaxis_title; - this.graph_options.yaxis.title = this.txt.yaxis_title; + } + var serie; + for (var key in series_uniq) { + serie = []; + for (var i = 0; i < series_uniq[key].length; i++) { + serie.push(series_uniq[key][i]); + } + this.series.push({data: serie, label: key}); + } }, + prepare_series_job_status_per_day: function() { + var graph_options = $.extend(true, {}, this.graph_options_orig); + this.graph_options = $.extend(true, graph_options, { + title: this.txt.job_status_per_day.graph_title, + colors: ['#63c422', '#FFFF66', '#d70808'], + xaxis: { + title: this.txt.job_status_per_day.xaxis_title + }, + yaxis: { + title: this.txt.job_status_per_day.yaxis_title, + tickFormatter: function(val, axis_opts) { + return parseInt(val, 10); + } + }, + bars: { + barWidth: 86400000, + stacked: true + } + }); + this.series = []; + var series_uniq = {}; + var ok = []; + var error = []; + var warning = [] + var cancel = [] + var date, d; + for (var i = 0; i < this.jobs.length; i++) { + if(this.jobs[i].start_stamp < this.graph_options.xaxis.min || this.jobs[i].end_stamp > this.graph_options.xaxis.max) { + continue; + } + d = new Date(this.jobs[i].start_stamp); + date = (new Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime(); + if (!series_uniq.hasOwnProperty(date)) { + series_uniq[date] = {ok: 0, error: 0, cancel: 0}; + } + if (['T', 'D'].indexOf(this.jobs[i].job_val) != -1) { + series_uniq[date].ok++; + } else if (['E', 'e', 'f', 'I'].indexOf(this.jobs[i].job_val) != -1) { + series_uniq[date].error++; + } else if (this.jobs[i].job_val === 'A') { + series_uniq[date].cancel++; + } + } + var d1 = []; + var d2 = []; + var d3 = []; + var d; + for (var date in series_uniq) { + if (date <= 0) { + continue; + } + d = parseInt(date, 10); + d1.push([d, series_uniq[date].ok]); + d2.push([d, series_uniq[date].cancel]); + d3.push([d, series_uniq[date].error]); + } + this.series = [ + {data: d1, label: 'OK'}, + {data: d2, label: 'Cancel'}, + {data: d3, label: 'Error'} + ]; + }, draw_graph: function(opts) { + this.graph_options.legend.container = document.getElementById(this.ids.legend_container); + var options = Flotr._.extend(Flotr._.clone(this.graph_options), opts || {}); + var graph_container = document.getElementById(this.ids.graph_container); this.graph_obj = Flotr.draw( - this.get_graph_container(), + graph_container, this.series, options ); }, - - set_events: function() { - var self = this; - Flotr.EventAdapter.observe(this.graph_container, 'flotr:select', function(area) { - var options = { - xaxis : { - min : area.x1, - max : area.x2, - mode : 'time', - timeMode: 'local', - labelsAngle : 45, - color: 'black', - autoscale: true - }, - yaxis : { - min : area.y1, - max : area.y2, - color: 'black', - autoscale: true - } - }; - - self.draw_graph(options); - }); - - Flotr.EventAdapter.observe(this.graph_container, 'flotr:click', function () { - self.update(); - }); - } }); var GraphPieClass = jQuery.klass({ diff --git a/gui/baculum/protected/Web/JavaScript/misc.js b/gui/baculum/protected/Web/JavaScript/misc.js index 8995d17306..a55a544357 100644 --- a/gui/baculum/protected/Web/JavaScript/misc.js +++ b/gui/baculum/protected/Web/JavaScript/misc.js @@ -95,13 +95,13 @@ var Units = { var ret = {value: size_bytes, format: f}; return ret; }, - format_time_period: function(time_seconds, format) { + format_time_period: function(time_seconds, format, float_val) { var reminder; var f = this.units.time[0].long; for (var i = 0; i < this.units.time.length; i++) { if (this.units.time[i].long != format && time_seconds) { reminder = time_seconds % this.units.time[i].value; - if (reminder === 0) { + if (reminder === 0 || (float_val && time_seconds >= this.units.time[i].value)) { time_seconds /= this.units.time[i].value; f = this.units.time[i].long; continue; @@ -124,13 +124,16 @@ var Units = { var time = [d.getHours(), ('0' + d.getMinutes()).slice(-2), ('0' + d.getSeconds()).slice(-2)].join(':'); return (date + ' ' + time); }, - format_speed: function(speed_bytes, format) { + format_speed: function(speed_bytes, format, float_val, decimal) { var reminder; var f = this.units.speed[0].long; for (var i = 0; i < this.units.speed.length; i++) { if (this.units.speed[i].long != format && speed_bytes) { + if (decimal && [1, 1000].indexOf(this.units.speed[i].value) == -1) { + continue; + } reminder = speed_bytes % this.units.speed[i].value - if (reminder === 0) { + if (reminder === 0 || (float_val && speed_bytes >= this.units.speed[i].value)) { speed_bytes /= this.units.speed[i].value; f = this.units.speed[i].long; continue; diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index fd60c2de13..29e9ae7a61 100644 Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/en/messages.po b/gui/baculum/protected/Web/Lang/en/messages.po index 94caf645e4..d2717fe9ff 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -869,21 +869,15 @@ msgstr "Legend:" msgid "select client" msgstr "select client" -msgid "Graph: Jobs size / Time" -msgstr "Graph: Jobs size / Time" +msgid "Job size / Time" +msgstr "Job size / Time" -msgid "Jobs size (GiB)" -msgstr "Jobs size (GiB)" +msgid "Job size" +msgstr "Job size" msgid "Time" msgstr "Time" -msgid "Tip: for getting zoom, please mark area on graph." -msgstr "Tip: for getting zoom, please mark area on graph." - -msgid "Tip 2: for back from zoom, please click somewhere on graph." -msgstr "Tip 2: for back from zoom, please click somewhere on graph." - msgid "File retention (in sec.):" msgstr "File retention (in sec.):" @@ -2098,3 +2092,132 @@ msgstr "Statistics:" msgid "Statistics" msgstr "Statistics" + +msgid "Job files / Time" +msgstr "Job files / Time" + +msgid "Job files per day" +msgstr "Job files per day" + +msgid "Files count" +msgstr "Files count" + +msgid "Jobs status / Day" +msgstr "Jobs status / Day" + +msgid "Job status per day" +msgstr "Job status per day" + +msgid "Jobs count" +msgstr "Jobs count" + +msgid "Job files" +msgstr "Job files" + +msgid "Graph type:" +msgstr "Graph type:" + +msgid "Tip: to use zoom, please mark area on graph." +msgstr "Tip: to use zoom, please mark area on graph." + +msgid "Tip 2: to exit zoom, please click somewhere on graph." +msgstr "Tip 2: to exit zoom, please click somewhere on graph." + +msgid "Job size / Day" +msgstr "Job size / Day" + +msgid "Job size per day" +msgstr "Job size per day" + +msgid "Job files / Day" +msgstr "Job files / Day" + +msgid "Graph:" +msgstr "Graph:" + +msgid "Job duration" +msgstr "Job duration" + +msgid "Jobs duration / Time" +msgstr "Jobs duration / Time" + +msgid "Duration" +msgstr "Duration" + +msgid "Job size per hour" +msgstr "Job size per hour" + +msgid "Job size / Hour" +msgstr "Job size / Hour" + +msgid "Job files per hour" +msgstr "Job files per hour" + +msgid "Job files / Hour" +msgstr "Job files / Hour" + +msgid "Average job size per hour" +msgstr "Average job size per hour" + +msgid "Average job size per day" +msgstr "Average job size per day" + +msgid "Average job size / Hour" +msgstr "Average job size / Hour" + +msgid "Average job size / Day" +msgstr "Average job size / Day" + +msgid "Average job files per hour" +msgstr "Average job files per hour" + +msgid "Average job files per day" +msgstr "Average job files per day" + +msgid "Average job files / Hour" +msgstr "Average job files / Hour" + +msgid "Average job files / Day" +msgstr "Average job files / Day" + +msgid "Average job speed / Time" +msgstr "Average job speed / Time" + +msgid "Job speed" +msgstr "Job speed" + +msgid "Average job speed" +msgstr "Average job speed" + +msgid "Job count per hour" +msgstr "Job count per hour" + +msgid "Job count per day" +msgstr "Job count per day" + +msgid "Job count / Hour" +msgstr "Job count / Hour" + +msgid "Job count" +msgstr "Job count" + +msgid "Job count / Day" +msgstr "Job count / Day" + +msgid "Job level:" +msgstr "Job level:" + +msgid "All levels" +msgstr "All levels" + +msgid "Full" +msgstr "Full" + +msgid "Incremental" +msgstr "Incremental" + +msgid "Differential" +msgstr "Differential" + +msgid "Custom time range" +msgstr "Custom time range" diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index 4261a01d70..9687013c1b 100644 Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/ja/messages.po b/gui/baculum/protected/Web/Lang/ja/messages.po index b63830ee63..3a1c1682ee 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -619,8 +619,8 @@ msgstr "Go back" msgid "Go to started job after start:" msgstr "Go to started job after start:" -msgid "Graph: Jobs size / Time" -msgstr "Graph: Jobs size / Time" +msgid "Job size / Time" +msgstr "Job size / Time" msgid "Graphs" msgstr "統計レポート" @@ -809,8 +809,8 @@ msgstr "Jobs on volume" msgid "Jobs settings." msgstr "Jobs settings." -msgid "Jobs size (GiB)" -msgstr "Jobs size (GiB)" +msgid "Job size" +msgstr "Job size" msgid "Jump to job (last 100):" msgstr "Jump to job (last 100):" @@ -1593,11 +1593,11 @@ msgstr "Time" msgid "Time range:" msgstr "日時範囲指定:" -msgid "Tip 2: for back from zoom, please click somewhere on graph." +msgid "Tip 2: to exit zoom, please click somewhere on graph." msgstr "Tip 2: ズームを解除するにはグラフの外をクリックして元に戻します" -msgid "Tip: for getting zoom, please mark area on graph." -msgstr "Tis: グラフをズームさせるにはズームする範囲をクリックして選択してください" +msgid "Tip: to use zoom, please mark area on graph." +msgstr "Tip: グラフをズームさせるにはズームする範囲をクリックして選択してください" msgid "To day" msgstr "To day" @@ -2188,3 +2188,126 @@ msgstr "Statistics:" msgid "Statistics" msgstr "Statistics" + +msgid "Job files / Time" +msgstr "Job files / Time" + +msgid "Job files per day" +msgstr "Job files per day" + +msgid "Files count" +msgstr "Files count" + +msgid "Jobs status / Day" +msgstr "Jobs status / Day" + +msgid "Job status per day" +msgstr "Job status per day" + +msgid "Jobs count" +msgstr "Jobs count" + +msgid "Job files" +msgstr "Job files" + +msgid "Graph type:" +msgstr "Graph type:" + +msgid "Job size / Day" +msgstr "Job size / Day" + +msgid "Job size per day" +msgstr "Job size per day" + +msgid "Job files / Day" +msgstr "Job files / Day" + +msgid "Graph:" +msgstr "Graph:" + +msgid "Job duration" +msgstr "Job duration" + +msgid "Jobs duration / Time" +msgstr "Jobs duration / Time" + +msgid "Duration" +msgstr "Duration" + +msgid "Job size per hour" +msgstr "Job size per hour" + +msgid "Job size / Hour" +msgstr "Job size / Hour" + +msgid "Job files per hour" +msgstr "Job files per hour" + +msgid "Job files / Hour" +msgstr "Job files / Hour" + +msgid "Average job size per hour" +msgstr "Average job size per hour" + +msgid "Average job size per day" +msgstr "Average job size per day" + +msgid "Average job size / Hour" +msgstr "Average job size / Hour" + +msgid "Average job size / Day" +msgstr "Average job size / Day" + +msgid "Average job files per hour" +msgstr "Average job files per hour" + +msgid "Average job files per day" +msgstr "Average job files per day" + +msgid "Average job files / Hour" +msgstr "Average job files / Hour" + +msgid "Average job files / Day" +msgstr "Average job files / Day" + +msgid "Average job speed / Time" +msgstr "Average job speed / Time" + +msgid "Job speed" +msgstr "Job speed" + +msgid "Average job speed" +msgstr "Average job speed" + +msgid "Job count per hour" +msgstr "Job count per hour" + +msgid "Job count per day" +msgstr "Job count per day" + +msgid "Job count / Hour" +msgstr "Job count / Hour" + +msgid "Job count" +msgstr "Job count" + +msgid "Job count / Day" +msgstr "Job count / Day" + +msgid "Job level:" +msgstr "Job level:" + +msgid "All levels" +msgstr "All levels" + +msgid "Full" +msgstr "Full" + +msgid "Incremental" +msgstr "Incremental" + +msgid "Differential" +msgstr "Differential" + +msgid "Custom time range" +msgstr "Custom time range" diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index 1269e5442b..b5e048b528 100644 Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/pl/messages.po b/gui/baculum/protected/Web/Lang/pl/messages.po index c78ed8b271..0bf84888e2 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -861,19 +861,19 @@ msgid "select client" msgstr "wybierz klienta" -msgid "Graph: Jobs size / Time" -msgstr "Graf: Rozmiar zadania / Czas" +msgid "Job size / Time" +msgstr "Rozmiar zadań / Czas" -msgid "Jobs size (GiB)" -msgstr "Rozmiar zadania (GiB)" +msgid "Job size" +msgstr "Rozmiar zadań" msgid "Time" msgstr "Czas" -msgid "Tip: for getting zoom, please mark area on graph." +msgid "Tip: to use zoom, please mark area on graph." msgstr "Porada: Aby użyć zbliżenia proszę zaznaczyć obszar na grafie." -msgid "Tip 2: for back from zoom, please click somewhere on graph." +msgid "Tip 2: to exit zoom, please click somewhere on graph." msgstr "Porada 2: aby powrócić ze zbliżenia, proszę kliknąć gdzieś na grafie." msgid "Baculum problem" @@ -2105,3 +2105,126 @@ msgstr "Statystyki:" msgid "Statistics" msgstr "Statystyki" + +msgid "Job files / Time" +msgstr "Pliki zadań / Czas" + +msgid "Job files per day" +msgstr "Ilość plików na dzień" + +msgid "Files count" +msgstr "Ilość plików" + +msgid "Jobs status / Day" +msgstr "Status zadań / Dzień" + +msgid "Job status per day" +msgstr "Status zadań na dzień" + +msgid "Jobs count" +msgstr "Ilość zadań" + +msgid "Job files" +msgstr "Pliki zadań" + +msgid "Graph type:" +msgstr "Typ grafu:" + +msgid "Job size / Day" +msgstr "Rozmiar zadań / Dzień" + +msgid "Job size per day" +msgstr "Rozmiar zadań na dzień" + +msgid "Job files / Day" +msgstr "Job files / Day" + +msgid "Graph:" +msgstr "Graf:" + +msgid "Job duration" +msgstr "Czas trwania zadań" + +msgid "Jobs duration / Time" +msgstr "Czas trwania zadania / Czas" + +msgid "Duration" +msgstr "Czas trwania" + +msgid "Job size per hour" +msgstr "Rozmiar zadań na godzinę" + +msgid "Job size / Hour" +msgstr "Rozmiar zadań / Godzina" + +msgid "Job files per hour" +msgstr "Ilość plików na godzinę" + +msgid "Job files / Hour" +msgstr "Ilość plików / Godzina" + +msgid "Average job size per hour" +msgstr "Średni rozmiar zadania na godzinę" + +msgid "Average job size per day" +msgstr "Średni rozmiar zadania na dzień" + +msgid "Average job size / Hour" +msgstr "Średni rozmiar zadania / Godzina" + +msgid "Average job size / Day" +msgstr "Średni rozmiar zadania / Dzień" + +msgid "Average job files per hour" +msgstr "Średnia ilość plików na godzinę" + +msgid "Average job files per day" +msgstr "Średnia ilość plików na dzień" + +msgid "Average job files / Hour" +msgstr "Średnia ilość plików / Godzina" + +msgid "Average job files / Day" +msgstr "Średnia ilość plików / Dzień" + +msgid "Average job speed / Time" +msgstr "Średnia prędkość zadań / Time" + +msgid "Job speed" +msgstr "Prędkość zadania" + +msgid "Average job speed" +msgstr "Średnia prędkość zadań" + +msgid "Job count per hour" +msgstr "Ilość zadań na godzinę" + +msgid "Job count per day" +msgstr "Ilość zadań na dzień" + +msgid "Job count / Hour" +msgstr "Ilość zadań / Godzina" + +msgid "Job count" +msgstr "Ilość zadań" + +msgid "Job count / Day" +msgstr "Ilość zadań / Dzień" + +msgid "Job level:" +msgstr "Poziom zadania:" + +msgid "All levels" +msgstr "Wszystkie poziomy" + +msgid "Full" +msgstr "Pełny" + +msgid "Incremental" +msgstr "Przyrostowy" + +msgid "Differential" +msgstr "Różnicowy" + +msgid "Custom time range" +msgstr "Dopasowany zakres czasu" diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index ad4f6c7204..81bf38d5c6 100644 Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/pt/messages.po b/gui/baculum/protected/Web/Lang/pt/messages.po index 3b682f0a3e..ddddcc62c8 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -878,19 +878,19 @@ msgstr "Legenda:" msgid "select client" msgstr "selecione um cliente" -msgid "Graph: Jobs size / Time" +msgid "Job size / Time" msgstr "Gráfico: Tamanho Job / Tempo" -msgid "Jobs size (GiB)" -msgstr "Tamanho do job (GB)" +msgid "Job size" +msgstr "Tamanho do job" msgid "Time" msgstr "Tempo" -msgid "Tip: for getting zoom, please mark area on graph." +msgid "Tip: to use zoom, please mark area on graph." msgstr "Dica 1: para dar zoom, marque uma área no gráfico." -msgid "Tip 2: for back from zoom, please click somewhere on graph." +msgid "Tip 2: to exit zoom, please click somewhere on graph." msgstr "Dica 2: para voltar ao zoom normal, clique em qualquer área do gráfico." msgid "File retention (in sec.):" @@ -2113,3 +2113,126 @@ msgstr "Statistics:" msgid "Statistics" msgstr "Statistics" + +msgid "Job files / Time" +msgstr "Job files / Time" + +msgid "Job files per day" +msgstr "Job files per day" + +msgid "Files count" +msgstr "Files count" + +msgid "Jobs status / Day" +msgstr "Jobs status / Day" + +msgid "Job status per day" +msgstr "Job status per day" + +msgid "Jobs count" +msgstr "Jobs count" + +msgid "Job files" +msgstr "Job files" + +msgid "Graph type:" +msgstr "Graph type:" + +msgid "Job size / Day" +msgstr "Job size / Day" + +msgid "Job size per day" +msgstr "Job size per day" + +msgid "Job files / Day" +msgstr "Job files / Day" + +msgid "Graph:" +msgstr "Graph:" + +msgid "Job duration" +msgstr "Job duration" + +msgid "Jobs duration / Time" +msgstr "Jobs duration / Time" + +msgid "Duration" +msgstr "Duration" + +msgid "Job size per hour" +msgstr "Job size per hour" + +msgid "Job size / Hour" +msgstr "Job size / Hour" + +msgid "Job files per hour" +msgstr "Job files per hour" + +msgid "Job files / Hour" +msgstr "Job files / Hour" + +msgid "Average job size per hour" +msgstr "Average job size per hour" + +msgid "Average job size per day" +msgstr "Average job size per day" + +msgid "Average job size / Hour" +msgstr "Average job size / Hour" + +msgid "Average job size / Day" +msgstr "Average job size / Day" + +msgid "Average job files per hour" +msgstr "Average job files per hour" + +msgid "Average job files per day" +msgstr "Average job files per day" + +msgid "Average job files / Hour" +msgstr "Average job files / Hour" + +msgid "Average job files / Day" +msgstr "Average job files / Day" + +msgid "Average job speed / Time" +msgstr "Average job speed / Time" + +msgid "Job speed" +msgstr "Job speed" + +msgid "Average job speed" +msgstr "Average job speed" + +msgid "Job count per hour" +msgstr "Job count per hour" + +msgid "Job count per day" +msgstr "Job count per day" + +msgid "Job count / Hour" +msgstr "Job count / Hour" + +msgid "Job count" +msgstr "Job count" + +msgid "Job count / Day" +msgstr "Job count / Day" + +msgid "Job level:" +msgstr "Job level:" + +msgid "All levels" +msgstr "All levels" + +msgid "Full" +msgstr "Full" + +msgid "Incremental" +msgstr "Incremental" + +msgid "Differential" +msgstr "Differential" + +msgid "Custom time range" +msgstr "Custom time range" diff --git a/gui/baculum/protected/Web/Portlets/JobGraphs.tpl b/gui/baculum/protected/Web/Portlets/JobGraphs.tpl index cd70c77d41..d011824d50 100644 --- a/gui/baculum/protected/Web/Portlets/JobGraphs.tpl +++ b/gui/baculum/protected/Web/Portlets/JobGraphs.tpl @@ -36,22 +36,132 @@ +
+ <%[ Graph type: ]%>
+ +
+
+ <%[ Job level: ]%>
+ +
<%[ Legend: ]%> -
-
+
+
-

<%[ Tip: for getting zoom, please mark area on graph. ]%>

-

<%[ Tip 2: for back from zoom, please click somewhere on graph. ]%>

+

<%[ Tip: to use zoom, please mark area on graph. ]%>

+

<%[ Tip 2: to exit zoom, please click somewhere on graph. ]%>