]> git.proxmox.com Git - pmg-gui.git/commitdiff
check if load is successfull in GeneralMailStatistics
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 18 Dec 2017 11:26:11 +0000 (12:26 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 18 Dec 2017 12:34:22 +0000 (13:34 +0100)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/GeneralMailStatistics.js

index c8e5b26439f48dea920853d402ba226aa882c790..84f0e38105eafcfd7624f5f0a3065c2d5f0a9c21 100644 (file)
@@ -202,7 +202,10 @@ Ext.define('PMG.GeneralMailStatistics', {
            staturl: "/api2/json/statistics/mail",
            fields: [ 'name', 'value', 'percentage' ],
            listeners: {
-               load: function(store, records) {
+               load: function(store, records, success) {
+                   if (!success || records.length <= 0) {
+                       return;
+                   }
                    var data = me.getGeneralData(records[0].data);
                    totalgrid.store.setData(data);
                    data = me.getInData(records[0].data);