You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/09 22:46:31 UTC

[49/50] [abbrv] Merge branch 'master' into ui-ucs

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9334dab7/ui/css/cloudstack3.css
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9334dab7/ui/scripts/system.js
----------------------------------------------------------------------
diff --cc ui/scripts/system.js
index bbe2ff8,ecda086..009c736
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@@ -5760,53 -6927,89 +6927,90 @@@
  
                return listView;
              },
 +
              secondaryStorage: function() {
-               var listView = $.extend(true, {}, cloudStack.sections.system.subsections['secondary-storage'].listView, {
-                 dataProvider: function (args) {
-                   var searchByArgs = args.filterBy.search.value.length ?
-                     '&name=' + args.filterBy.search.value : '';
- 
-                   var data = { 
-                     type: 'SecondaryStorage', 
-                     page: args.page, 
-                     pageSize: pageSize, 
-                     listAll: true 
-                   };                  
- 
-                   $.ajax({
-                     url: createURL('listHosts' + searchByArgs),
-                     data: data,
-                     success: function (json) {
-                       args.response.success({ data: json.listhostsresponse.host });
-                     },
-                     error: function (json) {
-                       args.response.error(parseXMLHttpResponse(json));
-                     }
-                   });
-                 },
- 
-                 detailView: {
-                   updateContext: function (args) {
-                     var zone;
+               var listView = $.extend(
+                 true, {},
+                 cloudStack.sections.system.subsections['secondary-storage'], {
+                   sections: {
+                     secondaryStorage: {
+                       listView: {
+                         dataProvider: function (args) {                         
+                           var searchByArgs = args.filterBy.search.value.length ?
+                             '&name=' + args.filterBy.search.value : '';
+ 
+                           var data = {
+                             type: 'SecondaryStorage',
+                             page: args.page,
+                             pageSize: pageSize,
+                             listAll: true
+                           };
  
-                     $.ajax({
-                       url: createURL('listZones'),
-                       data: { id: args.context.secondarystorages[0].zoneid },
-                       async: false,
-                       success: function (json) {
-                         zone = json.listzonesresponse.zone[0];
-                       }
-                     });
+                           $.ajax({
+                             url: createURL('listImageStores' + searchByArgs),
+                             data: data,
+                             success: function (json) {
+                               args.response.success({ data: json.listimagestoreresponse.imagestore });
+                             },
+                             error: function (json) {
+                               args.response.error(parseXMLHttpResponse(json));
+                             }
+                           });
+                         }
+                 
+                         /*
+                         ,
+                         detailView: {
+                           updateContext: function (args) {                            
+                             return {
+                               zones: [{}]
+                             };
+                             
+                           }
+                         }
+                         */
+                 
+                       }                      
+                     },
+                     cacheStorage: {
+                       listView: {
+                         dataProvider: function (args) {                        
+                           var searchByArgs = args.filterBy.search.value.length ?
+                             '&name=' + args.filterBy.search.value : '';
  
-                     selectedZoneObj = zone;
+                           var data = {                            
+                             page: args.page,
+                             pageSize: pageSize
+                           };
  
-                     return {
-                       zones: [zone]
-                     };
+                           $.ajax({
+                             url: createURL('listCacheStores' + searchByArgs),
+                             data: data,
+                             success: function (json) {
+                               args.response.success({ data: json.listcachestoreresponse.imagestore });
+                             },
+                             error: function (json) {
+                               args.response.error(parseXMLHttpResponse(json));
+                             }
+                           });
+                         }
+                     
+                         /*
+                         ,
+                         detailView: {
+                           updateContext: function (args) {                            
+                             return {
+                               zones: [{}]
+                             };
+                           }
+                         }
+                         */
+                     
+                       }                      
+                     }
                    }
                  }
-               });
+               );
  
                return listView;
              },

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9334dab7/ui/scripts/ui-custom/zoneChart.js
----------------------------------------------------------------------