]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/GeneralMailStatistics.js
check if load is successfull in GeneralMailStatistics
[pmg-gui.git] / 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);