]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add new graph types
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 17 Jul 2019 05:20:22 +0000 (07:20 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 14 Dec 2019 14:55:25 +0000 (15:55 +0100)
gui/baculum/protected/Web/JavaScript/graph.js
gui/baculum/protected/Web/JavaScript/misc.js
gui/baculum/protected/Web/Lang/en/messages.mo
gui/baculum/protected/Web/Lang/en/messages.po
gui/baculum/protected/Web/Lang/ja/messages.mo
gui/baculum/protected/Web/Lang/ja/messages.po
gui/baculum/protected/Web/Lang/pl/messages.mo
gui/baculum/protected/Web/Lang/pl/messages.po
gui/baculum/protected/Web/Lang/pt/messages.mo
gui/baculum/protected/Web/Lang/pt/messages.po
gui/baculum/protected/Web/Portlets/JobGraphs.tpl

index 9a35cd294962f72748277f8bc93f9cb8531d50bd..9e60632995eca79694646664e524555b8d498882 100644 (file)
@@ -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<jobs.length; i++) {
-                               if(jobs[i].jobstatus == 'R' || jobs[i].jobstatus == 'C' || jobs[i].endtime == null) {
-                                       continue;
+               $('#' + this.ids.job_filter).on('change', function(e) {
+                       if (e.target.value == this.filter_all_mark) {
+                               delete this.filter_include['name'];
+                       } else {
+                               this.filter_include['name'] = e.target.value;
+                       }
+                       this.update();
+               }.bind(this));
+
+               $('#' + this.ids.job_level).on('change', function(e) {
+                       if (e.target.value == this.filter_all_mark) {
+                               delete this.filter_include['level'];
+                       } else {
+                               this.filter_include['level'] = e.target.value;
+                       }
+                       this.update();
+               }.bind(this));
+
+               // set time range change combobox selection event
+               $('#' + this.ids.time_range).on('change', function(e) {
+                       this.set_time_range();
+                       this.show_custom_range(false);
+                       this.update();
+               }.bind(this));
+
+               // set 'date from' change combobox selection event
+               $('#' + this.ids.date_from).on('change', function(e) {
+                       var from_stamp = iso_date_to_timestamp(e.target.value);
+                       this.set_xaxis_min(from_stamp);
+                       this.show_custom_range(true);
+                       this.update();
+               }.bind(this));
+
+               // set 'date to' change combobox selection event
+               $('#' + this.ids.date_to).on('change', function(e) {
+                       var to_stamp = iso_date_to_timestamp(e.target.value);
+                       this.set_xaxis_max(to_stamp);
+                       this.show_custom_range(true);
+                       this.update();
+               }.bind(this));
+
+               // set client filter change combobox selection event
+               $('#' + this.ids.client_filter).on('change', function(e) {
+                       if (e.target.value == this.filter_all_mark) {
+                               delete this.filter_include['clientid'];
+                       } else {
+                               this.filter_include['clientid'] = parseInt(e.target.value, 10);
+                       }
+                       this.update();
+               }.bind(this));
+
+               var graph_container = document.getElementById(this.ids.graph_container);
+               var select_callback = function(area) {
+                       var graph_options = $.extend({}, this.graph_options);
+                       var options = $.extend(true, graph_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
                                }
-                               job = new JobClass(jobs[i]);
-                               this.jobs.push(job);
+                       });
+                       if (!this.is_custom_range()) {
+                               this.set_time_range();
                        }
-                       this.jobs_all = this.jobs;
+                       this.draw_graph(options);
+               }.bind(this);
+
+               // set Flotr-specific select area event
+               Flotr.EventAdapter.observe(graph_container, 'flotr:select', select_callback);
+
+               // set Flotr-specific click area event (zoom reset)
+               Flotr.EventAdapter.observe(graph_container, 'flotr:click', function () {
+                       this.update();
+               }.bind(this));
+       },
+       set_jobs: function(jobs, filter) {
+               if (!filter) {
+                       this.jobs = this.jobs_all = this.prepare_job_objs(jobs);
                } else {
                        this.jobs = jobs;
                }
        },
-
+       prepare_job_objs: function(jobs) {
+               var job;
+               var job_objs = [];
+               var graph_type = document.getElementById(this.ids.graph_type).value;
+               for (var i = 0; i < jobs.length; i++) {
+                       if (jobs[i].jobstatus == 'R' || jobs[i].jobstatus == 'C' || jobs[i].endtime === null) {
+                               continue;
+                       }
+                       job = new JobClass(jobs[i], graph_type);
+                       job_objs.push(job);
+               }
+               return job_objs;
+       },
        set_job_list: function() {
                var job_list = {};
                for (var i = 0; i < this.jobs_all.length; i++) {
                        job_list[this.jobs_all[i].job.name] = 1;
                }
-               var job_filter = document.getElementById(this.job_filter);
+               var job_filter = document.getElementById(this.ids.job_filter);
                for (var job in job_list) {
                        var opt = document.createElement('OPTION');
                        var label = document.createTextNode(job);
@@ -182,254 +307,929 @@ var GraphClass = jQuery.klass({
                        job_filter.appendChild(opt);
                }
        },
-
-       get_jobs: function() {
-               return this.jobs;
-       },
-
-       set_graph_container: function(id) {
-               this.graph_container = document.getElementById(id);
-       },
-
-       get_graph_container: function() {
-               return this.graph_container;
-       },
-
-       set_legend_container: function(id) {
-               this.legend_container = $('#' + id);
-       },
-
-       get_legend_container: function() {
-               return this.legend_container;
-       },
-
-       set_time_range_filter: function(id) {
-               var self = this;
-               this.time_range = $('#' + id);
-               this.time_range.on('change', function() {
-                       var time_range = self.get_time_range();
-                       self.set_time_range(time_range);
-                       self.update();
-               });
-       },
-
        get_time_range: function() {
-               var time_range = parseInt(this.time_range[0].value, 10) * 1000;
-               return time_range;
-       },
-
-       set_date_from_el: function(date_from) {
-               this.date_from = $('#' + date_from);
-       },
-
-       get_date_from_el: function() {
-               return this.date_from;
+               var time_range = document.getElementById(this.ids.time_range).value;
+               return parseInt(time_range, 10) * 1000;
        },
-
-       set_date_to_el: function(date_to) {
-               this.date_to = $('#' + date_to);
+       show_custom_range: function(show) {
+               var time_range = document.getElementById(this.ids.time_range);
+               if (show) {
+                       if (!this.is_custom_range()) {
+                               var option = document.createElement('OPTION');
+                               var label = document.createTextNode(this.txt.filters.custom_time_range);
+                               option.value = this.time_range_custom_val;
+                               option.appendChild(label);
+                               time_range.appendChild(option);
+                               time_range.value = this.time_range_custom_val;
+                       }
+               } else {
+                       for (var i = 0; i < time_range.options.length; i++) {
+                               if (time_range.options[i].value === this.time_range_custom_val) {
+                                       time_range.removeChild(time_range.options[i]);
+                                       break;
+                               }
+                       }
+               }
        },
+       is_custom_range: function() {
+               var is_custom = false;
+               var time_range = document.getElementById(this.ids.time_range);
 
-       get_date_to_el: function() {
-               return this.date_to;
+               for (var i = 0; i < time_range.options.length; i++) {
+                       if (time_range.options[i].value === this.time_range_custom_val) {
+                               is_custom = true;
+                               break;
+                       }
+               }
+               return is_custom;
        },
-
-       set_time_range: function(timestamp) {
+       set_time_range: function() {
                var to_stamp = Math.round(new Date().getTime());
                this.set_xaxis_max(to_stamp, true);
                var from_stamp = (Math.round(new Date().getTime()) - this.get_time_range());
                this.set_xaxis_min(from_stamp, true);
        },
-
-
        set_xaxis_min: function(value, set_range) {
-               if (this.graph_options.xaxis.max && value > 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<value.length; i++) {
-                               serie.push(value[i]);
+               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_count_per_day: function() {
+               var graph_options = $.extend(true, {}, this.graph_options_orig);
+               this.graph_options = $.extend(true, graph_options, {
+                       title: this.txt.job_count_per_day.graph_title,
+                       legend: {
+                               show: false
+                       },
+                       xaxis: {
+                               title: this.txt.job_count_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_count_per_day.yaxis_title,
+                               tickFormatter: function(val, axis_opts) {
+                                       return parseInt(val, 10);
+                               }
+                       },
+                       bars: {
+                               barWidth: 86400000
+                       },
+                       mouse : {
+                               track : true
                        }
-                       self.series.push({data: serie, label: key});
                });
+
+               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]++;
+
+               }
+               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({
index 8995d173062acd428997322cfb815cbbce557343..a55a5443571de0db17ad59672662f01b2824ef4c 100644 (file)
@@ -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;
index fd60c2de13e27a0257f4cf6d22a15d3e562030ea..29e9ae7a614d261011d1d94ff55875847bc6403b 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ
index 94caf645e44cffa073ab15f1ae29a953e8a51dcd..d2717fe9ffcf991a018931ba897e75f244895c08 100644 (file)
@@ -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"
index 4261a01d70447634d35a388da1cc2ba9b758c154..9687013c1b168072a70d9393326c78dca8875b17 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ
index b63830ee637abc024e6cefe3884984cce2a6bef7..3a1c1682ee06c089b78036470033fbaaa5df234e 100644 (file)
@@ -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"
index 1269e5442b285fc4a3208991cf9f249c8f7a1e00..b5e048b528bf0bd8f590cb6eff5f04857aef3a77 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ
index c78ed8b27182529d0834a4b7e697aad61e6f3921..0bf84888e2c2fbed6ab98f0ed1abca182649c467 100644 (file)
@@ -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"
index ad4f6c7204b90bb408ca1ca4dbbea7a04bee6393..81bf38d5c6cbcf1a9a15558b23d64deed2c353b0 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ
index 3b682f0a3e46bb5aab4704f14c7caa29530a4ba9..ddddcc62c8e5d4775b4e6c4e8826f943cb2fe3f0 100644 (file)
@@ -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"
index cd70c77d41e5a49439536b4d8c7b04920659b37d..d011824d5024807dbf3329448ccde8869622aac0 100644 (file)
                <option value="@"><%[ select job ]%></option>
        </select>
 </div>
+<div class="w3-right w3-margin-top" style="width: 250px; margin-right: 28px;">
+       <span><%[ Graph type: ]%></span><br />
+       <select id="graph_type" name="graph_type" class="w3-select w3-border w3-right" style="width: 250px">
+               <option value="job_size" selected><%[ Job size ]%></option>
+               <option value="job_size_per_hour"><%[ Job size per hour ]%></option>
+               <option value="job_size_per_day"><%[ Job size per day ]%></option>
+               <option value="avg_job_size_per_hour"><%[ Average job size per hour ]%></option>
+               <option value="avg_job_size_per_day"><%[ Average job size per day ]%></option>
+               <option value="job_files"><%[ Job files ]%></option>
+               <option value="job_files_per_hour"><%[ Job files per hour ]%></option>
+               <option value="job_files_per_day"><%[ Job files per day ]%></option>
+               <option value="avg_job_files_per_hour"><%[ Average job files per hour ]%></option>
+               <option value="avg_job_files_per_day"><%[ Average job files per day ]%></option>
+               <option value="job_count_per_hour"><%[ Job count per hour ]%></option>
+               <option value="job_count_per_day"><%[ Job count per day ]%></option>
+               <option value="job_duration"><%[ Job duration ]%></option>
+               <option value="avg_job_speed"><%[ Average job speed ]%></option>
+               <option value="job_status_per_day"><%[ Job status per day ]%></option>
+       </select>
+</div>
+<div class="w3-right w3-margin-top w3-margin-right" style="width: 215px">
+       <span><%[ Job level: ]%></span><br />
+       <select id="job_level" name="job_level" class="w3-select w3-border" style="width: 200px">
+               <option value="@" selected><%[ All levels ]%></option>
+               <option value="F"><%[ Full ]%></option>
+               <option value="I"><%[ Incremental ]%></option>
+               <option value="D"><%[ Differential ]%></option>
+       </select>
+</div>
 <span class="w3-margin-left"><%[ Legend: ]%></span>
-<div id="legend" class="w3-margin-left"></div>
-<div id="graphs_content" style="height: 500px"></div>
+<div id="legend_container" class="w3-margin-left"></div>
+<div id="graphs_container" style="height: 500px; margin-top: 60px;"></div>
 <script type="text/javascript">
        MonitorParams = ['jobs'];
        var graph_lang = {
-               "graph_title": "<%[ Graph: Jobs size / Time ]%>",
-               "xaxis_title": "<%[ Time ]%>",
-               "yaxis_title": "<%[ Jobs size (GiB) ]%>"
+               job_size: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job size / Time ]%>',
+                       xaxis_title: '<%[ Time ]%>',
+                       yaxis_title: '<%[ Job size ]%>'
+               },
+               job_size_per_hour: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job size / Hour ]%>',
+                       xaxis_title: '<%[ Hours ]%>',
+                       yaxis_title: '<%[ Job size ]%>'
+               },
+               job_size_per_day: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job size / Day ]%>',
+                       xaxis_title: '<%[ Days ]%>',
+                       yaxis_title: '<%[ Job size ]%>'
+               },
+               avg_job_size_per_hour: {
+                       graph_title: '<%[ Graph: ]%> <%[ Average job size / Hour ]%>',
+                       xaxis_title: '<%[ Hours ]%>',
+                       yaxis_title: '<%[ Job size ]%>'
+               },
+               avg_job_size_per_day: {
+                       graph_title: '<%[ Graph: ]%> <%[ Average job size / Day ]%>',
+                       xaxis_title: '<%[ Days ]%>',
+                       yaxis_title: '<%[ Job size ]%>'
+               },
+               job_files: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job files / Time ]%>',
+                       xaxis_title: '<%[ Time ]%>',
+                       yaxis_title: '<%[ Files count ]%>'
+               },
+               job_files_per_hour: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job files / Hour ]%>',
+                       xaxis_title: '<%[ Hours ]%>',
+                       yaxis_title: '<%[ Files count ]%>'
+               },
+               job_files_per_day: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job files / Day ]%>',
+                       xaxis_title: '<%[ Days ]%>',
+                       yaxis_title: '<%[ Files count ]%>'
+               },
+               avg_job_files_per_hour: {
+                       graph_title: '<%[ Graph: ]%> <%[ Average job files / Hour ]%>',
+                       xaxis_title: '<%[ Hours ]%>',
+                       yaxis_title: '<%[ Files count ]%>'
+               },
+               avg_job_files_per_day: {
+                       graph_title: '<%[ Graph: ]%> <%[ Average job files / Day ]%>',
+                       xaxis_title: '<%[ Days ]%>',
+                       yaxis_title: '<%[ Files count ]%>'
+               },
+               job_count_per_hour: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job count / Hour ]%>',
+                       xaxis_title: '<%[ Hours ]%>',
+                       yaxis_title: '<%[ Job count ]%>'
+               },
+               job_count_per_day: {
+                       graph_title: '<%[ Graph: ]%> <%[ Job count / Day ]%>',
+                       xaxis_title: '<%[ Days ]%>',
+                       yaxis_title: '<%[ Job count ]%>'
+               },
+               job_duration: {
+                       graph_title: '<%[ Graph: ]%> <%[ Jobs duration / Time ]%>',
+                       xaxis_title: '<%[ Time ]%>',
+                       yaxis_title: '<%[ Duration ]%>'
+               },
+               avg_job_speed: {
+                       graph_title: '<%[ Graph: ]%> <%[ Average job speed / Time ]%>',
+                       xaxis_title: '<%[ Time ]%>',
+                       yaxis_title: '<%[ Job speed ]%>'
+               },
+               job_status_per_day: {
+                       graph_title: '<%[ Graph: ]%> <%[ Jobs status / Day ]%>',
+                       xaxis_title: '<%[ Time ]%>',
+                       yaxis_title: '<%[ Jobs count ]%>'
+               },
+               filters: {
+                       custom_time_range: '<%[ Custom time range ]%>'
+               }
        };
-       var graph;
+       var oGraph;
        $(function() {
                MonitorCalls.push(function() {
-                       graph = new GraphClass(oData.jobs, graph_lang, 'graphs_content', 'legend', 'time_range', '<%=$this->DateFrom->ClientID%>', '<%=$this->DateTo->ClientID%>', '<%=$this->Clients->ClientID%>', 'graph_jobs');
+                       oGraph = new GraphClass({
+                               jobs: oData.jobs,
+                               txt: graph_lang,
+                               date_from: '<%=$this->DateFrom->ClientID%>',
+                               date_to: '<%=$this->DateTo->ClientID%>',
+                               client_filter: '<%=$this->Clients->ClientID%>'
+                       });
                });
        });
 </script>
-<p class="bold"><%[ Tip: for getting zoom, please mark area on graph. ]%></p>
-<p class="bold"><%[ Tip 2: for back from zoom, please click somewhere on graph. ]%></p>
+<p class="bold"><%[ Tip: to use zoom, please mark area on graph. ]%></p>
+<p class="bold"><%[ Tip 2: to exit zoom, please click somewhere on graph. ]%></p>