Skip to content

Commit b4286e7

Browse files
committed
Add 'edit region' action
1 parent acce7d9 commit b4286e7

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

ui/scripts/regions.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,19 @@
8484
detailView: {
8585
name: 'Region details',
8686
actions: {
87+
edit: {
88+
label: 'label.edit.region',
89+
action: function(args) {
90+
$.ajax({
91+
url: createURL('updateRegion'),
92+
data: args.data,
93+
success: function(json) {
94+
args.response.success();
95+
$(window).trigger('cloudStack.refreshRegions');
96+
}
97+
});
98+
}
99+
},
87100
remove: {
88101
label: 'label.remove.region',
89102
messages: {
@@ -109,11 +122,11 @@
109122
title: 'label.details',
110123
fields: [
111124
{
112-
name: { label: 'label.name' },
125+
name: { label: 'label.name', isEditable: true },
113126
},
114127
{
115-
endpoint: { label: 'label.endpoint' },
116-
id: { label: 'label.id' }
128+
endpoint: { label: 'label.endpoint', isEditable: true },
129+
id: { label: 'label.id', isEditable: true }
117130
}
118131
],
119132
dataProvider: function(args) {

0 commit comments

Comments
 (0)