]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/HourlyMailDistribution.js
spam-info-grid: style the spam info grid via css variables
[pmg-gui.git] / js / HourlyMailDistribution.js
index 6ec85300a3d7d8ec5fc1c1bb6e5e298c5ca0558f..a15b1a46615c4e6cbec9f7642be60548c2f7a9d3 100644 (file)
@@ -11,11 +11,11 @@ Ext.define('PMG.MailDistChart', {
        title: gettext('Count'),
        position: 'left',
        grid: true,
-       minimum: 0
+       minimum: 0,
     }, {
        type: 'category',
        position: 'bottom',
-       fields: ['index']
+       fields: ['index'],
     }],
 
     initComponent: function() {
@@ -41,12 +41,13 @@ Ext.define('PMG.MailDistChart', {
                renderer: function(tooltip, record, item) {
                    var start = record.get('index');
                    var end = start+1;
-                   tooltip.setHtml('Time: ' + start + ' - ' + end + '<br>' +
+                   tooltip.setHtml('Time: ' + start.toString() +
+                                   ' - ' + end.toString() + '<br>' +
                                    'Count: ' + record.get(item.field));
-               }
-           }
+               },
+           },
        });
-    }
+    },
 });
 
 Ext.define('PMG.HourlyMailDistribution', {
@@ -59,14 +60,14 @@ Ext.define('PMG.HourlyMailDistribution', {
     bodyPadding: '10 0 0 0',
     defaults: {
        width: 700,
-       padding: '0 0 10 10'
+       padding: '0 0 10 10',
     },
 
     layout: 'column',
 
     title: gettext('Statistics') + ': ' + gettext('Hourly Distribution'),
 
-    tbar: [ { xtype: 'pmgStatTimeSelector' } ],
+    tbar: [{ xtype: 'pmgStatTimeSelector' }],
 
     initComponent: function() {
        var me = this;
@@ -84,7 +85,7 @@ Ext.define('PMG.HourlyMailDistribution', {
                { type: 'integer', name: 'viruscount_ou' },
                { type: 'integer', name: 'bounces_in' },
                { type: 'integer', name: 'bounces_out' },
-           ]
+           ],
        });
 
        me.items = [
@@ -92,18 +93,18 @@ Ext.define('PMG.HourlyMailDistribution', {
                xtype: 'pmgMailDistChart',
                title: gettext('Incoming Mails'),
                field: 'count_in',
-               store: store
+               store: store,
            },
            {
                xtype: 'pmgMailDistChart',
                title: gettext('Outgoing Mails'),
                field: 'count_out',
-               store: store
-           }
+               store: store,
+           },
        ];
 
        me.callParent();
 
        me.on('destroy', store.destroy, store);
-    }
+    },
 });