cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [2/2] git commit: updated refs/heads/4.2 to 16c720f
Date Tue, 09 Jul 2013 20:53:14 GMT
UI: Add initial UCS section to infrastructure page


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

Branch: refs/heads/4.2
Commit: 16c720f7130c1edcb1fa956f696caa809c7df794
Parents: bbff5e8
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Jul 9 13:48:48 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Jul 9 13:53:04 2013 -0700

----------------------------------------------------------------------
 ui/css/cloudstack3.css                |  10 +-
 ui/images/bg-system-chart-compute.png | Bin 85957 -> 94812 bytes
 ui/scripts/system.js                  | 281 +++++++++++++++++++++++++++++
 ui/scripts/ui-custom/zoneChart.js     |   7 +
 4 files changed, 296 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16c720f7/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 50a36f0..1b255c9 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -5010,6 +5010,11 @@ Dialogs*/
   top: 497px;
 }
 
+.system-chart.compute ul.resources li.ucs {
+  left: 199px;
+  top: 406px;
+}
+
 /** Network*/
 .system-chart.network {
 }
@@ -11870,8 +11875,9 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form
div.form-it
 
 .attach .icon,
 .attachISO .icon,
-.attachDisk .icon {
-  background-position: -101px -3px;
+.attachDisk .icon,
+.associateProfileToBlade .icon {
+  background-position: -104px -3px;
 }
 
 .attach:hover .icon,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16c720f7/ui/images/bg-system-chart-compute.png
----------------------------------------------------------------------
diff --git a/ui/images/bg-system-chart-compute.png b/ui/images/bg-system-chart-compute.png
index 1125e80..36c7cd4 100644
Binary files a/ui/images/bg-system-chart-compute.png and b/ui/images/bg-system-chart-compute.png
differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16c720f7/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 3daea63..f290144 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6930,6 +6930,7 @@
 
               return listView;
             },
+
             secondaryStorage: function() {
               var listView = $.extend(
                 true, {},
@@ -12988,6 +12989,286 @@
         }
       },
 
+      ucs: {
+        title: 'UCS',
+        id: 'ucs',
+        listView: {
+          id: 'ucsManagers',
+          fields: {
+            name: { label: 'label.name' },
+            url: { label: 'label.url' }
+          },
+          dataProvider: function(args) {
+            /*
+            $.ajax({
+              url: createURL('listUcsManager'),
+              data: {
+                zoneid: args.context.physicalResources[0].id
+              },
+              success: function(json) {
+                
+              }
+            });
+            */
+            
+            args.response.success({
+              data: [
+                { id: '73695389-13ba-48e4-b661-a5e56966f577', name: 'UCS Manager 1', url:
'10.196.72.1' },
+                { id: '32588a3e-9d70-4a23-9117-42da48fa8c10', name: 'UCS Manager 2', url:
'10.196.72.2' }
+              ]
+            });
+          },
+          actions: {            
+            add: {
+              label: 'Add UCS Manager',
+
+              messages: {               
+                notification: function(args) {
+                  return 'Add UCS Manager';
+                }
+              },
+
+              createForm: {
+                title: 'Add UCS Manager',
+                fields: {
+                  name: {
+                    label: 'label.name',                    
+                    validation: { required: false }
+                  },
+                  url: {
+                    label: 'label.url',
+                    validation: { required: true }
+                  },
+                  username: {
+                    label: 'label.username',
+                    validation: { required: true }
+                  },
+                  password: {
+                    label: 'label.password',
+                    validation: { required: true }
+                  }                  
+                }
+              },
+
+              action: function(args) {                
+                var data = {
+                  zoneid: args.context.physicalResources[0].id,
+                  url: args.data.url,
+                  username: args.data.username,
+                  password: args.data.password
+                };    
+                if(args.data.name != null && args.data.name.length > 0) {
+                  $.extend(data, {
+                    name: args.data.name
+                  });
+                }
+                /*
+                $.ajax({
+                  url: createURL('addUcsManager'),
+                  data: data,                 
+                  success: function(json) {
+                    
+                  },
+                  error: function(data) {
+                    args.response.error(parseXMLHttpResponse(data));
+                  }
+                });
+                */
+                
+                args.response.success({data:  { id: '85a2ff00-ed42-4a18-8f5f-bb75c9ffd413',
name: 'UCS Manager 3', url: '10.196.72.3' }});
+                
+              },
+
+              notification: {
+                poll: function(args) {
+                  args.complete();
+                }
+              }
+            }            
+          },
+          
+          detailView: {
+            isMaximized: true,
+            noCompact: true,
+            tabs: {
+              blades: {
+                title: 'Blades',
+                listView: {
+                  fields: {
+                    //dn: { label: 'Distinguished Name' },
+                    chassis: { label: 'Chassis' }, 
+                    bladeid: { label: 'Blade ID' },
+                    associatedProfileDn: { label: 'Associated Profile' }
+                  },
+                  dataProvider: function(args) {                    
+                    /*
+                    $.ajax({
+                      url: createURL('listUcsBlade'),
+                      data: {
+                        ucsmanagerid: args.context.ucsManagers[0].id
+                      },
+                      success: function(json) {
+                        
+                      }                      
+                    });
+                    */         
+
+                    var data =  [
+                      { id: '85a2ff00-ed42-4a18-8f5f-bb75c9ffd413', hostId: '62be4b10-a828-4ea2-aed8-9ad1d0812ff9',
dn: 'sys/chassis-1/blade-1', associatedProfileDn: '' },
+                      { id: '85a2ff00-ed42-4a18-8f5f-bb75c9ffd413', hostId: '62be4b10-a828-4ea2-aed8-9ad1d0812ff9',
dn: 'sys/chassis-2/blade-2', associatedProfileDn: '' },                        
+                      { id: '85a2ff00-ed42-4a18-8f5f-bb75c9ffd413', hostId: '62be4b10-a828-4ea2-aed8-9ad1d0812ff9',
dn: 'sys/chassis-3/blade-3', associatedProfileDn: '' }
+                    ];
+                               
+                    for(var i = 0; i < data.length; i++) {
+                      var array1 = data[i].dn.split('/');                      
+                      data[i].chassis = array1[1];
+                      data[i].bladeid = array1[2];
+                    }
+
+                    args.response.success({
+                      data: data
+                    });                  
+                  },                  
+                  actions: {                      
+                    associateProfileToBlade: {
+                      label: 'Associate Profile to Blade',
+                      addRow: 'false',
+                      messages: {
+                        notification: function(args) {
+                          return 'Associate Profile to Blade';
+                        }
+                      },
+                      createForm: {
+                        title: 'Associate Profile to Blade',
+                        fields: {
+                          profiledn: {
+                            label: 'Select Profile',
+                            select: function(args) {
+                              var items = [];     
+                              
+                              /*
+                              $.ajax({
+                                url: createURL('listUcsProfile'),
+                                data: {
+                                  ucsmanagerid: args.context.ucsManagers[0].id
+                                },
+                                success: function(json) {
+                                  
+                                }
+                              });
+                              */
+                              
+                              items.push({id: 'Service_Profile_Demo1', description: 'Service_Profile_Demo1'});
+                              items.push({id: 'Service_Profile_Demo2', description: 'Service_Profile_Demo2'});
+                              items.push({id: 'Service_Profile_Demo3', description: 'Service_Profile_Demo3'});
+                              items.push({id: 'Service_Profile_Demo4', description: 'Service_Profile_Demo4'});
+                              items.push({id: 'Service_Profile_Demo5', description: 'Service_Profile_Demo5'});
+                              items.push({id: 'Service_Profile_Demo6', description: 'Service_Profile_Demo6'});
+                              items.push({id: 'Service_Profile_Demo7', description: 'Service_Profile_Demo7'});
+                              args.response.success({data: items});
+                            },
+                            validation: { required: true }
+                          }
+                        }
+                      },
+                      action: function(args) {
+                        /*
+                        $.ajax({
+                          url: createURL('associatesUscProfileToBlade'),
+                          data: {
+                            ucsmanagerid: args.context.ucsManagers[0].id,
+                            profiledn: args.data.profiledn, 
+                            bladeid: '1234567890' //to change later
+                          },
+                          success: function(json) {
+                            
+                          }
+                        });
+                        */
+                        args.response.success({data: { associatedProfileDn: args.data.profiledn
}});
+                      },
+                      notification: {
+                        poll: function(args) {
+                          args.complete();
+                        }
+                      }
+                    }                      
+                  }
+                  
+                  /*,                                                     
+                  detailView: {
+                    name: 'blade details',
+                    noCompact: true,
+                    actions: {                      
+                      associateProfileToBlade: {
+                        label: 'Associate Profile to Blade',
+                        messages: {
+                          notification: function(args) {
+                            return 'Associate Profile to Blade';
+                          }
+                        },
+                        createForm: {
+                          title: 'Associate Profile to Blade',
+                          fields: {
+                            profiledn: {
+                              label: 'profile',
+                              select: function(args) {
+                                var items = [];     
+                                
+                                items.push({id: 'profile_1', description: 'profile_1'});
+                                items.push({id: 'profile_2', description: 'profile_2'});
+                                items.push({id: 'profile_3', description: 'profile_3'});
+                                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'
+                              }
+                            }
+                          );
+                        }
+                      }
+                    }                   
+                  } 
+                  */
+                                    
+                }
+              }
+            }
+          }
+        }
+      },      
+
       'secondary-storage': {
         title: 'label.secondary.storage',
         id: 'secondarystorages',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16c720f7/ui/scripts/ui-custom/zoneChart.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneChart.js b/ui/scripts/ui-custom/zoneChart.js
index fcfc766..5d4e0c0 100644
--- a/ui/scripts/ui-custom/zoneChart.js
+++ b/ui/scripts/ui-custom/zoneChart.js
@@ -140,6 +140,13 @@
             }
           },
 
+          ucs: {
+            label: 'UCS',
+            viewAll: {
+              action: actions.listView('ucs', context)
+            }
+          },
+
           secondaryStorage: {
             label: 'Secondary Storage',
             viewAll: {


Mime
View raw message