summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/utils
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2023-02-15 17:14:59 +0000
committerMichael Morris <michael.morris@est.tech>2023-05-16 15:05:13 +0000
commit8183ade590e367f28e13484201d2c9526be221dc (patch)
tree735d600ec26ed9caea7657f7224a7e5f6f05cb62 /catalog-ui/src/app/utils
parent5768f2e5a056df6b23f7f8a87529d5ca00063c68 (diff)
Support additional operands for node filters
Issue-ID: SDC-4395 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: I66b172d100ffd2757de88bc7640761f31fd20c28
Diffstat (limited to 'catalog-ui/src/app/utils')
-rw-r--r--catalog-ui/src/app/utils/constants.ts5
-rw-r--r--catalog-ui/src/app/utils/filter-constraint-helper.ts15
2 files changed, 16 insertions, 4 deletions
diff --git a/catalog-ui/src/app/utils/constants.ts b/catalog-ui/src/app/utils/constants.ts
index 927c778df6..8c62cec739 100644
--- a/catalog-ui/src/app/utils/constants.ts
+++ b/catalog-ui/src/app/utils/constants.ts
@@ -164,6 +164,7 @@ export class PROPERTY_TYPES {
public static SCALAR_FREQUENCY = 'scalar-unit.frequency';
public static SCALAR_SIZE = 'scalar-unit.size';
public static SCALAR_TIME = 'scalar-unit.time';
+ public static SCALAR_UNIT = 'scalar-unit';
}
export class SOURCES {
@@ -177,12 +178,12 @@ export class PROPERTY_DATA {
public static SIMPLE_TYPES = [PROPERTY_TYPES.STRING, PROPERTY_TYPES.INTEGER, PROPERTY_TYPES.TIMESTAMP, PROPERTY_TYPES.FLOAT, PROPERTY_TYPES.BOOLEAN, PROPERTY_TYPES.JSON, PROPERTY_TYPES.SCALAR_BITRATE, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME];
public static SIMPLE_TYPES_COMPARABLE = [PROPERTY_TYPES.STRING, PROPERTY_TYPES.INTEGER, PROPERTY_TYPES.FLOAT];
public static SCHEMA_TYPES = [PROPERTY_TYPES.LIST, PROPERTY_TYPES.MAP];
- public static SCALAR_TYPES = [PROPERTY_TYPES.SCALAR_BITRATE, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME];
+ public static SCALAR_TYPES = [PROPERTY_TYPES.SCALAR_BITRATE, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME, PROPERTY_TYPES.SCALAR_UNIT];
public static ROOT_DATA_TYPE = "tosca.datatypes.Root";
public static OPENECOMP_ROOT = "org.openecomp.datatypes.Root";
public static SUPPLEMENTAL_DATA = "supplemental_data";
public static SOURCES = [SOURCES.A_AND_AI, SOURCES.ORDER, SOURCES.RUNTIME];
- public static COMPARABLE_TYPES = [PROPERTY_TYPES.STRING, PROPERTY_TYPES.INTEGER, PROPERTY_TYPES.FLOAT, PROPERTY_TYPES.TIMESTAMP, PROPERTY_TYPES.SCALAR_BITRATE, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME];
+ public static COMPARABLE_TYPES = [PROPERTY_TYPES.STRING, PROPERTY_TYPES.INTEGER, PROPERTY_TYPES.FLOAT, PROPERTY_TYPES.TIMESTAMP, PROPERTY_TYPES.SCALAR_BITRATE, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME, PROPERTY_TYPES.SCALAR_UNIT];
}
export class PROPERTY_VALUE_CONSTRAINTS {
diff --git a/catalog-ui/src/app/utils/filter-constraint-helper.ts b/catalog-ui/src/app/utils/filter-constraint-helper.ts
index f1207084a7..7ee9d27efe 100644
--- a/catalog-ui/src/app/utils/filter-constraint-helper.ts
+++ b/catalog-ui/src/app/utils/filter-constraint-helper.ts
@@ -50,9 +50,14 @@ export class FilterConstraintHelper {
case ConstraintOperatorType.GREATER_THAN: return '>';
case ConstraintOperatorType.GREATER_OR_EQUAL: return '>=';
case ConstraintOperatorType.LESS_OR_EQUAL: return '<=';
+ case ConstraintOperatorType.IN_RANGE: return 'in range';
+ case ConstraintOperatorType.VALID_VALUES: return 'valid values';
+ case ConstraintOperatorType.LENGTH: return 'length';
+ case ConstraintOperatorType.MIN_LENGTH: return 'minimum length';
+ case ConstraintOperatorType.MAX_LENGTH: return 'maximum length';
+ case ConstraintOperatorType.PATTERN: return 'pattern';
}
}
-
}
export enum ConstraintOperatorType {
@@ -60,6 +65,12 @@ export enum ConstraintOperatorType {
GREATER_THAN = 'greater_than',
LESS_THAN = 'less_than',
GREATER_OR_EQUAL = 'greater_or_equal',
- LESS_OR_EQUAL = 'less_or_equal'
+ LESS_OR_EQUAL = 'less_or_equal',
+ IN_RANGE = 'in_range',
+ VALID_VALUES = 'valid_values',
+ LENGTH = 'length',
+ MIN_LENGTH = 'min_length',
+ MAX_LENGTH = 'max_length',
+ PATTERN = 'pattern'
}