mirror of https://github.com/apache/cloudstack.git
api,engine/schema,server: vm readonly details rename (#4671)
* api,engine/schema,server: vm readonly details rename Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * ui: update api response key Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
ecc18163ca
commit
6d0d7012f1
|
|
@ -270,9 +270,9 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
|
|||
@Param(description = "Vm details in key/value pairs.", since = "4.2.1")
|
||||
private Map details;
|
||||
|
||||
@SerializedName("readonlyuidetails")
|
||||
@Param(description = "List of UI read-only Vm details as comma separated string.", since = "4.13.0")
|
||||
private String readOnlyUIDetails;
|
||||
@SerializedName("readonlydetails")
|
||||
@Param(description = "List of read-only Vm details as comma separated string.", since = "4.16.0")
|
||||
private String readOnlyDetails;
|
||||
|
||||
@SerializedName(ApiConstants.SSH_KEYPAIR)
|
||||
@Param(description = "ssh key-pair")
|
||||
|
|
@ -854,8 +854,8 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
|
|||
this.details = details;
|
||||
}
|
||||
|
||||
public void setReadOnlyUIDetails(String readOnlyUIDetails) {
|
||||
this.readOnlyUIDetails = readOnlyUIDetails;
|
||||
public void setReadOnlyDetails(String readOnlyDetails) {
|
||||
this.readOnlyDetails = readOnlyDetails;
|
||||
}
|
||||
|
||||
public void setOsTypeId(String osTypeId) {
|
||||
|
|
@ -878,8 +878,8 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
|
|||
return details;
|
||||
}
|
||||
|
||||
public String getReadOnlyUIDetails() {
|
||||
return readOnlyUIDetails;
|
||||
public String getReadOnlyDetails() {
|
||||
return readOnlyDetails;
|
||||
}
|
||||
|
||||
public Boolean getDynamicallyScalable() {
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ public interface QueryService {
|
|||
"user.vm.blacklisted.details", "rootdisksize, cpuOvercommitRatio, memoryOvercommitRatio, Message.ReservedCapacityFreed.Flag",
|
||||
"Determines whether users can view certain VM settings. When set to empty, default value used is: rootdisksize, cpuOvercommitRatio, memoryOvercommitRatio, Message.ReservedCapacityFreed.Flag.", true);
|
||||
|
||||
static final ConfigKey<String> UserVMReadOnlyUIDetails = new ConfigKey<String>("Advanced", String.class,
|
||||
"user.vm.readonly.ui.details", "dataDiskController, rootDiskController",
|
||||
"List of UI read-only VM settings/details as comma separated string", true);
|
||||
static final ConfigKey<String> UserVMReadOnlyDetails = new ConfigKey<String>("Advanced", String.class,
|
||||
"user.vm.readonly.details", "dataDiskController, rootDiskController",
|
||||
"List of read-only VM settings/details as comma separated string", true);
|
||||
|
||||
ConfigKey<Boolean> SortKeyAscending = new ConfigKey<>("Advanced", Boolean.class, "sortkey.algorithm", "true",
|
||||
"Sort algorithm - ascending or descending - to use. For entities that use sort key(template, disk offering, service offering, " +
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
-- Schema upgrade from 4.15.1.0 to 4.16.0.0
|
||||
--;
|
||||
|
||||
|
||||
--;
|
||||
-- Stored procedure to do idempotent column add;
|
||||
-- This is copied from schema-41000to41100.sql
|
||||
|
|
@ -301,3 +300,6 @@ from
|
|||
left join
|
||||
`cloud`.`resource_count` secondary_storage_count ON domain.id = secondary_storage_count.domain_id
|
||||
and secondary_storage_count.type = 'secondary_storage';
|
||||
|
||||
-- Update name for global configuration user.vm.readonly.ui.details
|
||||
Update configuration set name='user.vm.readonly.details' where name='user.vm.readonly.ui.details';
|
||||
|
|
|
|||
|
|
@ -4143,6 +4143,6 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
|
|||
|
||||
@Override
|
||||
public ConfigKey<?>[] getConfigKeys() {
|
||||
return new ConfigKey<?>[] {AllowUserViewDestroyedVM, UserVMBlacklistedDetails, UserVMReadOnlyUIDetails, SortKeyAscending, AllowUserViewAllDomainAccounts};
|
||||
return new ConfigKey<?>[] {AllowUserViewDestroyedVM, UserVMBlacklistedDetails, UserVMReadOnlyDetails, SortKeyAscending, AllowUserViewAllDomainAccounts};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBaseWithTagInformation<UserVmJo
|
|||
}
|
||||
userVmResponse.setDetails(resourceDetails);
|
||||
if (caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
|
||||
userVmResponse.setReadOnlyUIDetails(QueryService.UserVMReadOnlyUIDetails.value());
|
||||
userVmResponse.setReadOnlyDetails(QueryService.UserVMReadOnlyDetails.value());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2566,7 +2566,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
|||
final List<String> userBlacklistedSettings = Stream.of(QueryService.UserVMBlacklistedDetails.value().split(","))
|
||||
.map(item -> (item).trim())
|
||||
.collect(Collectors.toList());
|
||||
final List<String> userReadOnlySettings = Stream.of(QueryService.UserVMReadOnlyUIDetails.value().split(","))
|
||||
final List<String> userReadOnlySettings = Stream.of(QueryService.UserVMReadOnlyDetails.value().split(","))
|
||||
.map(item -> (item).trim())
|
||||
.collect(Collectors.toList());
|
||||
if (cleanupDetails){
|
||||
|
|
|
|||
|
|
@ -184,8 +184,8 @@ export default {
|
|||
}
|
||||
},
|
||||
allowEditOfDetail (name) {
|
||||
if (this.resource.readonlyuidetails) {
|
||||
if (this.resource.readonlyuidetails.split(',').map(item => item.trim()).includes(name)) {
|
||||
if (this.resource.readonlydetails) {
|
||||
if (this.resource.readonlydetails.split(',').map(item => item.trim()).includes(name)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue