cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/ui-ucs to 002056c
Date Fri, 17 May 2013 21:34:54 GMT
Updated Branches:
  refs/heads/ui-ucs fb2ba4bdc -> 002056c26


CLOUDSTACK UI - UCS - Blades listView - add detailView.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/002056c2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/002056c2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/002056c2

Branch: refs/heads/ui-ucs
Commit: 002056c2647d06931f5240c9597b64630eb04cef
Parents: fb2ba4b
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri May 17 14:32:56 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri May 17 14:32:56 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   90 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 88 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/002056c2/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index b3a5fb4..f322f19 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10887,11 +10887,24 @@
         title: 'UCS',
         id: 'ucs',
         listView: {
+          id: 'ucsManagers',
           fields: {
             fieldA: { label: 'Field A' },
             fieldB: { label: 'Field B' }
           },
           dataProvider: function(args) {
+            /*
+            $.ajax({
+              url: createURL('listUcsManager'),
+              data: {
+                zoneid: args.context.physicalResources[0].id
+              },
+              success: function(json) {
+                
+              }
+            });
+            */
+            
             args.response.success({
               data: [
                 { fieldA: 'fieldA1', fieldB: 'fieldB1' },
@@ -10909,14 +10922,87 @@
                     fieldA: { label: 'Field A' },
                     fieldB: { label: 'Field B' }
                   },
-                  dataProvider: function(args) {
+                  dataProvider: function(args) {                    
+                    /*
+                    $.ajax({
+                      url: createURL('listUcsBlade'),
+                      data: {
+                        ucsmanagerid: args.context.ucsManagers[0].id
+                      },
+                      success: function(json) {
+                        
+                      }                      
+                    });
+                    */                    
                     args.response.success({
                       data: [
                         { fieldA: 'fieldA1', fieldB: 'fieldB1' },
                         { fieldA: 'fieldA2', fieldB: 'fieldB2' }
                       ]
-                    });
+                    });                  
                   },
+                                   
+                  detailView: {
+                    name: 'Service offering details',
+                    actions: {                      
+                      associateProfileToBlade: {
+                        label: 'associate profile to blade',
+                        messages: {
+                          notification: function(args) {
+                            return 'associate profile to blade';
+                          }
+                        },
+                        createForm: {
+                          title: 'associate profile to blade',
+                          fields: {
+                            profileid: {
+                              label: 'profile',
+                              select: function(args) {
+                                var items = [];                                
+                                items.push({id: 'aaa', description: 'aaa'});
+                                items.push({id: 'bbb', description: 'bbb'});
+                                args.response.success({data: items});
+                              },
+                              validation: { required: true }
+                            }
+                          }
+                        },
+                        action: function(args) {
+                          args.response.success();
+                        },
+                        notification: {
+                          poll: function(args) {
+                            args.complete();
+                          }
+                        }
+                      }                      
+                    },                    
+                    tabs: {
+                      details: {
+                        title: 'label.details',
+
+                        fields: [
+                          {
+                            fieldA: { label: 'fieldA' }
+                          },
+                          {
+                            fieldB: { label: 'fieldB' }
+                          }
+                        ],
+
+                        dataProvider: function(args) { 
+                          args.response.success(
+                            {                              
+                              data: {
+                                fieldA: 'fieldAAA',
+                                fieldB: 'fieldBBB'
+                              }
+                            }
+                          );
+                        }
+                      }
+                    }                   
+                  }                  
                 }
               }
             }


Mime
View raw message