Add <= and >= operators to node filter 76/128776/2
authorMichaelMorris <michael.morris@est.tech>
Thu, 21 Apr 2022 15:27:59 +0000 (16:27 +0100)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Mon, 25 Apr 2022 12:12:08 +0000 (12:12 +0000)
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-3979
Change-Id: I2814157e8fafd02c094afd8270a20c0e47687b18

catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/ConstraintConvertor.java
catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.ts
catalog-ui/src/assets/styles/form-elements.less

index 877f8c4..0fcbdd7 100644 (file)
@@ -39,12 +39,14 @@ public class ConstraintConvertor {
     public static final String EQUAL_OPERATOR = ConstraintType.EQUAL.getTypes().get(1);
     public static final String GREATER_THAN_OPERATOR = ConstraintType.GREATER_THAN.getTypes().get(1);
     public static final String LESS_THAN_OPERATOR = ConstraintType.LESS_THAN.getTypes().get(1);
+    public static final String GREATER_OR_EQUAL_OPERATOR = ConstraintType.GREATER_OR_EQUAL.getTypes().get(1);
+    public static final String LESS_OR_EQUAL_OPERATOR = ConstraintType.LESS_OR_EQUAL.getTypes().get(1);
     public static final String STATIC_CONSTRAINT = "static";
     public static final String PROPERTY_CONSTRAINT = "property";
     public static final String SERVICE_INPUT_CONSTRAINT = "service_input";
     public static final String SELF = "SELF";
     private static final Logger logger = LoggerFactory.getLogger(ConstraintConvertor.class);
-    private static Set<String> SUPPORTED_CONSTRAINT_LIST = ImmutableSet.of(EQUAL_OPERATOR, GREATER_THAN_OPERATOR, LESS_THAN_OPERATOR);
+    private static Set<String> SUPPORTED_CONSTRAINT_LIST = ImmutableSet.of(EQUAL_OPERATOR, GREATER_THAN_OPERATOR, LESS_THAN_OPERATOR, GREATER_OR_EQUAL_OPERATOR, LESS_OR_EQUAL_OPERATOR);
     private static Set<String> SUPPORTED_FUNCTIONS = ImmutableSet
         .of(ToscaFunctions.GET_INPUT.getFunctionName(), ToscaFunctions.GET_PROPERTY.getFunctionName());
 
index cdb1cd8..4d69559 100644 (file)
@@ -77,7 +77,9 @@ export class ConstraintObjectUI extends ConstraintObject{
 export const OPERATOR_TYPES = {
     EQUAL: 'equal',
     GREATER_THAN: 'greater_than',
-    LESS_THAN: 'less_than'
+    LESS_THAN: 'less_than',
+    GREATER_OR_EQUAL: 'greater_or_equal',
+    LESS_OR_EQUAL: 'less_or_equal'
 };
 
 // tslint:disable-next-line:max-classes-per-file
@@ -165,7 +167,9 @@ export class ServiceDependenciesComponent {
         this.operatorTypes = [
             {label: '>', value: OPERATOR_TYPES.GREATER_THAN},
             {label: '<', value: OPERATOR_TYPES.LESS_THAN},
-            {label: '=', value: OPERATOR_TYPES.EQUAL}
+            {label: '=', value: OPERATOR_TYPES.EQUAL},
+            {label: '>=', value: OPERATOR_TYPES.GREATER_OR_EQUAL},
+            {label: '<=', value: OPERATOR_TYPES.LESS_OR_EQUAL}
         ];
         this.topologyTemplateService.getComponentInputsWithProperties(this.compositeService.componentType, this.compositeService.uniqueId)
         .subscribe((result: ComponentGenericResponse) => {
@@ -457,6 +461,8 @@ export class ServiceDependenciesComponent {
             case OPERATOR_TYPES.LESS_THAN: return '<';
             case OPERATOR_TYPES.EQUAL: return '=';
             case OPERATOR_TYPES.GREATER_THAN: return '>';
+            case OPERATOR_TYPES.GREATER_OR_EQUAL: return '>=';
+            case OPERATOR_TYPES.LESS_OR_EQUAL: return '<=';
         }
     }
 
index 9f8146d..aca7ef9 100644 (file)
         input[type="url"],
         input[type="number"],
         input[type="password"]  { padding: 4px 10px;}
-        select                  { padding: 4px 7px;}
+        select                  { padding: 4px 0px;}
         textarea                { padding: 6px 10px;}
 
         select {