diff --git a/api/src/com/cloud/api/response/AsyncJobResponse.java b/api/src/com/cloud/api/response/AsyncJobResponse.java index de7609dbfd6..4afdfba1665 100644 --- a/api/src/com/cloud/api/response/AsyncJobResponse.java +++ b/api/src/com/cloud/api/response/AsyncJobResponse.java @@ -147,7 +147,7 @@ public class AsyncJobResponse extends BaseResponse { this.jobInstanceId.setTableName("vm_template"); } else { // TODO : when we hit here, we need to add instanceType -> UUID entity table mapping - //assert(false); + assert(false); } } } diff --git a/api/src/com/cloud/api/response/SystemVmResponse.java b/api/src/com/cloud/api/response/SystemVmResponse.java index 881d816bfba..e493c330f7e 100644 --- a/api/src/com/cloud/api/response/SystemVmResponse.java +++ b/api/src/com/cloud/api/response/SystemVmResponse.java @@ -106,7 +106,6 @@ public class SystemVmResponse extends BaseResponse { @SerializedName("activeviewersessions") @Param(description="the number of active console sessions for the console proxy system vm") private Integer activeViewerSessions; - @SerializedName("objectId") @Param(description="the object id") private Long objectId; public Long getObjectId() { diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 842870dc4d7..66782096170 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -600,10 +600,15 @@ title: 'Disk', listView: { label: 'Disk Offerings', - fields: { - displaytext: { label: 'Name' }, - disksize: { label: 'Disk Size' }, - domain: { label: 'Domain'} + fields: { + name: { label: 'Name' }, + displaytext: { label: 'Description' }, + disksize: { + label: 'Disk Size', + converter: function(args) { + return args + " GB"; + } + } }, dataProvider: function(args) { $.ajax({ @@ -722,7 +727,105 @@ } } } - } + }, + + detailView: { + name: 'Disk offering details', + actions: { + edit: { + label: 'Edit', + action: function(args) { + var array1 = []; + array1.push("&name=" + todb(args.data.name)); + array1.push("&displaytext=" + todb(args.data.displaytext)); + $.ajax({ + url: createURL("updateDiskOffering&id=" + args.context.diskOfferings[0].id + array1.join("")), + dataType: "json", + success: function(json) { + var item = json.updatediskofferingresponse.diskoffering; + args.response.success({data: item}); + } + }); + } + }, + + 'delete': { + label: 'Delete disk offering', + messages: { + confirm: function(args) { + return 'Are you sure you want to delete this disk offering?'; + }, + success: function(args) { + return 'Disk offering is being deleted.'; + }, + notification: function(args) { + return 'Deleting disk offering'; + }, + complete: function(args) { + return 'Disk offering has been deleted.'; + } + }, + action: function(args) { + $.ajax({ + url: createURL("deleteDiskOffering&id=" + args.context.diskOfferings[0].id), + dataType: "json", + async: true, + success: function(json) { + args.response.success(); + } + }); + }, + notification: { + poll: function(args) { + args.complete(); + } + } + } + }, + + tabs: { + details: { + title: 'Details', + + fields: [ + { + name: { + label: 'Name', + isEditable: true + } + }, + { + id: { label: 'ID' }, + displaytext: { + label: 'Description', + isEditable: true + }, + iscustomized: { + label: 'Customized', + converter: cloudStack.converters.toBooleanText + }, + disksize: { + label: 'Disk Size', + converter: function(args) { + return args + " GB"; + } + }, + tags: { label: 'Storage tags' }, + domain: { label: 'Domain' } + } + ], + + dataProvider: function(args) { + args.response.success( + { + actionFilter: diskOfferingActionfilter, + data:args.context.diskOfferings[0] + } + ); + } + } + } + } } }, networkOfferings: { @@ -854,6 +957,14 @@ return allowedActions; } + var diskOfferingActionfilter = function(args) { + var jsonObj = args.context.item; + var allowedActions = []; + allowedActions.push("edit"); + allowedActions.push("delete"); + return allowedActions; + } + var networkOfferingsActionfilter = function(args) { var jsonObj = args.context.item; var allowedActions = [];