Skip to content

Commit 6cb1486

Browse files
author
Jessica Wang
committed
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - implement Edit Region action, ID field shouldn't be editable since ID is the base when searching for an entry in the database.
1 parent 75a6e00 commit 6cb1486

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎ui/scripts/regions.js‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,15 @@
105105
edit: {
106106
label: 'label.edit.region',
107107
action: function(args) {
108+
var data = {
109+
id: args.context.regions[0].id,
110+
name: args.data.name,
111+
endpoint: args.data.endpoint
112+
};
113+
108114
$.ajax({
109115
url: createURL('updateRegion'),
110-
data: args.data,
116+
data: data,
111117
success: function(json) {
112118
args.response.success();
113119
$(window).trigger('cloudStack.refreshRegions');
@@ -154,11 +160,11 @@
154160
title: 'label.details',
155161
fields: [
156162
{
157-
name: { label: 'label.name', isEditable: true },
163+
id: { label: 'label.id' }
158164
},
159165
{
160-
endpoint: { label: 'label.endpoint', isEditable: true },
161-
id: { label: 'label.id', isEditable: true }
166+
name: { label: 'label.name', isEditable: true },
167+
endpoint: { label: 'label.endpoint', isEditable: true }
162168
}
163169
],
164170
dataProvider: function(args) {

0 commit comments

Comments
 (0)