Repository: cloudstack
Updated Branches:
  refs/heads/master 6b5c874fe -> 0761d2dda


CLOUDSTACK-7816: UI > Global Settings > add "Baremetal Rack Configuration" 
section.


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

Branch: refs/heads/master
Commit: 0761d2dda8844b91d841858a7c59f6b617c5d92f
Parents: 6b5c874
Author: Jessica Wang <[email protected]>
Authored: Thu Oct 30 11:27:38 2014 -0700
Committer: Jessica Wang <[email protected]>
Committed: Thu Oct 30 11:54:29 2014 -0700

----------------------------------------------------------------------
 ui/scripts/globalSettings.js | 68 +++++++++++++++++++++++++++++++++++++--
 1 file changed, 65 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0761d2dd/ui/scripts/globalSettings.js
----------------------------------------------------------------------
diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js
index f19de88..702799c 100644
--- a/ui/scripts/globalSettings.js
+++ b/ui/scripts/globalSettings.js
@@ -234,7 +234,7 @@
                         }
                     }
                 }
-            },           
+            },    
             baremetalRct: {
                 type: 'select',
                 title: 'Baremetal Rack Configuration',
@@ -303,9 +303,71 @@
                                 poll: pollAsyncJobResult
                             }
                         }
-                    }
+                    },                    
+                    
+                    detailView: {
+                       name: "details",
+                       actions: {
+                               remove: {
+                                label: 'Delete Baremetal Rack Configuration',
+                                messages: {
+                                    confirm: function(args) {
+                                        return 'Please confirm that you want 
to delete Baremetal Rack Configuration.';
+                                    },
+                                    notification: function(args) {
+                                        return 'Delete Baremetal Rack 
Configuration';
+                                    }
+                                },
+                                action: function(args) {                       
                
+                                    var data = {
+                                        id: args.context.baremetalRct[0].id
+                                    };
+                                    $.ajax({
+                                        url: createURL('deleteBaremetalRct'),
+                                        data: data,
+                                        success: function(json) {
+                                               var jid = 
json.deletebaremetalrctresponse.jobid;                                          
                                              
+                                            args.response.success({
+                                                _custom: {
+                                                    jobId: jid
+                                                }
+                                            });                                
                
+                                        }
+                                    });
+                                },
+                                notification: {
+                                    poll: pollAsyncJobResult
+                                }
+                            }
+                       },                      
+                       tabs: {
+                            details: {
+                                title: 'label.details',
+                                fields: [{
+                                       id: {
+                                               label: 'label.id'
+                                       },
+                                    url: {
+                                        label: 'label.url'
+                                    }
+                                }],
+                                dataProvider: function(args) {                 
                
+                                    var data = {
+                                        id: args.context.baremetalRct[0].id
+                                    };                                    
+                                    $.ajax({
+                                       url: createURL("listBaremetalRct"),
+                                       data: data,
+                                       success: function(json) {               
                                        
+                                               args.response.success({ data: 
json.listbaremetalrctresponse.baremetalrct[0] });
+                                       }
+                                    });                                       
+                                }
+                            }
+                        }                      
+                    }                    
                 }
-            },            
+            },     
             hypervisorCapabilities: {
                 type: 'select',
                 title: 'label.hypervisor.capabilities',

Reply via email to