diff --git a/ui/scripts/system.js b/ui/scripts/system.js index c8ac616da1e..4040aad440b 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -4821,188 +4821,9 @@ }); } } - }, - - enable: { - label: 'Enable cluster', - messages: { - confirm: function(args) { - return 'Are you sure you want to enable this cluster?'; - }, - success: function(args) { - return 'This cluster is being enabled.'; - }, - notification: function(args) { - return 'Enabling cluster'; - }, - complete: function(args) { - return 'Cluster has been enabled.'; - } - }, - action: function(args) { - $.ajax({ - url: createURL("updateCluster&id=" + args.context.clusters[0].id + "&allocationstate=Enabled"), - dataType: "json", - async: true, - success: function(json) { - var item = json.updateclusterresponse.cluster; - args.response.success({ - actionFilter: clusterActionfilter, - data:item - }); - } - }); - }, - notification: { - poll: function(args) { - args.complete(); - } - } - }, - - disable: { - label: 'Disable cluster', - messages: { - confirm: function(args) { - return 'Are you sure you want to disable this cluster?'; - }, - success: function(args) { - return 'This cluster is being disabled.'; - }, - notification: function(args) { - return 'Disabling cluster'; - }, - complete: function(args) { - return 'Cluster has been disabled.'; - } - }, - action: function(args) { - $.ajax({ - url: createURL("updateCluster&id=" + args.context.clusters[0].id + "&allocationstate=Disabled"), - dataType: "json", - async: true, - success: function(json) { - var item = json.updateclusterresponse.cluster; - args.response.success({ - actionFilter: clusterActionfilter, - data:item - }); - } - }); - }, - notification: { - poll: function(args) { - args.complete(); - } - } - }, - - manage: { - label: 'Manage cluster', - messages: { - confirm: function(args) { - return 'Are you sure you want to manage this cluster?'; - }, - success: function(args) { - return 'This cluster is being managed.'; - }, - notification: function(args) { - return 'Managing cluster'; - }, - complete: function(args) { - return 'Cluster has been managed.'; - } - }, - action: function(args) { - $.ajax({ - url: createURL("updateCluster&id=" + args.context.clusters[0].id + "&managedstate=Managed"), - dataType: "json", - async: true, - success: function(json) { - var item = json.updateclusterresponse.cluster; - args.response.success({ - actionFilter: clusterActionfilter, - data:item - }); - } - }); - }, - notification: { - poll: function(args) { - args.complete(); - } - } - }, - - unmanage: { - label: 'Unmanage cluster', - messages: { - confirm: function(args) { - return 'Are you sure you want to unmanage this cluster?'; - }, - success: function(args) { - return 'This cluster is being unmanaged.'; - }, - notification: function(args) { - return 'Unmanaging cluster'; - }, - complete: function(args) { - return 'Cluster has been unmanaged.'; - } - }, - action: function(args) { - $.ajax({ - url: createURL("updateCluster&id=" + args.context.clusters[0].id + "&managedstate=Unmanaged"), - dataType: "json", - async: true, - success: function(json) { - var item = json.updateclusterresponse.cluster; - args.response.success({ - actionFilter: clusterActionfilter, - data:item - }); - } - }); - }, - notification: { - poll: function(args) { - args.complete(); - } - } - }, - - 'delete': { - label: 'Delete' , - messages: { - confirm: function(args) { - return 'Please confirm that you want to delete this cluster.'; - }, - success: function(args) { - return 'Cluster is being deleted.'; - }, - notification: function(args) { - return 'Deleting cluster'; - }, - complete: function(args) { - return 'Cluster has been deleted.'; - } - }, - action: function(args) { - $.ajax({ - url: createURL("deleteCluster&id=" + args.context.clusters[0].id), - dataType: "json", - async: true, - success: function(json) { - args.response.success({data:{}}); - } - }); - }, - notification: { - poll: function(args) { args.complete(); } - } } - }, + detailView: { viewAll: { path: '_zone.hosts', label: 'Hosts' },