aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-17 22:40:44 +0300
committerMichael Lando <ml636r@att.com>2017-06-18 07:20:49 +0300
commit4d97d5fac309ce0d66938e5ccd0349e2660d4e23 (patch)
tree3f921054f997d1962fa6f9db9a0119e31a851eea /catalog-ui/src/app/view-models
parent89786d31f266a205857cae0177904c249ac6a512 (diff)
[sdc] update code of sdc
Change-Id: If9f37c80b659cb67b34d18e6c019defecca58b9a Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models')
-rw-r--r--catalog-ui/src/app/view-models/forms/property-forms/module-property-modal/module-property-model.ts14
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts2
2 files changed, 8 insertions, 8 deletions
diff --git a/catalog-ui/src/app/view-models/forms/property-forms/module-property-modal/module-property-model.ts b/catalog-ui/src/app/view-models/forms/property-forms/module-property-modal/module-property-model.ts
index 7359ac0e91..13e9e8d80a 100644
--- a/catalog-ui/src/app/view-models/forms/property-forms/module-property-modal/module-property-model.ts
+++ b/catalog-ui/src/app/view-models/forms/property-forms/module-property-modal/module-property-model.ts
@@ -153,7 +153,7 @@ export class ModulePropertyView extends PropertyFormBaseView {
switch (this.$scope.property.name) {
case UNIQUE_GROUP_PROPERTIES_NAME.MIN_VF_MODULE_INSTANCES:
- if (!maxPropertyValue || maxPropertyValue === null) {
+ if (isNaN(maxPropertyValue) || maxPropertyValue == null) {
isValid = propertyValue <= initialCountPropertyValue;
}
else {
@@ -161,7 +161,7 @@ export class ModulePropertyView extends PropertyFormBaseView {
}
this.$scope.forms.editForm["value"].$setValidity('maxValidation', isValid);
if (this.component.isService()) {
- if (!parentPropertyValue || parentPropertyValue === null) {
+ if (isNaN(parentPropertyValue) || parentPropertyValue == null) {
isValid = true;
} else {
isValid = propertyValue >= parentPropertyValue;
@@ -170,14 +170,14 @@ export class ModulePropertyView extends PropertyFormBaseView {
}
break;
case UNIQUE_GROUP_PROPERTIES_NAME.MAX_VF_MODULE_INSTANCES:
- if (!minPropertyValue || minPropertyValue === null) {
+ if (isNaN(minPropertyValue) || minPropertyValue == null) {
isValid = propertyValue >= initialCountPropertyValue;
} else {
isValid = !propertyValue || (propertyValue >= minPropertyValue && propertyValue >= initialCountPropertyValue);
}
this.$scope.forms.editForm["value"].$setValidity('minValidation', isValid);
if (this.component.isService()) {
- if (!parentPropertyValue || parentPropertyValue === null) {
+ if (isNaN(parentPropertyValue) || parentPropertyValue == null) {
isValid = true;
}
else {
@@ -187,11 +187,11 @@ export class ModulePropertyView extends PropertyFormBaseView {
}
break;
case UNIQUE_GROUP_PROPERTIES_NAME.INITIAL_COUNT:
- if ((!minPropertyValue || minPropertyValue === null) && (!maxPropertyValue || maxPropertyValue === null)) {
+ if ((isNaN(minPropertyValue) || minPropertyValue == null) && (isNaN(maxPropertyValue) || maxPropertyValue == null)) {
isValid = true;
- } else if (!minPropertyValue || minPropertyValue === null) {
+ } else if (isNaN(minPropertyValue) || minPropertyValue == null) {
isValid = propertyValue <= maxPropertyValue;
- } else if (!maxPropertyValue || maxPropertyValue === null) {
+ } else if (isNaN(maxPropertyValue) || maxPropertyValue == null) {
isValid = propertyValue >= minPropertyValue;
} else {
isValid = minPropertyValue <= propertyValue && propertyValue <= maxPropertyValue;
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
index 48a2446e5f..507181c98c 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
@@ -246,7 +246,7 @@ export class WorkspaceViewModel {
type: this.$scope.componentType.toLowerCase(),
mode: WorkspaceMode.VIEW,
components: this.$state.params['components']
- });
+ },{reload: true});
};