mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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.
This commit is contained in:
parent
75a6e009b9
commit
6cb1486f29
@ -105,9 +105,15 @@
|
|||||||
edit: {
|
edit: {
|
||||||
label: 'label.edit.region',
|
label: 'label.edit.region',
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
|
var data = {
|
||||||
|
id: args.context.regions[0].id,
|
||||||
|
name: args.data.name,
|
||||||
|
endpoint: args.data.endpoint
|
||||||
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('updateRegion'),
|
url: createURL('updateRegion'),
|
||||||
data: args.data,
|
data: data,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
args.response.success();
|
args.response.success();
|
||||||
$(window).trigger('cloudStack.refreshRegions');
|
$(window).trigger('cloudStack.refreshRegions');
|
||||||
@ -154,11 +160,11 @@
|
|||||||
title: 'label.details',
|
title: 'label.details',
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: { label: 'label.name', isEditable: true },
|
id: { label: 'label.id' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
endpoint: { label: 'label.endpoint', isEditable: true },
|
name: { label: 'label.name', isEditable: true },
|
||||||
id: { label: 'label.id', isEditable: true }
|
endpoint: { label: 'label.endpoint', isEditable: true }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataProvider: function(args) {
|
dataProvider: function(args) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user