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/master to 893619d
Date Wed, 07 Aug 2013 21:20:20 GMT
Updated Branches:
  refs/heads/master b9623155a -> 893619dec


CLOUDSTACK-4093: UI > Infrastructure > zone > UCS Manager - (1) add details tab (2)
add Delete UCS Manager action.


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

Branch: refs/heads/master
Commit: 893619dece4c54f751d838c4297534bd0f301234
Parents: b962315
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Aug 7 14:17:25 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Aug 7 14:20:11 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/893619de/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e9ba4c6..8105b58 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -14058,7 +14058,91 @@
                     detailView: {
                         isMaximized: true,
                         noCompact: true,
-                        tabs: {
+                        actions: {
+                        	remove: {
+                                label: 'Delete UCS Manager',
+                                messages: {
+                                    confirm: function(args) {
+                                        return 'Please confirm that you want to delete UCS
Manager';
+                                    },
+                                    notification: function(args) {
+                                        return 'Delete UCS Manager';
+                                    }
+                                },
+                                action: function(args) {
+                                    var data = {
+                                    	ucsmanagerid: args.context.ucsManagers[0].id
+                                    };
+                                    $.ajax({
+                                        url: createURL('deleteUcsManager'),
+                                        data: data,                                     
  
+                                        success: function(json) {
+                                            args.response.success();
+                                        },
+                                        error: function(data) {
+                                            args.response.error(parseXMLHttpResponse(data));
+                                        }
+                                    });
+                                },
+                                notification: {
+                                    poll: function(args) {
+                                        args.complete();
+                                    }
+                                }
+                            }
+                        },                        
+                        tabs: {   
+                            details: {
+                                title: 'label.details',
+
+                                fields: [{
+                                    name: {
+                                        label: 'label.name',                            
          
+                                    }
+                                }, {
+                                    id: {
+                                        label: 'label.id'
+                                    },   
+                                    url: {
+                                        label: 'label.url'
+                                    },
+                                }],
+
+                                dataProvider: function(args) {                          
         
+                                    $.ajax({
+                                    	url: createURL('listUcsManagers'),
+                                    	data: {
+                			                zoneid: args.context.physicalResources[0].id //to change???
+                			            },                                      
+                                        success: function(json) {
+                                            //for testing only (begin)
+              			            	    /*	            	  
+              			            	    json = 
+              			            	    {
+              			            	        "listucsmanagerreponse": {
+              			            		        "count": 1,
+              			            		        "ucsmanager": [
+              			            		            {
+              			            		                "id": "07b5b813-83ed-4859-952c-c95cafb63ac4",
+              			            		                "name": "ucsmanager",
+              			            		                "url": "10.223.184.2",
+              			            		                "zoneid": "54c9a65c-ba89-4380-96e9-1d429c5372e3"
+              			            		            }
+              			            		        ]
+              			            	        }
+              			            	    };
+              			            	    */
+              			            	    //for testing only (end)
+                                        	                                        	
+                                            var item = json.listucsmanagerreponse.ucsmanager[0];
+                                            args.response.success({                     
                          
+                                                data: item
+                                            });
+                                        }
+                                    });
+                                }
+                            },                            
+                            
                             blades: {
                                 title: 'Blades',
                                 listView: {
@@ -14276,7 +14360,7 @@
                                         }
                                     }                                 
                                 }
-                            }
+                            }                         
                         }
                     }
                 }


Mime
View raw message