Tomas Jelinek has uploaded a new change for review. Change subject: userportal,webadmin: vm name max length validation hardcoded ......................................................................
userportal,webadmin: vm name max length validation hardcoded There is a config value MaxVmNameLengthWindows and MaxVmNameLengthNonWindows for VM name lengths, but the frontend ignored this config values and had the lenghts hardcoded. Change-Id: I08eae6dac69963f7c604cf80bba423f0987a199c Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=991787 Signed-off-by: Tomas Jelinek <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java 2 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/17667/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java index 3d955eb..3740326 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java @@ -99,7 +99,9 @@ MaxBurstNetworkQoSValue, AverageToPeakRatio, AverageToBurstRatio, - UserMessageOfTheDay(ConfigAuthType.User) + UserMessageOfTheDay(ConfigAuthType.User), + MaxVmNameLengthWindows(ConfigAuthType.User), + MaxVmNameLengthNonWindows(ConfigAuthType.User) ; public static enum ConfigAuthType { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java index a141593..7b61112 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java @@ -59,8 +59,8 @@ public class UnitVmModel extends Model { - public static final int WINDOWS_VM_NAME_MAX_LIMIT = 15; - public static final int NON_WINDOWS_VM_NAME_MAX_LIMIT = 64; + public static final Integer WINDOWS_VM_NAME_MAX_LIMIT = (Integer) AsyncDataProvider.getConfigValuePreConverted(ConfigurationValues.MaxVmNameLengthWindows); + public static final Integer NON_WINDOWS_VM_NAME_MAX_LIMIT = (Integer) AsyncDataProvider.getConfigValuePreConverted(ConfigurationValues.MaxVmNameLengthNonWindows); public static final int VM_TEMPLATE_NAME_MAX_LIMIT = 40; public static final int DESCRIPTION_MAX_LIMIT = 255; -- To view, visit http://gerrit.ovirt.org/17667 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08eae6dac69963f7c604cf80bba423f0987a199c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
