summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/.angular-cli.json3
-rw-r--r--public/.nyc_output/out.json1
-rw-r--r--public/cypress.json1
-rw-r--r--public/cypress/fixtures/createMcRes.json69
-rw-r--r--public/cypress/fixtures/createMcResWithBooleanDDL.json1060
-rw-r--r--public/cypress/fixtures/doneSaveEditSimpleCopy.json21
-rw-r--r--public/cypress/fixtures/doneSaveSimpleLogText.json26
-rw-r--r--public/cypress/fixtures/doneSaveSimpleMap.json29
-rw-r--r--public/cypress/integration/e2e/e2eWithIntegration-spec.ts98
-rw-r--r--public/cypress/integration/mocks/errorDialog-spec.ts10
-rw-r--r--public/cypress/integration/mocks/generalPage-spec.ts108
-rw-r--r--public/cypress/integration/mocks/homePage-spec.ts75
-rw-r--r--public/cypress/integration/mocks/importPage-spec.ts19
-rw-r--r--public/cypress/integration/mocks/ruleEngine-spec.ts643
-rw-r--r--public/cypress/support/generalCommands.ts16
-rw-r--r--public/cypress/support/homeCommands.ts28
-rw-r--r--public/cypress/support/index.js28
-rw-r--r--public/cypress/support/ruleEngineCommands.ts85
-rw-r--r--public/karma.conf.js11
-rw-r--r--public/package.json16
-rw-r--r--public/src/app/api/rest-api.service.spec.ts476
-rw-r--r--public/src/app/api/rest-api.service.ts45
-rw-r--r--public/src/app/app.component.html1
-rw-r--r--public/src/app/app.module.ts10
-rw-r--r--public/src/app/bar-icons/bar-icons.component.html50
-rw-r--r--public/src/app/bar-icons/bar-icons.component.scss6
-rw-r--r--public/src/app/bar-icons/bar-icons.component.ts29
-rw-r--r--public/src/app/diagram/diagram.component.html46
-rw-r--r--public/src/app/diagram/diagram.component.scss7
-rw-r--r--public/src/app/diagram/diagram.component.spec.ts76
-rw-r--r--public/src/app/diagram/diagram.component.ts49
-rw-r--r--public/src/app/error-dialog/error-dialog.component.html32
-rw-r--r--public/src/app/error-dialog/error-dialog.component.scss18
-rw-r--r--public/src/app/error-dialog/error-dialog.component.ts6
-rw-r--r--public/src/app/general/general.component.html8
-rw-r--r--public/src/app/general/general.component.scss13
-rw-r--r--public/src/app/general/general.component.spec.ts98
-rw-r--r--public/src/app/general/general.component.ts48
-rw-r--r--public/src/app/home/home.component.html132
-rw-r--r--public/src/app/home/home.component.scss126
-rw-r--r--public/src/app/home/home.component.ts115
-rw-r--r--public/src/app/loader/loader.component.spec.ts5
-rw-r--r--public/src/app/main/main.component.html22
-rw-r--r--public/src/app/main/main.component.scss8
-rw-r--r--public/src/app/main/main.component.ts44
-rw-r--r--public/src/app/rule-engine/action-list/action-list.component.html18
-rw-r--r--public/src/app/rule-engine/action-list/action-list.component.scss4
-rw-r--r--public/src/app/rule-engine/action-list/action-list.component.ts70
-rw-r--r--public/src/app/rule-engine/action/action.component.html154
-rw-r--r--public/src/app/rule-engine/action/action.component.scss23
-rw-r--r--public/src/app/rule-engine/action/action.component.ts3
-rw-r--r--public/src/app/rule-engine/api/rule-engine-api.service.spec.ts19
-rw-r--r--public/src/app/rule-engine/api/rule-engine-api.service.ts50
-rw-r--r--public/src/app/rule-engine/condition/condition.component.html6
-rw-r--r--public/src/app/rule-engine/condition/condition.component.spec.ts51
-rw-r--r--public/src/app/rule-engine/confirm-popup/confirm-popup.component.html34
-rw-r--r--public/src/app/rule-engine/confirm-popup/confirm-popup.component.scss13
-rw-r--r--public/src/app/rule-engine/confirm-popup/confirm-popup.component.ts5
-rw-r--r--public/src/app/rule-engine/from/from.component.html42
-rw-r--r--public/src/app/rule-engine/from/from.component.ts6
-rw-r--r--public/src/app/rule-engine/host/exit-mode.enum.ts4
-rw-r--r--public/src/app/rule-engine/host/host-params.ts8
-rw-r--r--public/src/app/rule-engine/host/host.service.spec.ts18
-rw-r--r--public/src/app/rule-engine/host/host.service.ts56
-rw-r--r--public/src/app/rule-engine/rule-list/rule-list.component.html36
-rw-r--r--public/src/app/rule-engine/rule-list/rule-list.component.scss24
-rw-r--r--public/src/app/rule-engine/rule-list/rule-list.component.ts55
-rw-r--r--public/src/app/rule-engine/target/target.component.html2
-rw-r--r--public/src/app/rule-engine/target/target.component.spec.ts29
-rw-r--r--public/src/app/rule-engine/target/target.component.ts28
-rw-r--r--public/src/app/rule-engine/target/target.validation.spec.ts111
-rw-r--r--public/src/app/rule-engine/version-type-select/version-type-select.component.html82
-rw-r--r--public/src/app/rule-engine/version-type-select/version-type-select.component.scss18
-rw-r--r--public/src/app/rule-engine/version-type-select/version-type-select.component.ts63
-rw-r--r--public/src/app/rule-frame/rule-frame.component.html6
-rw-r--r--public/src/app/rule-frame/rule-frame.component.ts3
-rw-r--r--public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.html39
-rw-r--r--public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.scss17
-rw-r--r--public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.ts72
-rw-r--r--public/src/app/sdc/base-pubsub.ts124
-rw-r--r--public/src/app/sdc/plugin-pubsub.ts32
-rw-r--r--public/src/app/store/store.ts15
-rw-r--r--public/src/environments/environment.prod.ts4
-rw-r--r--public/src/polyfills.ts53
-rw-r--r--public/src/stories/diagram.stories.ts22
-rw-r--r--public/src/styles.css38
-rw-r--r--public/yarn.lock312
87 files changed, 4599 insertions, 987 deletions
diff --git a/public/.angular-cli.json b/public/.angular-cli.json
index fa9ff9f..2c38370 100644
--- a/public/.angular-cli.json
+++ b/public/.angular-cli.json
@@ -54,6 +54,9 @@
}
],
"test": {
+ "codeCoverage": {
+ "exclude": ["src/app/store/store.ts"]
+ },
"karma": {
"config": "./karma.conf.js"
}
diff --git a/public/.nyc_output/out.json b/public/.nyc_output/out.json
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/public/.nyc_output/out.json
@@ -0,0 +1 @@
+{}
diff --git a/public/cypress.json b/public/cypress.json
index 5a2036d..51c046b 100644
--- a/public/cypress.json
+++ b/public/cypress.json
@@ -2,6 +2,7 @@
"chromeWebSecurity": false,
"requestTimeout": 60000,
"responseTimeout": 100000,
+ "videoRecording": false,
"baseUrl": "http://localhost:4300/#/",
"env": {
"backendUrl": "http://localhost:8446"
diff --git a/public/cypress/fixtures/createMcRes.json b/public/cypress/fixtures/createMcRes.json
index ada82bc..e764c18 100644
--- a/public/cypress/fixtures/createMcRes.json
+++ b/public/cypress/fixtures/createMcRes.json
@@ -1,5 +1,5 @@
{
- "vfcmt":{
+ "vfcmt": {
"uuid": "6d436c07-8006-4335-8c84-d65b4740f8d6"
},
"cdump": {
@@ -965,7 +965,72 @@
"type": { "name": "tosca.dcae.nodes.cdapApp.Enrich" }
}
],
- "relations": [],
+ "relations": [
+ {
+ "n1": "n.1520766712715.7",
+ "name1": "foi",
+ "n2": "n.1520766711386.5",
+ "name2": "topic1",
+ "meta": {
+ "n1": "n.1520766712715.7",
+ "p1": "stream_publish_0",
+ "relationship": ["foi", null, "stream_publish_0"],
+ "n2": "n.1520766711386.5",
+ "p2": "topic"
+ }
+ },
+ {
+ "n1": "n.1520766712715.7",
+ "name1": "foi",
+ "n2": "n.1520766712709.6",
+ "name2": "feed0",
+ "meta": {
+ "n1": "n.1520766712715.7",
+ "p1": "stream_publish_0",
+ "n2": "n.1520766712709.6",
+ "p2": "feed",
+ "relationship": [
+ "foi",
+ "dcae.relationships.publish_files",
+ "stream_publish_0"
+ ]
+ }
+ },
+ {
+ "n1": "n.1520766711370.3",
+ "name1": "componentSpec_docker_map",
+ "n2": "n.1520766711379.4",
+ "name2": "feed0",
+ "meta": {
+ "n1": "n.1520766711370.3",
+ "p1": "stream_subscribe_0",
+ "n2": "n.1520766711379.4",
+ "p2": "feed",
+ "relationship": [
+ "componentSpec_docker_map",
+ "dcae.relationships.subscribe_to_files",
+ "stream_subscribe_0"
+ ]
+ }
+ },
+ {
+ "n1": "n.1520766711370.3",
+ "name1": "componentSpec_docker_map",
+ "n2": "n.1520766711386.5",
+ "name2": "topic1",
+ "meta": {
+ "n1": "n.1520766711370.3",
+ "p1": "stream_publish_0",
+ "n2": "n.1520766711386.5",
+ "p2": "topic",
+ "relationship": [
+ "componentSpec_docker_map",
+ "dcae.relationships.publish_events",
+ "stream_publish_0"
+ ]
+ }
+ }
+ ],
"inputs": [],
"outputs": []
}
diff --git a/public/cypress/fixtures/createMcResWithBooleanDDL.json b/public/cypress/fixtures/createMcResWithBooleanDDL.json
new file mode 100644
index 0000000..3fcd512
--- /dev/null
+++ b/public/cypress/fixtures/createMcResWithBooleanDDL.json
@@ -0,0 +1,1060 @@
+{
+ "vfcmt": {
+ "uuid": "6d436c07-8006-4335-8c84-d65b4740f8d6"
+ },
+ "cdump": {
+ "cid": "47908e78-9893-4f18-b767-ea7131dd8de7",
+ "version": 0,
+ "nodes": [
+ {
+ "name": "map",
+ "description":
+ "/sdc/v1/catalog/resources/e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/artifacts/6134d7c8-f9af-4562-bf8d-e60039ec58bb",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b",
+ "nid": "n.1517823219961.0",
+ "capabilities": [
+ {
+ "name": "stream_subscribe_0",
+ "type": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id": "template.yaml/dcae.capabilities.stream.subscribe"
+ },
+ "properties": [
+ {
+ "assignment": { "value": "Map_input" },
+ "name": "format",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "IGNORE" },
+ "name": "route",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "1.0.0" },
+ "name": "version",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "feature",
+ "type": {
+ "name": "tosca.capabilities.Node",
+ "id": "template.yaml/tosca.capabilities.Node"
+ }
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id": "template.yaml/dcae.capabilities.stream.subscribe"
+ },
+ "node_filter": {
+ "capabilities": [
+ {
+ "dcae.capabilities.stream.subscribe": {
+ "properties": [
+ { "format": [{ "equal": "VES_specification" }] },
+ { "version": [{ "equal": "5.28.4" }] }
+ ]
+ }
+ }
+ ]
+ },
+ "name": "stream_publish_0",
+ "relationship": { "type": "dcae.relationships.rework_connected_to" }
+ },
+ {
+ "capability": {
+ "name": "dcae.capabilities.cdapHost",
+ "id": "template.yaml/dcae.capabilities.cdapHost"
+ },
+ "name": "host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "name": "dcae.capabilities.composition.host",
+ "id": "template.yaml/dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "occurrences": [0, "UNBOUNDED"],
+ "node": "tosca.nodes.Root",
+ "capability": {
+ "name": "tosca.capabilities.Node",
+ "id": "template.yaml/tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "relationship": { "type": "tosca.relationships.DependsOn" }
+ }
+ ],
+ "properties": [
+ {
+ "assignment": {
+ "value": ""
+ },
+ "name": "valueUndefined",
+ "description": "valueUndefined",
+ "type": "boolean",
+ "constraints": [
+ {
+ "valid_values": ["single", "multiple"]
+ }
+ ]
+ },
+ {
+ "assignment": {
+ "value": "false"
+ },
+ "name": "valueFalse",
+ "description": "DDL value false",
+ "type": "boolean",
+ "constraints": [
+ {
+ "valid_values": ["single", "multiple"]
+ }
+ ]
+ },
+ {
+ "assignment": {
+ "value": "true"
+ },
+ "name": "valueTrue",
+ "description": "DDL value true",
+ "type": "boolean",
+ "constraints": [
+ {
+ "valid_values": ["single", "multiple"]
+ }
+ ]
+ },
+ {
+ "assignment": {
+ "value": "multiple"
+ },
+ "name": "mappingType",
+ "description":
+ "CSV to VES mapping, from the file to generate multiple events or single event",
+ "type": "string",
+ "constraints": [
+ {
+ "valid_values": ["single", "multiple"]
+ }
+ ]
+ },
+ {
+ "assignment": {
+ "value":
+ "com.att.gfp.dcae.eventProcessor.Catalog,com.att.ecomp.dcae.eventproc.cdap.common.processors.Catalog"
+ },
+ "name": "defaultCatalogs",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "defaultObjects" } },
+ "name": "defaultObjects",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "Map Microservice" },
+ "name": "description",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "dmaapConsumerGrp" } },
+ "name": "dmaapConsumerGrp",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "" },
+ "name": "eventFactory",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "{\"processing\":[{\"phase\":\"snmp_map\",\"filter\":{\"class\":\"StartsWith\",\"string\":\"${notify OID}\",\"value\":\".1.3.6.1.4.1.26878.200.2\"},\"processors\":[{\"class\":\"SnmpConvertor\",\"array\":\"varbinds\",\"keycolumn\":\"varbind_oid\",\"datacolumn\":\"varbind_value\"},{\"class\":\"RunPhase\",\"phase\":\"vPCRF_MOGParsingPhase\"}]},{\"phase\":\"vPCRF_MOGParsingPhase\",\"processors\":[{\"class\":\"MapAlarmValues\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"toField\":\"eventGroup\",\"map\":{\"LinkDown\":\"LinkUp_Down\",\"LinkUp\":\"LinkUp_Down\",\"HIGH CPU USAGE Alert\":\"HighCpuUsageAlert-Clear\",\"HIGH CPU USAGE Clear\":\"HighCpuUsageAlert-Clear\",\"ProcessDown\":\"ProcessUp-Down\",\"ProcessUp\":\"ProcessUp-Down\",\"HighLoadAlert\":\"HighLoadAlert-Clear\",\"HighLoadClear\":\"HighLoadAlert-Clear\",\"DiskFullAlert\":\"DiskFullAlert-Clear\",\"DiskFullClear\":\"DiskFullAlert-Clear\",\"LowSwapAlert\":\"LowMemoryAlert-Clear\",\"LowSwapClear\":\"LowMemoryAlert-Clear\",\"LowMemoryAlert\":\"LowMemoryAlert-Clear\",\"LowMemoryClear\":\"LowMemoryAlert-Clear\",\"ApplicationStartError\":\"ApplicationStartError\",\"LicenseUsageThresholdExceeded \":\"LicenseUsageThresholdExceeded \",\"LicensedSessionCreation\":\"LicensedSessionCreation\",\"InvalidLicense\":\"InvalidLicense\",\"PoliciesNotConfigured\":\"PoliciesNotConfigured\",\"DiameterAllPeersDown\":\"DiameterAllPeersUp-Down\",\"DiameterAllPeersUp\":\"DiameterAllPeersUp-Down\",\"HA Failover\":\"HAFailover\",\"GR Failover\":\"GRFailover\",\"All DB Member of replica set Down\":\"AllDBMemberReplicaSetUp-Down\",\"All DB Member of replica set Up\":\"AllDBMemberReplicaSetUp-Down\",\"No Primary DB Member Found\":\"PrimaryDBMemberFound-NotFound\",\"Primary DB Member Found\":\"PrimaryDBMemberFound-NotFound\",\"Secondary DB Member Down\":\"SecondaryDBMemberUp-Down\",\"Secondary DB Member Up\":\"SecondaryDBMemberUp-Down\",\"Arbiter Down\":\"ArbiterUp-Down\",\"Arbiter Up\":\"ArbiterUp-Down\",\"DB resync is needed\":\"DBResyncNeeded-NotNeeded\",\"DB resync is not needed\":\"DBResyncNeeded-NotNeeded\",\"Config Server Down\":\"ConfigServerUp-Down\",\"Config Server Up\":\"ConfigServerUp-Down\",\"VM Down\":\"VMUp-Down\",\"VM Up\":\"VMUp-Down\",\"QNS Process Down\":\"QNSProcessUp-Down\",\"QNS Process Up\":\"QNSProcessUp-Down\",\"VirtualInterface Down\":\"VirtualInterfaceUp-Down\",\"VirtualInterface Up\":\"VirtualInterfaceUp-Down\",\"MemcachedConnectError\":\"MemcachedConnectError\",\"PolicyConfiguration\":\"PolicyConfiguration\",\"DiameterPeerDown\":\"DiameterPeerDown\",\"DeveloperMode\":\"DeveloperMode\",\"ZeroMQConnectionError\":\"ZeroMQConnectionError\",\"Admin User Logged In\":\"AdminUserLoggedIn\"}},{\"class\":\"Set\",\"updates\":{\"event.commonEventHeader.domain\":\"fault\",\"event.commonEventHeader.version\":3,\"event.faultFields.faultFieldsVersion\":2.0,\"event.faultFields.vfStatus\":\"Active\",\"event.commonEventHeader.priority\":\"Normal\",\"event.commonEventHeader.sequence\":0,\"event.faultFields.alarmCondition\":\"${_1_3_6_1_4_1_26878_100_1_1_9}\",\"event.faultFields.alarmAdditionalInformation[0].name\":\"EventGroup\",\"event.faultFields.alarmAdditionalInformation[0].value\":\"${eventGroup}\",\"event.faultFields.alarmAdditionalInformation[1].name\":\"OID1\",\"event.faultFields.alarmAdditionalInformation[1].value\":\"${varbinds[0].varbind_value}\"}},{\"class\":\"Set\",\"updates\":{\"event.commonEventHeader.startEpochMicrosec\":\"%{now.ms}\"}},{\"class\":\"MapAlarmValues\",\"field\":\"_1_3_6_1_4_1_26878_100_1_4\",\"default\":\"WARNING\",\"toField\":\"event.faultFields.eventSeverity\",\"map\":{\"0\":\"CRITICAL\",\"1\":\"CRITICAL\",\"2\":\"MAJOR\",\"3\":\"MAJOR\",\"4\":\"MINOR\",\"5\":\"WARNING\",\"6\":\"WARNING\",\"7\":\"WARNING\",\"8\":\"WARNING\",\"9\":\"NORMAL\"}},{\"class\":\"MapAlarmValues\",\"field\":\"_1_3_6_1_4_1_26878_100_1_3\",\"default\":\"\",\"toField\":\"event.faultFields.specificProblem\",\"map\":{\"0\":\"Hardware\",\"1\":\"Networking\",\"2\":\"Virtualization\",\"3\":\"Operating System\",\"4\":\"Application\",\"5\":\"Process\"}},{\"class\":\"Set\",\"updates\":{\"event.commonEventHeader.lastEpochMicrosec\":\"${event.commonEventHeader.startEpochMicrosec}\"}},{\"class\":\"ConvertFieldTypes\",\"updates\":{\"event.commonEventHeader.startEpochMicrosec\":\"long\",\"event.commonEventHeader.lastEpochMicrosec\":\"long\"}}]},{\"phase\":\"vPCRF_MOGParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"DiskFullAlert\",\"LowSwapAlert\",\"LowMemoryAlert\"]},\"processors\":[{\"class\":\"Set\",\"updates\":{\"event.faultFields.eventSeverity\":\"MAJOR\"}}]},{\"phase\":\"vPCRF_MOGParsingPhase\",\"filter\":{\"class\":\"Contains\",\"string\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"value\":\"mog\"},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"event.commonEventHeader.sourceName\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\"([^:]*):.*\"},{\"class\":\"Set\",\"updates\":{\"event.faultFields.eventSourceType\":\"vMOG\",\"event.commonEventHeader.functionalRole\":\"vMoG\",\"event.commonEventHeader.eventType\":\"vMoG_Alarms\",\"event.commonEventHeader.eventId\":\"${event.commonEventHeader.sourceName}_${eventGroup}\",\"event.commonEventHeader.eventName\":\"NA\"}}]},{\"phase\":\"vPCRF_MOGParsingPhase\",\"filter\":{\"class\":\"Not\",\"filter\":{\"class\":\"Contains\",\"string\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"value\":\"mog\"}},\"processors\":[{\"class\":\"Set\",\"updates\":{\"event.commonEventHeader.sourceName\":\"${agent address}\",\"event.faultFields.eventSourceType\":\"vPCRF\",\"event.commonEventHeader.functionalRole\":\"vPCRF\",\"event.commonEventHeader.eventType\":\"PCRF_Alarms\",\"event.commonEventHeader.eventId\":\"${agent address}_${eventGroup}\",\"event.commonEventHeader.reportingEntityName\":\"${event.commonEventHeader.sourceName}\"}}]},{\"phase\":\"vPCRF_MOGParsingPhase\",\"filter\":{\"class\":\"Contains\",\"string\":\"${_1_3_6_1_4_1_26878_100_1_1_7}\",\"value\":\"mogx\"},\"processors\":[{\"class\":\"Set\",\"updates\":{\"event.faultFields.alarmCondition\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"event.faultFields.specificProblem\":\"${_1_3_6_1_4_1_26878_100_1_1_9}\",\"event.commonEventHeader.reportingEntityName\":\"${event.commonEventHeader.sourceName}\"}},{\"class\":\"RunPhase\",\"phase\":\"vPCRF_MOGX_ParsingPhase\"},{\"class\":\"Set\",\"updates\":{\"event.commonEventHeader.eventId\":\"${event.commonEventHeader.sourceName}_${eventGroup}_${eventKey}\"}}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"LinkDown\",\"LinkUp\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* (.*)\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"ProcessDown\",\"ProcessUp\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*:(.*) process.*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"DiskFullAlert\",\"DiskFullClear\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*:(.*):.*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"QNS Process Down\",\"QNS Process Up\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*:(.*) server on .*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"DiameterPeerDown\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* (.*) [R/r]ealm.*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"DiameterAllPeersDown\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*Realm: (.*):[^:]*peers.*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"VirtualInterface Down\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*onnect (.*). Not reachable\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"VirtualInterface Up\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*: (.*) is up\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"GR Failover\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*: (Geo Failover done from .*) of .*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"Arbiter Down\",\"Arbiter Up\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* Arbiter (.*) is .*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"All DB Member of replica set Down\",\"All DB Member of replica set Up\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* All DB members of replica set (.*) are .*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"No Primary DB Member Found\",\"Primary DB Member Found\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* Replica-set (.*)\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"DB Member Down\",\"DB Member Up\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* (DB.Member .*) of SET .*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"Secondary DB Member Down\",\"Secondary DB Member Up\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".*Secondary (DB.*) is.*\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"DB Resync is needed\",\"DB Resync is not needed\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* member (.*:[0-9]+).*$\"}]},{\"phase\":\"vPCRF_MOGX_ParsingPhase\",\"filter\":{\"class\":\"OneOf\",\"field\":\"_1_3_6_1_4_1_26878_100_1_1_9\",\"values\":[\"ZeroMQConnectionError\"]},\"processors\":[{\"class\":\"ExtractText\",\"field\":\"eventKey\",\"value\":\"${_1_3_6_1_4_1_26878_100_1_1_10}\",\"regex\":\".* for (tcp.*)\"}]},{\"phase\":\"vPCRF_MOGParsingPhase\",\"processors\":[{\"class\":\"Clear\",\"fields\":[\"community len\",\"cambria.partition\",\"notify OID\",\"notify OID len\",\"epoch_serno\",\"protocol version\",\"agent name\",\"trap category\",\"community\",\"time received\",\"agent address\",\"varbinds\"]},{\"class\":\"ClearNoneStandardFields\",\"reservedFields\":[\"event\",\"parserType\"]},{\"class\":\"LogEvent\",\"title\":\"UCSNMPEvent-vPCRF_MOG_Parser_Output\",\"logName\":\"com.att.gfp.dcae.eventProcessor.output\",\"logLevel\":\"DEBUG\"},{\"class\":\"LogText\",\"logLevel\":\"INFO\",\"logText\":\"Finished_vPCRF_MOGParsingPhase Mapping Phase\"},{\"class\":\"RunPhase\",\"phase\":\"map_publish\"}]}]}"
+ },
+ "name": "json",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "monitorThreads" } },
+ "name": "monitorThreads",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "mapMS" },
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "snmp_map" },
+ "name": "phases.snmp_map.phaseName",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": ".*snmp.*" },
+ "name": "phases.snmp_map.streamPattern",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "syslog_map" },
+ "name": "phases.syslog_map.phaseName",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": ".*syslog.*" },
+ "name": "phases.syslog_map.streamPattern",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "{\"phase\":\"map_publish\",\"processors\":[{\"class\":\"EventProcessorMetric\",\"metric\":\"out.events\"},{\"class\":\"SendEvent\",\"channel\":\"DCAE-MAP-EVENT-OUT\"}]}"
+ },
+ "name": "postConfig",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "vnfTypes.*" },
+ "name": "ruleKeyPattern",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "[{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"MOD\",\"INT\":\"INT\",\"HSEV\":\"header-SEV \",\"SEVDES\":\"Syslog-Severity\"},\"filter\":{\"${Priority}\":\"$Priority\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"0\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"1\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"0\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"2\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"0\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"3\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"0\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"4\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"0\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"5\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"0\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"6\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"0\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"7\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"1\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"8\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"1\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"9\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"1\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"10\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"1\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"11\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"1\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"12\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"1\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"13\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"1\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"14\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"1\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"15\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"2\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"16\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"2\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"17\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"2\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"18\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"2\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"19\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"2\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"20\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"2\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"21\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"2\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"22\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"2\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"23\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"3\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"24\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"3\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"25\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"3\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"26\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"3\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"27\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"3\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"28\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"3\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"29\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"3\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"30\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"3\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"31\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"4\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"32\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"4\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"33\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"4\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"34\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"4\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"35\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"4\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"36\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"4\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"37\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"4\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"38\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"4\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"39\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"5\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"40\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"5\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"41\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"5\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"42\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"5\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"43\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"5\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"44\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"5\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"45\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"5\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"46\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"5\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"47\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"6\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"48\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"6\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"49\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"6\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"50\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"6\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"51\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"6\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"52\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"6\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"53\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"6\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"54\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"6\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"55\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"7\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"56\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"7\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"57\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"7\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"58\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"7\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"59\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"7\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"60\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"7\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"61\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"7\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"62\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"7\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"63\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"8\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"64\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"8\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"65\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"8\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"66\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"8\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"67\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"8\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"68\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"8\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"69\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"8\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"70\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"8\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"71\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"9\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"72\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"9\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"73\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"9\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"74\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"9\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"75\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"9\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"76\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"9\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"77\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"9\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"78\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"9\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"79\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"10\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"80\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"10\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"81\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"10\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"82\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"10\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"83\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"10\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"84\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"10\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"85\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"10\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"86\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"10\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"87\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"11\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"88\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"11\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"89\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"11\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"90\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"11\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"91\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"11\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"92\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"11\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"93\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"11\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"94\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"11\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"95\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"12\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"96\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"12\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"97\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"12\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"98\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"12\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"99\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"12\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"100\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"12\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"101\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"12\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"102\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"12\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"103\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"13\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"104\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"13\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"105\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"13\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"106\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"13\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"107\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"13\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"108\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"13\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"109\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"13\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"110\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"13\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"111\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"14\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"112\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"14\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"113\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"14\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"114\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"14\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"115\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"14\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"116\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"14\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"117\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"14\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"118\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"14\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"119\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"15\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"120\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"15\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"121\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"15\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"122\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"15\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"123\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"15\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"124\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"15\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"125\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"15\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"126\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"15\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"127\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"16\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"128\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"16\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"129\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"16\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"130\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"16\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"131\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"16\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"132\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"16\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"133\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"16\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"134\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"16\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"135\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"17\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"136\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"17\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"137\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"17\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"138\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"17\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"139\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"17\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"140\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"17\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"141\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"17\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"142\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"17\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"143\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"18\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"144\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"18\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"145\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"18\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"146\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"18\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"147\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"18\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"148\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"18\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"149\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"18\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"150\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"18\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"151\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"19\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"152\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"19\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"153\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"19\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"154\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"19\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"155\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"19\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"156\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"19\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"157\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"19\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"158\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"19\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"159\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"20\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"160\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"20\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"161\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"20\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"162\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"20\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"163\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"20\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"164\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"20\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"165\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"20\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"166\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"20\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"167\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"21\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"168\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"21\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"169\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"21\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"170\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"21\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"171\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"21\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"172\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"21\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"173\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"21\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"174\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"21\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"175\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"22\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"176\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"22\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"177\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"22\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"178\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"22\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"179\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"22\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"180\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"22\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"181\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"22\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"182\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"22\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"183\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"23\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"184\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"23\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"185\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"23\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"186\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"23\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"187\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"23\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"188\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"23\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"189\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"23\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"190\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"23\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"191\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"0\",\"INT\":\"24\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Emergency: system is unusable\"},\"filter\":{\"${Priority}\":\"192\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"1\",\"INT\":\"24\",\"HSEV\":\"CRITICAL\",\"SEVDES\":\"Alert: action must be taken immediately\"},\"filter\":{\"${Priority}\":\"193\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"2\",\"INT\":\"24\",\"HSEV\":\"MAJOR\",\"SEVDES\":\"Critical: critical conditions\"},\"filter\":{\"${Priority}\":\"194\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"3\",\"INT\":\"24\",\"HSEV\":\"MINOR\",\"SEVDES\":\"Error: error conditions\"},\"filter\":{\"${Priority}\":\"195\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"4\",\"INT\":\"24\",\"HSEV\":\"WARNING\",\"SEVDES\":\"Warning: warning conditions\"},\"filter\":{\"${Priority}\":\"196\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"5\",\"INT\":\"24\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Notice: normal but significant condition\"},\"filter\":{\"${Priority}\":\"197\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"6\",\"INT\":\"24\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Informational: informational messages\"},\"filter\":{\"${Priority}\":\"198\"}},{\"key\":\"syslogLookup\",\"value\":{\"MOD\":\"7\",\"INT\":\"23\",\"HSEV\":\"NORMAL\",\"SEVDES\":\"Debug: debug-level messages\"},\"filter\":{\"${Priority}\":\"199\"}}]"
+ },
+ "name": "settings",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "False" },
+ "name": "startNoChannels",
+ "type": "string"
+ },
+ {
+ "default": "cdap_broker",
+ "assignment": {
+ "value": { "get_input": "connected_broker_dns_name" }
+ },
+ "name": "connected_broker_dns_name",
+ "type": "string",
+ "required": true
+ },
+ { "name": "jar_url", "type": "string", "required": true },
+ {
+ "assignment": {
+ "value": {
+ "get_property": ["SELF", "composition", "location_id"]
+ }
+ },
+ "name": "location_id",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "service_component_type",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "typeinfo": {
+ "itemId":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.dcae.nodes.cdapApp.Map",
+ "requirements": [
+ {
+ "node": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.stream.subscribe"
+ },
+ "capability": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.stream.subscribe"
+ },
+ "name": "stream_publish_0",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/stream_publish_0",
+ "relationship": {
+ "type": "dcae.relationships.rework_connected_to"
+ }
+ },
+ {
+ "node": {
+ "name": "dcae.capabilities.cdapHost",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.cdapHost"
+ },
+ "capability": {
+ "name": "dcae.capabilities.cdapHost",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.cdapHost"
+ },
+ "name": "host",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "node": {
+ "name": "dcae.capabilities.composition.host",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.composition.host"
+ },
+ "capability": {
+ "name": "dcae.capabilities.composition.host",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.composition.host"
+ },
+ "name": "composition",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/composition"
+ },
+ {
+ "occurrences": [0, "UNBOUNDED"],
+ "node": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.capabilities.Node"
+ },
+ "capability": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dependency",
+ "relationship": { "type": "tosca.relationships.DependsOn" }
+ }
+ ],
+ "capabilities": [
+ {
+ "name": "stream_subscribe_0",
+ "type": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/dcae.capabilities.stream.subscribe"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.capabilities.Node"
+ }
+ }
+ ],
+ "catalogId": 0,
+ "catalog": "http://135.91.225.81:8080",
+ "hierarchy": [
+ {
+ "name": "tosca.dcae.nodes.cdapApp",
+ "id":
+ "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.dcae.nodes.cdapApp"
+ },
+ {
+ "name": "tosca.dcae.nodes.Root",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.dcae.nodes.Root"
+ },
+ {
+ "name": "tosca.nodes.Root",
+ "description":
+ "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "e45ec9d7-01df-4cb1-896f-aff2a6ca5a8b/tosca.nodes.Root"
+ }
+ ],
+ "name": "tosca.dcae.nodes.cdapApp.Map",
+ "id": 0
+ },
+ "type": { "name": "tosca.dcae.nodes.cdapApp.Map" }
+ },
+ {
+ "name": "supplement",
+ "description":
+ "/sdc/v1/catalog/resources/30d0b4f4-efc5-424a-9d26-6d7843a0971d/artifacts/2d68c4e3-a4ab-46b3-ae3b-2a593fa97ded",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d",
+ "nid": "n.1517823224030.1",
+ "capabilities": [
+ {
+ "name": "stream_subscribe_0",
+ "type": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id": "template.yaml/dcae.capabilities.stream.subscribe"
+ },
+ "properties": [
+ {
+ "assignment": { "value": "VES_specification" },
+ "name": "format",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "IGNORE" },
+ "name": "route",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "5.28.4" },
+ "name": "version",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "feature",
+ "type": {
+ "name": "tosca.capabilities.Node",
+ "id": "template.yaml/tosca.capabilities.Node"
+ }
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id": "template.yaml/dcae.capabilities.stream.subscribe"
+ },
+ "node_filter": {
+ "capabilities": [
+ {
+ "dcae.capabilities.stream.subscribe": {
+ "properties": [
+ { "format": [{ "equal": "VES_specification" }] },
+ { "version": [{ "equal": "5.28.4" }] }
+ ]
+ }
+ }
+ ]
+ },
+ "name": "stream_publish_0",
+ "relationship": { "type": "dcae.relationships.rework_connected_to" }
+ },
+ {
+ "capability": {
+ "name": "dcae.capabilities.cdapHost",
+ "id": "template.yaml/dcae.capabilities.cdapHost"
+ },
+ "name": "host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "name": "dcae.capabilities.composition.host",
+ "id": "template.yaml/dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "occurrences": [0, "UNBOUNDED"],
+ "node": "tosca.nodes.Root",
+ "capability": {
+ "name": "tosca.capabilities.Node",
+ "id": "template.yaml/tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "relationship": { "type": "tosca.relationships.DependsOn" }
+ }
+ ],
+ "properties": [
+ {
+ "assignment": {
+ "value":
+ "com.att.gfp.dcae.eventProcessor.Catalog,com.att.ecomp.dcae.eventproc.cdap.common.processors.Catalog"
+ },
+ "name": "defaultCatalogs",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "defaultObjects" } },
+ "name": "defaultObjects",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "Supplement Microservice" },
+ "name": "description",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "dmaapConsumerGrp" } },
+ "name": "dmaapConsumerGrp",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "" },
+ "name": "eventFactory",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "{\"processing\":[{\"phase\":\"supplement\",\"filter\":{\"class\":\"OneOf\",\"field\":\"event.commonEventHeader.eventType\",\"values\":[\"vPCRF_Alarms\",\"vMoG_Alarms\",\"applicationVnf\",\"GuestOS_Alarms\",\"Control\"]},\"processors\":[{\"class\":\"DateFormatter\",\"value\":\"${event.commonEventHeader.startEpochMicrosec}\",\"fromFormat\":\"#ms\",\"fromTz\":\"GMT\",\"toField\":\"event.commonEventHeader.internalHeaderFields.firstDatetime\",\"toFormat\":\"EEE,ddMMMyyyyHH:mm:ssZ\",\"toTz\":\"GMT\"},{\"class\":\"DateFormatter\",\"value\":\"${event.commonEventHeader.lastEpochMicrosec}\",\"fromFormat\":\"#ms\",\"fromTz\":\"GMT\",\"toField\":\"event.commonEventHeader.internalHeaderFields.lastDatetime\",\"toFormat\":\"EEE,ddMMMyyyyHH:mm:ssZ\",\"toTz\":\"GMT\"},{\"class\":\"DateFormatter\",\"value\":\"%{now.ms}\",\"fromFormat\":\"#ms\",\"fromTz\":\"GMT\",\"toField\":\"event.commonEventHeader.internalHeaderFields.collectorTimeStamp\",\"toFormat\":\"EEE,ddMMMyyyyHH:mm:ssZ\",\"toTz\":\"GMT\"},{\"class\":\"Set\",\"updates\":{\"event.commonEventHeader.internalHeaderFields.internalHeaderFieldsVersion\":\"9.9\",\"event.commonEventHeader.internalHeaderFields.eventTag\":\"${hp.tag}\"}}]},{\"phase\":\"supplement\",\"processors\":[{\"class\":\"RunPhase\",\"phase\":\"supplement_publish\"}]},{\"phase\":\"ves_supplement\",\"filter\":{\"class\":\"OneOf\",\"field\":\"event.commonEventHeader.eventType\",\"values\":[\"vIRC_Alarms\"]},\"processors\":[{\"class\":\"RunPhase\",\"phase\":\"supplement_publish\"}]}]}"
+ },
+ "name": "json",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "monitorThreads" } },
+ "name": "monitorThreads",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "supplementMS" },
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "supplement" },
+ "name": "phases.supplement.phaseName",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": ".*supplement-in.*" },
+ "name": "phases.supplement.streamPattern",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "ves_supplement" },
+ "name": "phases.ves_supplement.phaseName",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": ".*sec-fault.*" },
+ "name": "phases.ves_supplement.streamPattern",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "{\"phase\":\"supplement_publish\",\"processors\":[{\"class\":\"EventProcessorMetric\",\"metric\":\"out.events\"},{\"class\":\"SendEvent\",\"channel\":\"DCAE-SUPPLEMENT-EVENT-OUT\"}]}"
+ },
+ "name": "postConfig",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "vnfTypes.*" },
+ "name": "ruleKeyPattern",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "False" },
+ "name": "startNoChannels",
+ "type": "string"
+ },
+ {
+ "default": "cdap_broker",
+ "assignment": {
+ "value": { "get_input": "connected_broker_dns_name" }
+ },
+ "name": "connected_broker_dns_name",
+ "type": "string",
+ "required": true
+ },
+ { "name": "jar_url", "type": "string", "required": true },
+ {
+ "assignment": {
+ "value": {
+ "get_property": ["SELF", "composition", "location_id"]
+ }
+ },
+ "name": "location_id",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "service_component_type",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "typeinfo": {
+ "itemId":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.dcae.nodes.cdapApp.Supplement",
+ "requirements": [
+ {
+ "node": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.stream.subscribe"
+ },
+ "capability": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.stream.subscribe"
+ },
+ "name": "stream_publish_0",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d/stream_publish_0",
+ "relationship": {
+ "type": "dcae.relationships.rework_connected_to"
+ }
+ },
+ {
+ "node": {
+ "name": "dcae.capabilities.cdapHost",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.cdapHost"
+ },
+ "capability": {
+ "name": "dcae.capabilities.cdapHost",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.cdapHost"
+ },
+ "name": "host",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d/host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "node": {
+ "name": "dcae.capabilities.composition.host",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.composition.host"
+ },
+ "capability": {
+ "name": "dcae.capabilities.composition.host",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.composition.host"
+ },
+ "name": "composition",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d/composition"
+ },
+ {
+ "occurrences": [0, "UNBOUNDED"],
+ "node": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.capabilities.Node"
+ },
+ "capability": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dependency",
+ "relationship": { "type": "tosca.relationships.DependsOn" }
+ }
+ ],
+ "capabilities": [
+ {
+ "name": "stream_subscribe_0",
+ "type": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/dcae.capabilities.stream.subscribe"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.capabilities.Node"
+ }
+ }
+ ],
+ "catalogId": 0,
+ "catalog": "http://135.91.225.81:8080",
+ "hierarchy": [
+ {
+ "name": "tosca.dcae.nodes.cdapApp",
+ "id":
+ "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.dcae.nodes.cdapApp"
+ },
+ {
+ "name": "tosca.dcae.nodes.Root",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.dcae.nodes.Root"
+ },
+ {
+ "name": "tosca.nodes.Root",
+ "description":
+ "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "30d0b4f4-efc5-424a-9d26-6d7843a0971d/tosca.nodes.Root"
+ }
+ ],
+ "name": "tosca.dcae.nodes.cdapApp.Supplement",
+ "id": 0
+ },
+ "type": { "name": "tosca.dcae.nodes.cdapApp.Supplement" }
+ },
+ {
+ "name": "enrich",
+ "description":
+ "/sdc/v1/catalog/resources/8743b27b-f01e-4b17-a306-37efd42983d0/artifacts/c96f3ffd-516c-470b-ab7c-ced64fb244f0",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0",
+ "nid": "n.1517823228454.2",
+ "capabilities": [
+ {
+ "name": "stream_subscribe_0",
+ "type": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id": "template.yaml/dcae.capabilities.stream.subscribe"
+ },
+ "properties": [
+ {
+ "assignment": { "value": "VES_specification" },
+ "name": "format",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "IGNORE" },
+ "name": "route",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "5.28.4" },
+ "name": "version",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "feature",
+ "type": {
+ "name": "tosca.capabilities.Node",
+ "id": "template.yaml/tosca.capabilities.Node"
+ }
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id": "template.yaml/dcae.capabilities.stream.subscribe"
+ },
+ "node_filter": {
+ "capabilities": [
+ {
+ "dcae.capabilities.stream.subscribe": {
+ "properties": [
+ { "format": [{ "equal": "VES_specification" }] },
+ { "version": [{ "equal": "5.28.4" }] }
+ ]
+ }
+ }
+ ]
+ },
+ "name": "stream_publish_0",
+ "relationship": { "type": "dcae.relationships.rework_connected_to" }
+ },
+ {
+ "capability": {
+ "name": "dcae.capabilities.cdapHost",
+ "id": "template.yaml/dcae.capabilities.cdapHost"
+ },
+ "name": "host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "name": "dcae.capabilities.composition.host",
+ "id": "template.yaml/dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "occurrences": [0, "UNBOUNDED"],
+ "node": "tosca.nodes.Root",
+ "capability": {
+ "name": "tosca.capabilities.Node",
+ "id": "template.yaml/tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "relationship": { "type": "tosca.relationships.DependsOn" }
+ }
+ ],
+ "properties": [
+ {
+ "assignment": {
+ "value":
+ "com.att.ecomp.dcae.eventproc.cdap.common.processors.Catalog,com.att.sa.highlandPark.topoTools.HpTopoDbObjectCatalog,com.att.sa.highlandPark.topoTools.HpTopoDbProcessors,com.att.gfp.dcae.eventProcessor.Catalog"
+ },
+ "name": "defaultCatalogs",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "defaultObjects" } },
+ "name": "defaultObjects",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "Enrich Microservice" },
+ "name": "description",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "dmaapConsumerGrp" } },
+ "name": "dmaapConsumerGrp",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "" },
+ "name": "eventFactory",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "{\"processing\":[{\"phase\":\"enrich\",\"filter\":{\"class\":\"Assigned\",\"field\":\"event.commonEventHeader.sourceName\",\"emtpyIsAssigned\":false},\"processors\":[{\"class\":\"StringTransform\",\"value\":\"${event.commonEventHeader.sourceName}\",\"toField\":\"searchString\",\"targetCase\":\"lower\"},{\"class\":\"EventProcessorMetric\",\"metric\":\"in.events\"},{\"class\":\"LogText\",\"logLevel\":\"WARN\",\"logText\":\"Alarm_EnrichmentStartingfor${hp.tag}\"},{\"class\":\"TopoSearch\",\"searchField\":\"oid\",\"searchValue\":\"${searchString}\",\"updates\":{\"event.commonEventHeader.sourceName\":\"${ptnii_name}\",\"event.commonEventHeader.sourceId\":\"${vserver_id}\",\"event.commonEventHeader.reportingEntityName\":\"${vnf_name}\",\"event.commonEventHeader.reportingEntityId\":\"${vnf_id}\",\"event.commonEventHeader.internalHeaderFields.equipmentType\":\"${equip_type}\",\"event.commonEventHeader.internalHeaderFields.provStatus\":\"${prov_status}\",\"event.commonEventHeader.internalHeaderFields.inMaint\":\"${in_maint}\",\"event.commonEventHeader.internalHeaderFields.tenantName\":\"${tenant_name}\",\"event.commonEventHeader.internalHeaderFields.eventSourceHostname\":\"${hostname}\",\"isEnriched\":true}},{\"class\":\"Set\",\"updates\":{\"event.preCorrelationAging\":\"${preCorrelationAging}\",\"event.prepublishAging\":\"${prepublishAging}\"}},{\"class\":\"Clear\",\"fields\":[\"searchString\"]},{\"class\":\"RunPhase\",\"phase\":\"enrich_publish\"}]}]}"
+ },
+ "name": "json",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": { "get_input": "monitorThreads" } },
+ "name": "monitorThreads",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "enrichMS" },
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "enrich" },
+ "name": "phases.enrich.phaseName",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": ".*" },
+ "name": "phases.enrich.streamPattern",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value":
+ "{\"phase\":\"enrich_publish\",\"processors\":[{\"class\":\"EventProcessorMetric\",\"metric\":\"out.events\"},{\"class\":\"SendEvent\",\"channel\":\"DCAE-ENRICH-EVENT-OUT\"}]}"
+ },
+ "name": "postConfig",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "vnfTypes.*" },
+ "name": "ruleKeyPattern",
+ "type": "string"
+ },
+ {
+ "assignment": { "value": "False" },
+ "name": "startNoChannels",
+ "type": "string"
+ },
+ {
+ "default": "cdap_broker",
+ "assignment": {
+ "value": { "get_input": "connected_broker_dns_name" }
+ },
+ "name": "connected_broker_dns_name",
+ "type": "string",
+ "required": true
+ },
+ { "name": "jar_url", "type": "string", "required": true },
+ {
+ "assignment": {
+ "value": {
+ "get_property": ["SELF", "composition", "location_id"]
+ }
+ },
+ "name": "location_id",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "service_component_type",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "typeinfo": {
+ "itemId":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.dcae.nodes.cdapApp.Enrich",
+ "requirements": [
+ {
+ "node": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.stream.subscribe"
+ },
+ "capability": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.stream.subscribe"
+ },
+ "name": "stream_publish_0",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0/stream_publish_0",
+ "relationship": {
+ "type": "dcae.relationships.rework_connected_to"
+ }
+ },
+ {
+ "node": {
+ "name": "dcae.capabilities.cdapHost",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.cdapHost"
+ },
+ "capability": {
+ "name": "dcae.capabilities.cdapHost",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.cdapHost"
+ },
+ "name": "host",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0/host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "node": {
+ "name": "dcae.capabilities.composition.host",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.composition.host"
+ },
+ "capability": {
+ "name": "dcae.capabilities.composition.host",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.composition.host"
+ },
+ "name": "composition",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0/composition"
+ },
+ {
+ "occurrences": [0, "UNBOUNDED"],
+ "node": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.capabilities.Node"
+ },
+ "capability": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0/dependency",
+ "relationship": { "type": "tosca.relationships.DependsOn" }
+ }
+ ],
+ "capabilities": [
+ {
+ "name": "stream_subscribe_0",
+ "type": {
+ "name": "dcae.capabilities.stream.subscribe",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/dcae.capabilities.stream.subscribe"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "name": "tosca.capabilities.Node",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.capabilities.Node"
+ }
+ }
+ ],
+ "catalogId": 0,
+ "catalog": "http://135.91.225.81:8080",
+ "hierarchy": [
+ {
+ "name": "tosca.dcae.nodes.cdapApp",
+ "id":
+ "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.dcae.nodes.cdapApp"
+ },
+ {
+ "name": "tosca.dcae.nodes.Root",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.dcae.nodes.Root"
+ },
+ {
+ "name": "tosca.nodes.Root",
+ "description":
+ "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "8743b27b-f01e-4b17-a306-37efd42983d0/tosca.nodes.Root"
+ }
+ ],
+ "name": "tosca.dcae.nodes.cdapApp.Enrich",
+ "id": 0
+ },
+ "type": { "name": "tosca.dcae.nodes.cdapApp.Enrich" }
+ }
+ ],
+ "relations": [
+ {
+ "n1": "n.1520766712715.7",
+ "name1": "foi",
+ "n2": "n.1520766711386.5",
+ "name2": "topic1",
+ "meta": {
+ "n1": "n.1520766712715.7",
+ "p1": "stream_publish_0",
+ "relationship": ["foi", null, "stream_publish_0"],
+ "n2": "n.1520766711386.5",
+ "p2": "topic"
+ }
+ },
+ {
+ "n1": "n.1520766712715.7",
+ "name1": "foi",
+ "n2": "n.1520766712709.6",
+ "name2": "feed0",
+ "meta": {
+ "n1": "n.1520766712715.7",
+ "p1": "stream_publish_0",
+ "n2": "n.1520766712709.6",
+ "p2": "feed",
+ "relationship": [
+ "foi",
+ "dcae.relationships.publish_files",
+ "stream_publish_0"
+ ]
+ }
+ },
+ {
+ "n1": "n.1520766711370.3",
+ "name1": "componentSpec_docker_map",
+ "n2": "n.1520766711379.4",
+ "name2": "feed0",
+ "meta": {
+ "n1": "n.1520766711370.3",
+ "p1": "stream_subscribe_0",
+ "n2": "n.1520766711379.4",
+ "p2": "feed",
+ "relationship": [
+ "componentSpec_docker_map",
+ "dcae.relationships.subscribe_to_files",
+ "stream_subscribe_0"
+ ]
+ }
+ },
+ {
+ "n1": "n.1520766711370.3",
+ "name1": "componentSpec_docker_map",
+ "n2": "n.1520766711386.5",
+ "name2": "topic1",
+ "meta": {
+ "n1": "n.1520766711370.3",
+ "p1": "stream_publish_0",
+ "n2": "n.1520766711386.5",
+ "p2": "topic",
+ "relationship": [
+ "componentSpec_docker_map",
+ "dcae.relationships.publish_events",
+ "stream_publish_0"
+ ]
+ }
+ }
+ ],
+ "inputs": [],
+ "outputs": []
+ }
+}
diff --git a/public/cypress/fixtures/doneSaveEditSimpleCopy.json b/public/cypress/fixtures/doneSaveEditSimpleCopy.json
new file mode 100644
index 0000000..cf6344c
--- /dev/null
+++ b/public/cypress/fixtures/doneSaveEditSimpleCopy.json
@@ -0,0 +1,21 @@
+{
+ "version": "4.1",
+ "eventType": "syslogFields",
+ "description": "newRule",
+ "uid": "f620724b-7170-43e1-8a8b-55e98cabe658",
+ "phase": "sto2",
+ "condition": null,
+ "actions": [
+ {
+ "actionType": "copy",
+ "from": {
+ "regex": "",
+ "state": "closed",
+ "values": [{ "value": "" }, { "value": "" }],
+ "value": "aB"
+ },
+ "target": "event.commonEventHeader.domain",
+ "id": "296bcdd0-1d20-11e8-a96d-298fbe0cb0fd"
+ }
+ ]
+}
diff --git a/public/cypress/fixtures/doneSaveSimpleLogText.json b/public/cypress/fixtures/doneSaveSimpleLogText.json
new file mode 100644
index 0000000..be83753
--- /dev/null
+++ b/public/cypress/fixtures/doneSaveSimpleLogText.json
@@ -0,0 +1,26 @@
+{
+ "version": "4.1",
+ "eventType": "syslogFields",
+ "description": "newRule2",
+ "uid": "57612d40-c66d-4a5a-95c3-0165564f837d",
+ "phase": "phase_1",
+ "condition": null,
+ "actions": [
+ {
+ "logText": {
+ "name": "AAA",
+ "level": "BBB",
+ "text": "ABC"
+ },
+ "actionType": "log text",
+ "from": {
+ "regex": "",
+ "state": "closed",
+ "values": [{ "value": "" }, { "value": "" }],
+ "value": ""
+ },
+ "target": "",
+ "id": "e340ab50-423b-11e8-94f2-3dd2f158c314"
+ }
+ ]
+}
diff --git a/public/cypress/fixtures/doneSaveSimpleMap.json b/public/cypress/fixtures/doneSaveSimpleMap.json
new file mode 100644
index 0000000..eb637be
--- /dev/null
+++ b/public/cypress/fixtures/doneSaveSimpleMap.json
@@ -0,0 +1,29 @@
+{
+ "version": "4.1",
+ "eventType": "syslogFields",
+ "description": "newRule2",
+ "uid": "57612d40-c66d-4a5a-95c3-0165564f837d",
+ "phase": "phase_1",
+ "condition": null,
+ "actions": [
+ {
+ "map": {
+ "default": "",
+ "haveDefault": false,
+ "values": [
+ { "key": "Key1", "value": "Key1" },
+ { "key": "Key2", "value": "Key2" }
+ ]
+ },
+ "actionType": "map",
+ "from": {
+ "regex": "",
+ "state": "closed",
+ "values": [{ "value": "" }, { "value": "" }],
+ "value": "test"
+ },
+ "target": "event.commonEventHeader.eventId",
+ "id": "e340ab50-423b-11e8-94f2-3dd2f158c314"
+ }
+ ]
+}
diff --git a/public/cypress/integration/e2e/e2eWithIntegration-spec.ts b/public/cypress/integration/e2e/e2eWithIntegration-spec.ts
index 459a7de..949e966 100644
--- a/public/cypress/integration/e2e/e2eWithIntegration-spec.ts
+++ b/public/cypress/integration/e2e/e2eWithIntegration-spec.ts
@@ -3,7 +3,6 @@ const randomNodeName = () =>
.toString(36)
.substr(2, 7);
const NODE_NAME = randomNodeName();
-
const serverGetDDLData = () => {
return cy
.server()
@@ -12,14 +11,9 @@ const serverGetDDLData = () => {
Cypress.env('backendUrl') + '/getResourcesByMonitoringTemplateCategory'
)
.as('templateAPi')
- .route(
- 'GET',
- Cypress.env('backendUrl') +
- '/service/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a'
- )
+ .route('GET', Cypress.env('backendUrl') + '/service/**')
.as('vfniListAPi');
};
-
const saveAndDoneHttp = () => {
cy.server();
cy
@@ -29,7 +23,6 @@ const saveAndDoneHttp = () => {
})
.as('doneSaveCopyRule');
};
-
const createNewMC = () => {
cy
.get('input[data-tests-id="nameMc"]')
@@ -64,18 +57,33 @@ const createNewMC = () => {
.click()
.wait('@newMC');
};
-
import { buttonCreateMC } from '../mocks/homePage-spec';
import {
selectVersionAndTypeAndAddFirstRule,
- fillRuleDecription,
+ fillRuleDescription,
addCopyAction,
editFirstRule
} from '../mocks/ruleEngine-spec';
+describe('DCAED - forntend e2e and inagration test ', () => {
+ // context(('home page'), () => { it.only('should open env', () => { cy
+ // .visit('https://www.e-access.att.com/DevOps02/sdc1/portal#!/dashboard')
+ // .get(':nth-child(2) > :nth-child(1) > [border="0"][width="100%"] >
+ // :nth-child(1) > :nt' + 'h-child(1) > td > input') .type('ym903w')
+ // .get(':nth-child(3) > td > input') .type('Apple1qazxsw2')
+ // .get('[border="0"][width="100%"] > :nth-child(1) > :nth-child(5) > td >
+ // input') .click() .get('#srv_successok > input') .click()
+ // .get(':nth-child(1) > .w-sdc-dashboard-card-new-content')
+ // .trigger('mouseover') .get('button[data-tests-id="createServiceButton"]')
+ // .click() .get('input[data-tests-id="name"]')
+ // .type(`DCAE_SRV_${NODE_NAME}`)
+ // .get('select[data-tests-id="selectGeneralCategory"]') .select('Mobility')
+ // .get('textarea[data-tests-id="description"]') .type('bla')
+ // .get('input[data-tests-id="projectCode"]') .type('att01')
+ // .get('button[data-tests-id="create/save"]') .click()
+ // .get('div[data-tests-id="CompositionLeftSideMenu"]') .click() }); });
-describe('DCAED - forntend e2e and inagration test', () => {
- context('Empty Monitoring Configuration list for service', () => {
- it('Loads', () => {
+ context('Empty Monitoring Configuration list for service ', () => {
+ it(' Loads ', () => {
cy.homePage();
});
});
@@ -96,50 +104,24 @@ describe('DCAED - forntend e2e and inagration test', () => {
.and('be.disabled');
});
- it('click on create mc - more then one tab should be visible', () => {
- createNewMC();
- cy
- .get('ul[p-tabviewnav]')
- .children()
- .should($el => {
- expect($el.length).to.be.greaterThan(1);
- });
- });
-
- it('should enter rule engine in map tab and create new rule', () => {
- createNewMC();
- cy
- .get('#ui-tabpanel-1-label')
- .should('contain', 'map')
- .click();
- selectVersionAndTypeAndAddFirstRule();
- fillRuleDecription('newRule');
- addCopyAction();
- saveAndDoneHttp();
- cy.get('button[data-tests-id="btnDone"]').click();
- cy
- .wait('@doneSaveCopyRule')
- .get('div[data-tests-id="ruleElement"]')
- .should('be.visible')
- .then(function($lis) {
- expect($lis).to.have.length(1);
- expect($lis.eq(0)).to.contain('newRule');
- });
- editFirstRule();
- fillRuleDecription('LiavRule');
- saveAndDoneHttp();
- cy
- .get('button[data-tests-id="btnSave"]')
- .click()
- .wait('@doneSaveCopyRule')
- .get('a[data-tests-id="btnBackRule"]')
- .click()
- .get('div[data-tests-id="ruleElement"]')
- .should('be.visible')
- .then(function($lis) {
- expect($lis).to.have.length(1);
- expect($lis.eq(0)).to.contain('LiavRule');
- });
- });
+ // it('click on create mc - more then one tab should be visible', () => {
+ // createNewMC(); cy .get('ul[p-tabviewnav]') .children()
+ // .should($el => { expect($el.length).to.be.greaterThan(1); }); });
+ // it('should enter rule engine in map tab and create new rule', () => {
+ // createNewMC(); cy .get('#ui-tabpanel-1-label') .should('contain',
+ // 'map') .click(); selectVersionAndTypeAndAddFirstRule();
+ // fillRuleDescription('newRule'); addCopyAction(); saveAndDoneHttp();
+ // cy.get('button[data-tests-id="btnDone"]').click(); cy
+ // .wait('@doneSaveCopyRule') .get('div[data-tests-id="ruleElement"]')
+ // .should('be.visible') .then(function($lis) {
+ // expect($lis).to.have.length(1);
+ // expect($lis.eq(0)).to.contain('newRule'); }); editFirstRule();
+ // fillRuleDescription('LiavRule'); saveAndDoneHttp(); cy
+ // .get('button[data-tests-id="btnSave"]') .click()
+ // .wait('@doneSaveCopyRule') .get('a[data-tests-id="btnBackRule"]')
+ // .click() .get('div[data-tests-id="ruleElement"]')
+ // .should('be.visible') .then(function($lis) {
+ // expect($lis).to.have.length(1);
+ // expect($lis.eq(0)).to.contain('LiavRule'); }); });
});
});
diff --git a/public/cypress/integration/mocks/errorDialog-spec.ts b/public/cypress/integration/mocks/errorDialog-spec.ts
index 9141ab2..e879a9f 100644
--- a/public/cypress/integration/mocks/errorDialog-spec.ts
+++ b/public/cypress/integration/mocks/errorDialog-spec.ts
@@ -10,12 +10,18 @@ describe('Dialog error - E2E test flow with mock', () => {
});
it('Simulate error dialog is close by cancel button', () => {
- cy.get('button[data-tests-id="error-cancel"]').click();
+ cy
+ .get('button[data-tests-id="error-cancel"]')
+ .first()
+ .click({ force: true });
cy.get('.ui-dialog').should('not.be.visible');
});
it('Simulate error dialog is close by X button', () => {
- cy.get('.ui-dialog-titlebar-icon').click();
+ cy
+ .get('span[data-tests-id="error-cancel-icon"]')
+ .first()
+ .click({ force: true });
cy.get('.ui-dialog').should('not.be.visible');
});
});
diff --git a/public/cypress/integration/mocks/generalPage-spec.ts b/public/cypress/integration/mocks/generalPage-spec.ts
index 1297de8..58a4bc8 100644
--- a/public/cypress/integration/mocks/generalPage-spec.ts
+++ b/public/cypress/integration/mocks/generalPage-spec.ts
@@ -1,4 +1,55 @@
describe('General Page - E2E test flow with mock', () => {
+ describe('Check Boolean DDL', () => {
+ beforeEach(() => {
+ cy.httpGenerateMappingRulesFileName();
+ cy.httpGetDDLData();
+ cy.httpCreateNewMcWithBooleanDDL();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ });
+
+ it(
+ 'Check boolean DDL with value undefined - using true, true - using true and false' +
+ ' - using false.',
+ () => {
+ cy.fillNewMcForm();
+ cy
+ .get('button[data-tests-id="createMonitoring"]')
+ .as('createButton')
+ .not('[disabled]')
+ .should('not.contain', 'Disabled');
+
+ cy.httpCreateNewMcWithBooleanDDL();
+ cy.emptyRuleEngine('Type1');
+
+ cy.get('@createButton').click();
+ cy
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
+ cy
+ .get('button[data-tests-id="setting-gear"]')
+ .should('be.visible')
+ .first()
+ .click({ multiple: true });
+
+ cy
+ .get('.map-setting-list #mappingType > .field-text')
+ .should('have.value', 'multiple');
+ cy
+ .get('.map-setting-list > form > #valueUndefined > select')
+ .should('have.value', 'true');
+ cy
+ .get('.map-setting-list > form > #valueTrue > select')
+ .should('have.value', 'true');
+ cy
+ .get('.map-setting-list > form > #valueFalse > select')
+ .should('have.value', 'false');
+ }
+ );
+ });
+
describe('Create new MC', () => {
beforeEach(() => {
cy.httpGetDDLData();
@@ -14,6 +65,39 @@ describe('General Page - E2E test flow with mock', () => {
.and('be.disabled');
});
+ it('After submit advenced setting description exist in first input', () => {
+ cy.fillNewMcForm();
+ cy
+ .get('button[data-tests-id="createMonitoring"]')
+ .as('createButton')
+ .not('[disabled]')
+ .should('not.contain', 'Disabled');
+
+ cy.httpCreateNewMc();
+ cy.emptyRuleEngine('Type1');
+
+ cy.get('@createButton').click();
+ cy
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
+ cy
+ .get('button[data-tests-id="setting-gear"]')
+ .should('be.visible')
+ .first()
+ .click({ multiple: true });
+
+ cy
+ .get('.map-setting-list #Type1 .help-description')
+ .trigger('mouseenter')
+ .get('.ui-tooltip')
+ .should('be.visible')
+ .should(
+ 'contain',
+ 'CSV to VES mapping, from the file to generate multiple events or single event'
+ );
+ });
+
it('Fill form then click to submit verify setting button and constrain ddl', () => {
cy.fillNewMcForm();
cy
@@ -42,6 +126,29 @@ describe('General Page - E2E test flow with mock', () => {
});
});
+ describe('Flow diagram', () => {
+ beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ cy.fillNewMcForm();
+ cy.httpCreateNewMc();
+ cy.get('button[data-tests-id="createMonitoring"]').click();
+ });
+
+ it.only('should flow diagram need to exist', () => {
+ cy.get('#diagram').should('be.visible');
+ });
+
+ it('should flow diagram need to contain 4 connections', () => {
+ cy
+ .get('#diagram line')
+ .its('length')
+ .should('be.equal', 4);
+ });
+ });
+
describe('Tabs after MC created', () => {
beforeEach(() => {
cy.httpGetDDLData();
@@ -50,7 +157,6 @@ describe('General Page - E2E test flow with mock', () => {
cy.get('button[data-tests-id="btn-create-mc"]').click();
cy.fillNewMcForm();
cy.httpCreateNewMc();
- cy.emptyRuleEngine('Type1');
cy.get('button[data-tests-id="createMonitoring"]').click();
});
diff --git a/public/cypress/integration/mocks/homePage-spec.ts b/public/cypress/integration/mocks/homePage-spec.ts
index 2889390..5f96c98 100644
--- a/public/cypress/integration/mocks/homePage-spec.ts
+++ b/public/cypress/integration/mocks/homePage-spec.ts
@@ -6,11 +6,11 @@ export const buttonCreateMCSpan = () => {
};
export const tableItems = () => {
- return cy.get('tr[data-tests-id="monitoringComponentTableItems"]');
+ return cy.get('datatable-row-wrapper');
};
-export const tableHeaders = () => {
- return cy.get('tr[data-tests-id="monitoringComponentTableHeaders"]');
+export const monitoringComponentTable = () => {
+ return cy.get('ngx-datatable[data-tests-id="monitoringComponentTable"]');
};
export const tableItemsDeleteButton = () => {
return cy.get('button[data-tests-id="tableItemsButtonDelete"]');
@@ -64,9 +64,9 @@ describe('Home Page - E2E test flow with mock', () => {
});
it("Shouldn't have create table with headers", () => {
- tableHeaders().should('not.be.visible');
+ monitoringComponentTable().should('not.be.visible');
});
- it("Shouldn't have create table without items", () => {
+ it("Shouldn't have create table with items", () => {
buttonCreateMC()
.get('div[data-tests-id="new-monitoring-title"]')
.should('contain', 'Monitoring');
@@ -100,20 +100,13 @@ describe('Home Page - E2E test flow with mock', () => {
});
it('Should have create table with headers', () => {
- tableHeaders().should('be.visible');
+ monitoringComponentTable().should('be.visible');
});
it('Should have create table with items', () => {
tableItems().should('have.length', NUMBER_OF_ITEMS);
});
});
- describe('MC List Edit Tests', () => {
- beforeEach(() => {
- cy.getMCList();
- cy.homePage();
- });
- });
-
describe('MC List Delete Tests', () => {
beforeEach(() => {
cy.getMCList();
@@ -126,26 +119,34 @@ describe('Home Page - E2E test flow with mock', () => {
tableItemsDeleteButton().should('be.visible');
tableItemsInfoButton().should('not.be.visible');
});
- it('Mouse hover over item, call delete and remove not submitted (call delete without blueprint api)', () => {
- tableItems().should('have.length', NUMBER_OF_ITEMS);
- doHoverOverFirstLine();
- tableItemsDeleteButton()
- .should('be.visible')
- .click({ force: true });
- popupGetDeleteBtn().click({ force: true });
- tableItems().should('have.length', NUMBER_OF_ITEMS - 1);
- });
- it('Mouse hover over item, call delete and remove submitted (call delete with blueprint api)', () => {
- tableItems()
- .should('have.length', NUMBER_OF_ITEMS)
- .last()
- .trigger('mouseover');
- tableItemsDeleteButton()
- .should('be.visible')
- .click({ force: true });
- popupGetDeleteBtn().click({ force: true });
- tableItems().should('have.length', NUMBER_OF_ITEMS - 1);
- });
+ it(
+ 'Mouse hover over item, call delete and remove not submitted (call delete without' +
+ ' blueprint api)',
+ () => {
+ tableItems().should('have.length', NUMBER_OF_ITEMS);
+ doHoverOverFirstLine();
+ tableItemsDeleteButton()
+ .should('be.visible')
+ .click({ force: true });
+ popupGetDeleteBtn().click({ force: true });
+ tableItems().should('have.length', NUMBER_OF_ITEMS - 1);
+ }
+ );
+ it(
+ 'Mouse hover over item, call delete and remove submitted (call delete with bluepr' +
+ 'int api)',
+ () => {
+ tableItems()
+ .should('have.length', NUMBER_OF_ITEMS)
+ .last()
+ .trigger('mouseover');
+ tableItemsDeleteButton()
+ .should('be.visible')
+ .click({ force: true });
+ popupGetDeleteBtn().click({ force: true });
+ tableItems().should('have.length', NUMBER_OF_ITEMS - 1);
+ }
+ );
it('Mouse hover over item, call delete and cancelOperation', () => {
tableItems().should('have.length', NUMBER_OF_ITEMS);
doHoverOverFirstLine();
@@ -171,6 +172,7 @@ describe('Home Page - E2E test flow with mock', () => {
describe('Successfully Entry Home Page Monitoring Configuration', () => {
beforeEach(() => {
+ cy.httpGetDDLData();
cy.getMCListEmpty();
cy.homePage();
});
@@ -190,12 +192,17 @@ describe('Home Page - E2E test flow with mock', () => {
it('Buttons Functionality Assertion', () => {
buttonCreateMC()
.click()
- .get('div[data-tests-id="new-monitoring-title"]')
+ .get('div[data-tests-id="new-monitorying-titie"]')
.should('contain', 'Monitoring');
});
});
describe('Not Auth Entry Home Page Monitoring Configuration', () => {
+ beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ });
+
it('Buttons disabled when user not owner', () => {
cy.sdcIsOwnerFalse();
navigateButtonDisabled();
diff --git a/public/cypress/integration/mocks/importPage-spec.ts b/public/cypress/integration/mocks/importPage-spec.ts
index 7af904e..446409c 100644
--- a/public/cypress/integration/mocks/importPage-spec.ts
+++ b/public/cypress/integration/mocks/importPage-spec.ts
@@ -5,13 +5,10 @@ const loadVfcmtList = () => {
method: 'GET',
url:
Cypress.env('backendUrl') +
- '/SERVICE/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/0.1/getVfcmtsForMigration',
+ '/SERVICES/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/0.1/getVfcmtsForMigration',
response: 'fixture:importVfcmt'
})
- .as('importVfcmtList')
- .visit(
- 'http://localhost:4300/#/main/SERVICE/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/0.1/import'
- );
+ .as('importVfcmtList');
};
const getVfcmtRefData = data => {
@@ -93,7 +90,11 @@ const getImportButton = () => {
describe('Import Page', () => {
context('First step - get vfcmts list and pick one', () => {
beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
loadVfcmtList();
+ cy.get('button[data-tests-id="btn-import-mc"]').click();
});
it('should have values in ddl', () => {
@@ -129,7 +130,11 @@ describe('Import Page', () => {
context('second step - fill fileds according to server response', () => {
beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
loadVfcmtList();
+ cy.get('button[data-tests-id="btn-import-mc"]').click();
});
it('get flow type true and service is match to context service', () => {
@@ -208,7 +213,11 @@ describe('Import Page', () => {
context('final step - import vfcmt and getting cdump for tabs', () => {
beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
loadVfcmtList();
+ cy.get('button[data-tests-id="btn-import-mc"]').click();
getVfcmtRefData({
serviceUuid: '06c7d927-4e2f-47e1-a29d-b6ed229ebc0a',
name: 'test',
diff --git a/public/cypress/integration/mocks/ruleEngine-spec.ts b/public/cypress/integration/mocks/ruleEngine-spec.ts
index 9a75b87..d2c0b69 100644
--- a/public/cypress/integration/mocks/ruleEngine-spec.ts
+++ b/public/cypress/integration/mocks/ruleEngine-spec.ts
@@ -2,6 +2,14 @@ export const mappingTragetDDL = () => {
return cy.get('select[data-tests-id="mappingDdl"]');
};
+export const getExistRulesList = () => {
+ return cy.get('option[data-tests-id="templateOptionsExist"]');
+};
+
+export const getNotExistRulesList = () => {
+ return cy.get('option[data-tests-id="templateOptionsNotExist"]');
+};
+
export const selectVersionAndTypeAndAddFirstRule = () => {
return cy
.get('select[data-tests-id="selectVersion"]')
@@ -12,13 +20,55 @@ export const selectVersionAndTypeAndAddFirstRule = () => {
.click();
};
-export const fillRuleDecription = text => {
+export const fillRuleDescription = text => {
return cy
.get('input[data-tests-id="inputDescription"]')
.clear()
.type(text);
};
+export const addMapAndDeleteRowAction = () => {
+ cy.get('select[data-tests-id="selectAction"]').select('map');
+ cy.get('button[data-tests-id="btnAddAction"]').click();
+ // fill map action
+ cy
+ .get('input[data-tests-id="valueInput"]')
+ .first()
+ .type('B')
+ .should('have.value', 'B');
+
+ return cy
+ .get('input[data-tests-id="key"]')
+ .type('Key1')
+ .should('have.value', 'Key1')
+ .get('input[data-tests-id="value"]')
+ .type('Key1')
+ .should('have.value', 'Key1')
+ .get('button[data-tests-id="btn-add-row"]')
+ .click()
+ .get('input[data-tests-id="key"]')
+ .last()
+ .type('Key2')
+ .should('have.value', 'Key2')
+ .get('input[data-tests-id="value"]')
+ .last()
+ .type('Key2')
+ .should('have.value', 'Key2')
+ .get('button[data-tests-id="btn-add-row"]')
+ .click()
+ .get('input[data-tests-id="key"]')
+ .last()
+ .type('Key3')
+ .should('have.value', 'Key3')
+ .get('input[data-tests-id="value"]')
+ .last()
+ .type('Key3')
+ .should('have.value', 'Key3')
+ .get('button[data-tests-id="btn-remove-row"]')
+ .last()
+ .click();
+};
+
export const addCopyAction = () => {
return cy
.get('select[data-tests-id="selectAction"]')
@@ -27,6 +77,7 @@ export const addCopyAction = () => {
.click()
.get('input[data-tests-id="valueInput"]')
.type('A')
+ .should('have.value', 'A')
.get('span[data-tests-id="openTargetTree"]')
.click()
.get('.bottom-select')
@@ -56,11 +107,71 @@ export const editFirstRule = () => {
.click();
};
-export const translateValue = () => {
- return '{"processing":[{"phase":"snmp_map","processors":[{"array":"varbinds","datacolumn":"varbind_value","keycolumn":"varbind_oid","class":"SnmpConvertor"},{"phase":"sto2","class":"RunPhase"}]},{"phase":"sto2","processors":[{"updates":{"event.commonEventHeader.domain":"a"},"class":"Set"}]},{"phase":"sto2","processors":[{"phase":"map_publish","class":"RunPhase"}]}]}';
+export const editLastRule = () => {
+ return cy
+ .get('div[data-tests-id="ruleElement"]')
+ .last()
+ .trigger('mouseover')
+ .get('button[data-tests-id="editRule"]')
+ .should('be.visible')
+ .click();
};
+export const deleteFirstRule = () => {
+ cy
+ .get('div[data-tests-id="ruleElement"]')
+ .first()
+ .trigger('mouseover')
+ .get('button[data-tests-id="deleteRule"]')
+ .should('be.visible')
+ .click()
+ .get('div[data-tests-id="delete-popup"]');
+
+ cy.deleteRule();
+ return cy.get('button[data-tests-id="btnDelete"]').click();
+};
+
+export const translateValue = () => {
+ return (
+ '{"processing":[{"phase":"snmp_map","processors":[{"array":"varbinds","datacolumn' +
+ '":"varbind_value","keycolumn":"varbind_oid","class":"SnmpConvertor"},{"phase":"s' +
+ 'to2","class":"RunPhase"}]},{"phase":"sto2","processors":[{"updates":{"event.comm' +
+ 'onEventHeader.domain":"a"},"class":"Set"}]},{"phase":"sto2","processors":[{"phas' +
+ 'e":"map_publish","class":"RunPhase"}]}]}'
+ );
+};
+const NUMBER_OF_EXIST_ITEMS = 3;
+const NUMBER_OF_NOT_EXIST_ITEMS = 16;
describe('Rule engine - E2E test flow with mock', () => {
+ describe('Checking rules exist and not exist separation', () => {
+ beforeEach(() => {
+ cy.httpGenerateMappingRulesFileName();
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ cy.fillNewMcForm();
+ cy.httpCreateNewMc();
+ cy.emptyRuleEngine('Type1');
+ cy.get('button[data-tests-id="createMonitoring"]').click();
+ cy
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
+ });
+ it('In exist group contain 3 visible options and not exist 16 visible', () => {
+ mappingTragetDDL()
+ .should('be.visible')
+ .contains('json');
+ getExistRulesList()
+ .not('[hidden]')
+ .should('have.length', NUMBER_OF_EXIST_ITEMS);
+ getNotExistRulesList()
+ .not('[hidden]')
+ .should('have.length', NUMBER_OF_NOT_EXIST_ITEMS);
+ });
+ });
+
describe('Mapping target select', () => {
beforeEach(() => {
cy.httpGetDDLData();
@@ -82,25 +193,521 @@ describe('Rule engine - E2E test flow with mock', () => {
.should('be.visible')
.contains('json');
});
+ });
- it('should page refrash after change select value in mapping target ddl', () => {
+ describe('Fill all available Actions', () => {
+ beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ cy.fillNewMcForm();
+ cy.httpCreateNewMc();
+ cy.emptyRuleEngine('Type1');
+ cy
+ .get('button[data-tests-id="createMonitoring"]')
+ .click()
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
cy.httpTargetTree();
+ selectVersionAndTypeAndAddFirstRule();
+ fillRuleDescription('newRule');
+ });
+
+ it('add copy action', () => {
+ addCopyAction();
+ });
+
+ it('add concat action', () => {
+ cy.get('select[data-tests-id="selectAction"]').select('concat');
+ cy.get('button[data-tests-id="btnAddAction"]').click();
+ // fill concat action
cy
- .get('select[data-tests-id="selectVersion"]')
- .select('4.1')
- .get('select[data-tests-id="selectEventType"]')
- .select('syslog')
- .get('button[data-tests-id="btnAddFirstRule"]')
- .should('be.visible');
- cy.emptyRuleEngine('json');
- mappingTragetDDL()
- .select('json')
- .get('select[data-tests-id="selectVersion"]')
- .should('have.value', null);
+ .get('input[data-tests-id="valueInput"]')
+ .first()
+ .type('A')
+ .should('have.value', 'A');
+ cy
+ .get('input[data-tests-id="valueInput"]')
+ .last()
+ .type('B')
+ .should('have.value', 'B');
+ cy
+ .get('span[data-tests-id="openTargetTree"]')
+ .click()
+ .get('.bottom-select')
+ .should('be.visible')
+ .find('.toggle-children')
+ .first()
+ .click();
+
+ cy
+ .get('span[data-tests-id="targetNode"]')
+ .should(node => {
+ expect(node.eq(0)).to.contain('commonEventHeader');
+ expect(node.eq(1)).to.contain('domain');
+ })
+ .each(($el, index) => {
+ if (index === 1) {
+ cy.wrap($el).click();
+ }
+ });
+
+ cy
+ .get('input[data-tests-id="inputTarget"]')
+ .should('have.value', 'event.commonEventHeader.domain');
+ });
+
+ it('add map action', () => {
+ addMapAndDeleteRowAction();
+
+ cy
+ .get('span[data-tests-id="openTargetTree"]')
+ .click()
+ .get('.bottom-select')
+ .should('be.visible')
+ .find('.toggle-children')
+ .first()
+ .click();
+
+ cy
+ .get('span[data-tests-id="targetNode"]')
+ .should(node => {
+ expect(node.eq(0)).to.contain('commonEventHeader');
+ expect(node.eq(1)).to.contain('domain');
+ })
+ .each(($el, index) => {
+ if (index === 1) {
+ cy.wrap($el).click();
+ }
+ });
+
+ cy.get('input[data-tests-id="defaultCheckbox"]').click();
+ cy.get('input[data-tests-id="defaultInput"]').type('default value');
+
+ cy
+ .get('input[data-tests-id="inputTarget"]')
+ .should('have.value', 'event.commonEventHeader.domain');
+ });
+
+ it('add date-formatter action', () => {
+ cy.get('select[data-tests-id="selectAction"]').select('date formatter');
+ cy.get('button[data-tests-id="btnAddAction"]').click();
+
+ // fill date-formatter action Section 1
+ cy
+ .get('input[data-tests-id="valueInput"]')
+ .first()
+ .type('A')
+ .should('have.value', 'A')
+ .get('span[data-tests-id="openTargetTree"]')
+ .click()
+ .get('.bottom-select')
+ .should('be.visible')
+ .find('.toggle-children')
+ .first()
+ .click()
+ .get('span[data-tests-id="targetNode"]')
+ .should(node => {
+ expect(node.eq(0)).to.contain('commonEventHeader');
+ expect(node.eq(1)).to.contain('domain');
+ })
+ .each(($el, index) => {
+ if (index === 1) {
+ cy.wrap($el).click();
+ }
+ });
+ cy
+ .get('input[data-tests-id="inputTarget"]')
+ .should('have.value', 'event.commonEventHeader.domain');
+
+ // Section 2
+ cy
+ .get('input[data-tests-id="InputFromFormat"]')
+ .type('04/03/2018')
+ .should('have.value', '04/03/2018')
+ .get('input[data-tests-id="InputFromTimezone"]')
+ .type('11:50:00')
+ .should('have.value', '11:50:00')
+ .get('input[data-tests-id="InputToFormat"]')
+ .type('04/08/2018')
+ .should('have.value', '04/08/2018')
+ .get('input[data-tests-id="InputToTimezone"]')
+ .type('11:50:00')
+ .should('have.value', '11:50:00');
+ });
+
+ it('add conditional action', () => {
+ cy
+ .get('input[data-tests-id="isCondition"]')
+ .click()
+ .get('input[data-tests-id="left"]')
+ .type('ABC')
+ .should('have.value', 'ABC');
+
+ cy
+ .get('select[data-tests-id="selectOperator"]')
+ .select('startsWith')
+ .get('input[data-tests-id="right"]')
+ .type('A')
+ .should('have.value', 'A');
+
+ cy
+ .get('button[data-tests-id="addCondition"]')
+ .click()
+ .get('input[data-tests-id="left"]')
+ .last()
+ .type('DEF')
+ .should('have.value', 'DEF');
+
+ cy
+ .get('select[data-tests-id="selectOperator"]')
+ .last()
+ .select('endsWith')
+ .get('input[data-tests-id="right"]')
+ .last()
+ .type('F')
+ .should('have.value', 'F');
+
+ cy
+ .get('button[data-tests-id="addCondition"]')
+ .click()
+ .get('input[data-tests-id="left"]')
+ .last()
+ .type('HIJ')
+ .should('have.value', 'HIJ');
+
+ cy
+ .get('select[data-tests-id="selectOperator"]')
+ .last()
+ .select('equals')
+ .get('input[data-tests-id="right"]')
+ .last()
+ .type('HHH')
+ .should('have.value', 'HHH');
+
+ cy
+ .get('button[data-tests-id="RemoveCondition"]')
+ .last()
+ .click()
+ .get('button[data-tests-id="addConditionGroup"]')
+ .click();
+
+ // try to delete element (1 of 2 items in group)
+ cy
+ .get('button[data-tests-id="RemoveCondition"]')
+ .last()
+ .click()
+ .get('input[data-tests-id="left"]')
+ .eq(2)
+ .type('KLM')
+ .should('have.value', 'KLM');
+
+ cy
+ .get('select[data-tests-id="selectOperator"]')
+ .eq(2)
+ .select('notEqual')
+ .get('input[data-tests-id="right"]')
+ .eq(2)
+ .type('MMM')
+ .should('have.value', 'MMM')
+ .get('input[data-tests-id="left"]')
+ .last()
+ .type('NOP')
+ .should('have.value', 'NOP');
+
+ cy
+ .get('select[data-tests-id="selectOperator"]')
+ .last()
+ .select('contains')
+ .get('input[data-tests-id="right"]')
+ .last()
+ .type('PPP')
+ .should('have.value', 'PPP');
+
+ cy
+ .get('button[data-tests-id="addCondition"]')
+ .last()
+ .click()
+ .get('input[data-tests-id="left"]')
+ .last()
+ .type('QQQ')
+ .should('have.value', 'QQQ');
+
+ cy
+ .get('select[data-tests-id="selectOperator"]')
+ .last()
+ .select('endsWith')
+ .get('input[data-tests-id="right"]')
+ .last()
+ .type('Q')
+ .should('have.value', 'Q')
+ .get('button[data-tests-id="RemoveCondition"]')
+ .last()
+ .click();
+
+ cy
+ .get('button[data-tests-id="removeConditionNode"]')
+ .last()
+ .click();
+ });
+
+ it('add clear action', () => {
+ cy
+ .get('select[data-tests-id="selectAction"]')
+ .select('clear')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('input[data-tests-id="valueInput"]')
+ .type('ABC')
+ .should('have.value', 'ABC');
+
+ cy
+ .get('button[data-tests-id="btnAddInput"]')
+ .click()
+ .get('input[data-tests-id="valueInput"]')
+ .last()
+ .type('DEA')
+ .should('have.value', 'DEA');
+
+ cy
+ .get('button[data-tests-id="btnDelete"]')
+ .first()
+ .click();
+ });
+
+ it('add replace text action', () => {
+ cy
+ .get('select[data-tests-id="selectAction"]')
+ .select('replace text')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click();
+
+ cy
+ .get('input[data-tests-id="valueInput"]')
+ .type('ABC')
+ .should('have.value', 'ABC');
+
+ cy
+ .get('input[data-tests-id="InputFindWhat"]')
+ .type('AAA')
+ .should('have.value', 'AAA');
+
+ cy
+ .get('input[data-tests-id="InputReplaceWith"]')
+ .type('BBB')
+ .should('have.value', 'BBB');
+ });
+
+ it('add log text action', () => {
+ cy
+ .get('select[data-tests-id="selectAction"]')
+ .select('log text')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click();
+
+ cy
+ .get('input[data-tests-id="InputLogText"]')
+ .type('ABC')
+ .should('have.value', 'ABC');
+
+ cy
+ .get('input[data-tests-id="InputLogName"]')
+ .type('AAA')
+ .should('have.value', 'AAA');
+
+ cy
+ .get('input[data-tests-id="InputLogLevel"]')
+ .type('BBB')
+ .should('have.value', 'BBB');
+ });
+
+ it('add log event action', () => {
+ cy
+ .get('select[data-tests-id="selectAction"]')
+ .select('log event')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click();
+
+ cy
+ .get('input[data-tests-id="InputLogTitle"]')
+ .type('Title test')
+ .should('have.value', 'Title test');
+ });
+ });
+
+ describe('rule and Actions CRUD Procedure', () => {
+ beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ cy.fillNewMcForm();
+ cy.httpCreateNewMc();
+ cy.emptyRuleEngine('Type1');
+ cy
+ .get('button[data-tests-id="createMonitoring"]')
+ .click()
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
+ cy.httpTargetTree();
+ selectVersionAndTypeAndAddFirstRule();
+ fillRuleDescription('newRule');
+ });
+
+ it('add clear action', () => {
+ cy
+ .get('select[data-tests-id="selectAction"]')
+ .select('copy')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('concat')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('map')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('date formatter')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('log text')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('log event')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('replace text')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click()
+ .get('select[data-tests-id="selectAction"]')
+ .select('clear')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click();
+ });
+
+ it('add rule with copy action CRUD procedure', () => {
+ // Create action
+ addCopyAction();
+
+ cy.doneSaveRule();
+ cy.get('button[data-tests-id="btnDone"]').click();
+
+ // value approve
+ editFirstRule();
+
+ cy
+ .get('input[data-tests-id="valueInput"]')
+ .should('have.value', 'a')
+ .get('input[data-tests-id="inputTarget"]')
+ .should('have.value', 'event.commonEventHeader.domain')
+
+ // change value
+ .get('input[data-tests-id="valueInput"]')
+ .type('B')
+ .get('button[data-tests-id="btnSave"]')
+ .click();
+ cy.doneSaveAndEditRule();
+ cy.get('button[data-tests-id="btnDone"]').click();
+
+ // Delete copy action
+ deleteFirstRule();
+ });
+
+ it('add multiple rules CRUD procedure', () => {
+ // Create actions
+ addCopyAction();
+ cy.doneSaveRule();
+ cy.get('button[data-tests-id="btnDone"]').click();
+
+ // Edit copy action - verify values
+ editFirstRule();
+
+ cy
+ .get('input[data-tests-id="valueInput"]')
+ .should('have.value', 'a')
+ .get('input[data-tests-id="inputTarget"]')
+ .should('have.value', 'event.commonEventHeader.domain')
+ .get('button[data-tests-id="btnDone"]')
+ .click();
+
+ // Add new rule with map action
+ cy.get('button[data-tests-id="addMoreRule"]').click();
+ fillRuleDescription('newRule2');
+ addMapAndDeleteRowAction();
+ cy.doneSaveMapRule();
+ cy.get('button[data-tests-id="btnDone"]').click();
+
+ // Verify map values
+ editLastRule();
+
+ cy
+ .get('input[data-tests-id="key"]')
+ .first()
+ .should('have.value', 'Key1')
+ .get('input[data-tests-id="value"]')
+ .first()
+ .should('have.value', 'Key1')
+ .get('input[data-tests-id="key"]')
+ .last()
+ .should('have.value', 'Key2')
+ .get('input[data-tests-id="value"]')
+ .last()
+ .should('have.value', 'Key2');
+ cy.get('button[data-tests-id="btnDone"]').click();
+
+ // Delete copy Action
+ deleteFirstRule();
+ });
+
+ it('add rule with log text action CRUD procedure', () => {
+ cy
+ .get('select[data-tests-id="selectAction"]')
+ .select('log text')
+ .get('button[data-tests-id="btnAddAction"]')
+ .click();
+
+ cy
+ .get('input[data-tests-id="InputLogText"]')
+ .type('ABC')
+ .should('have.value', 'ABC');
+
+ cy
+ .get('input[data-tests-id="InputLogName"]')
+ .type('AAA')
+ .should('have.value', 'AAA');
+
+ cy
+ .get('input[data-tests-id="InputLogLevel"]')
+ .type('BBB')
+ .should('have.value', 'BBB');
+
+ cy.doneSaveLogTextRule();
+ cy.get('button[data-tests-id="btnDone"]').click();
+
+ // value assertion
+ editFirstRule();
+
+ cy
+ .get('input[data-tests-id="InputLogText"]')
+ .should('have.value', 'ABC')
+ .get('input[data-tests-id="InputLogName"]')
+ .should('have.value', 'AAA')
+ .get('input[data-tests-id="InputLogLevel"]')
+ .should('have.value', 'BBB');
+
+ cy.get('button[data-tests-id="btnDone"]').click();
});
});
- describe('Translate And Save Rule List', () => {
+ describe('Translate and save Rule List', () => {
beforeEach(() => {
cy.httpGetDDLData();
cy.getMCListEmpty();
@@ -117,7 +724,7 @@ describe('Rule engine - E2E test flow with mock', () => {
.click();
cy.httpTargetTree();
selectVersionAndTypeAndAddFirstRule();
- fillRuleDecription('newRule');
+ fillRuleDescription('newRule');
addCopyAction();
cy.doneSaveRule();
});
@@ -159,7 +766,7 @@ describe('Rule engine - E2E test flow with mock', () => {
.click()
.get('.toast-container')
.should('be.visible')
- .get('.map-setting-list > #Type1 > input')
+ .get('.map-setting-list > form > #Type1 > input')
.should('be.visible')
.and('have.value', translateValue());
});
diff --git a/public/cypress/support/generalCommands.ts b/public/cypress/support/generalCommands.ts
index fc87acc..35d2fa7 100644
--- a/public/cypress/support/generalCommands.ts
+++ b/public/cypress/support/generalCommands.ts
@@ -3,6 +3,7 @@ declare namespace Cypress {
httpGetDDLData: typeof httpGetDDLData;
fillNewMcForm: typeof fillNewMcForm;
httpCreateNewMc: typeof httpCreateNewMc;
+ httpCreateNewMcWithBooleanDDL: typeof httpCreateNewMcWithBooleanDDL;
}
}
@@ -44,7 +45,22 @@ function httpCreateNewMc() {
.as('newMC');
}
+function httpCreateNewMcWithBooleanDDL() {
+ cy.server();
+ cy
+ .route({
+ method: 'POST',
+ url: Cypress.env('backendUrl') + '/createMC',
+ response: 'fixture:createMcResWithBooleanDDL'
+ })
+ .as('newMCWithBooleanDDL');
+}
+
// Add cypress commands
Cypress.Commands.add('httpGetDDLData', httpGetDDLData);
Cypress.Commands.add('fillNewMcForm', fillNewMcForm);
Cypress.Commands.add('httpCreateNewMc', httpCreateNewMc);
+Cypress.Commands.add(
+ 'httpCreateNewMcWithBooleanDDL',
+ httpCreateNewMcWithBooleanDDL
+);
diff --git a/public/cypress/support/homeCommands.ts b/public/cypress/support/homeCommands.ts
index 6f3349c..d54f30e 100644
--- a/public/cypress/support/homeCommands.ts
+++ b/public/cypress/support/homeCommands.ts
@@ -17,25 +17,33 @@ declare namespace Cypress {
// functionality
function sdcIsOwnerFalse(): void {
cy.visit(
- 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICE&uuid=b1645734-b812-4cd7-a0cc-5b5843940ad6&lifecycleState=NOT_CERTIFIED_CHECKOUT&isOwner=false'
+ 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICES&uu' +
+ 'id=06c7d927-4e2f-47e1-a29d-b6ed229ebc0a&lifecycleState=NOT_CERTIFIED_CHECKOUT&is' +
+ 'Owner=false&version=0.1'
);
}
function sdcUserNotCheckout(): void {
cy.visit(
- 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICE&uuid=b1645734-b812-4cd7-a0cc-5b5843940ad6&lifecycleState=READY_FOR_CERTIFICATION&isOwner=true'
+ 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICES&uu' +
+ 'id=06c7d927-4e2f-47e1-a29d-b6ed229ebc0a&lifecycleState=READY_FOR_CERTIFICATION&i' +
+ 'sOwner=true&version=0.1'
);
}
function homePage(): void {
cy.visit(
- 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICES&uuid=06c7d927-4e2f-47e1-a29d-b6ed229ebc0a&lifecycleState=NOT_CERTIFIED_CHECKOUT&isOwner=true&version=0.1'
+ 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICES&uu' +
+ 'id=06c7d927-4e2f-47e1-a29d-b6ed229ebc0a&lifecycleState=NOT_CERTIFIED_CHECKOUT&is' +
+ 'Owner=true&version=0.1'
);
}
function homePageCertified(): void {
cy.visit(
- 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICES&uuid=06c7d927-4e2f-47e1-a29d-b6ed229ebc0a&lifecycleState=CERTIFIED_CHECKOUT&isOwner=true&version=0.1'
+ 'home?userId=cs0008&userRole=DESIGNER&displayType=context&contextType=SERVICES&uu' +
+ 'id=06c7d927-4e2f-47e1-a29d-b6ed229ebc0a&lifecycleState=CERTIFIED_CHECKOUT&isOwne' +
+ 'r=true&version=0.1'
);
}
@@ -46,7 +54,8 @@ function deleteMonitoringComponent(): void {
method: 'DELETE',
url:
Cypress.env('backendUrl') +
- '/SERVICES/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/vfb53dd48360ff4fa2b66e6ceb1961bd9b0/cba37ed8-94e1-406f-b4f5-b5edbc31ac85/deleteVfcmtReference',
+ '/SERVICES/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/vfb53dd48360ff4fa2b66e6ceb1961bd9' +
+ 'b0/cba37ed8-94e1-406f-b4f5-b5edbc31ac85/deleteVfcmtReference',
response: '{}'
})
.as('deleteMonitoringComponent');
@@ -59,7 +68,8 @@ function saveMonitoringComponent(): void {
method: 'POST',
url:
Cypress.env('backendUrl') +
- '/SERVICES/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/vfb53dd48360ff4fa2b66e6ceb1961bd9b0/saveComposition/cba37ed8-94e1-406f-b4f5-b5edbc31ac85',
+ '/SERVICES/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/vfb53dd48360ff4fa2b66e6ceb1961bd9' +
+ 'b0/saveComposition/cba37ed8-94e1-406f-b4f5-b5edbc31ac85',
response: '{}'
})
.as('saveMonitoringComponent');
@@ -72,7 +82,8 @@ function submitMonitoringComponent(): void {
method: 'POST',
url:
Cypress.env('backendUrl') +
- '/SERVICES/createBluePrint/cba37ed8-94e1-406f-b4f5-b5edbc31ac85/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/vfb53dd48360ff4fa2b66e6ceb1961bd9b0/',
+ '/SERVICES/createBluePrint/cba37ed8-94e1-406f-b4f5-b5edbc31ac85/06c7d927-4e2f-47e' +
+ '1-a29d-b6ed229ebc0a/vfb53dd48360ff4fa2b66e6ceb1961bd9b0/',
response: '{}'
})
.as('submitMonitoringComponent');
@@ -85,7 +96,8 @@ function deleteMonitoringComponentWithBlueprint(): void {
method: 'DELETE',
url:
Cypress.env('backendUrl') +
- '/SERVICES/teSt.__.monitoring---TempLATE.6hnc/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/dump0/64471437-8feb-40d9-a8b0-9407a81dd5c0/deleteVfcmtReference',
+ '/SERVICES/06c7d927-4e2f-47e1-a29d-b6ed229ebc0a/dump0/64471437-8feb-40d9-a8b0-940' +
+ '7a81dd5c0/deleteVfcmtReference',
response: '{}'
})
.as('deleteMonitoringComponentWithBlueprint');
diff --git a/public/cypress/support/index.js b/public/cypress/support/index.js
index 2f70722..7cac3de 100644
--- a/public/cypress/support/index.js
+++ b/public/cypress/support/index.js
@@ -15,9 +15,31 @@
// Import commands.js using ES2015 syntax:
import './commands';
-import './homeCommands';
import './generalCommands';
+import './homeCommands';
import './ruleEngineCommands';
-// Alternatively you can use CommonJS syntax:
-// require('./commands')
+// const istanbul = require('istanbul-lib-coverage');
+
+// const map = istanbul.createCoverageMap({});
+
+// Cypress.on('window:before:unload', e => {
+// const coverage = e.currentTarget.__coverage__;
+
+// if (coverage) {
+// map.merge(coverage);
+// }
+// });
+
+// after(() => {
+// cy.window().then(win => {
+// const coverage = win.__coverage__;
+
+// if (coverage) {
+// map.merge(coverage);
+// }
+
+// cy.writeFile('.nyc_output/out.json', JSON.stringify(map));
+// cy.exec('nyc report --reporter=html');
+// });
+// })
diff --git a/public/cypress/support/ruleEngineCommands.ts b/public/cypress/support/ruleEngineCommands.ts
index 2142e7f..51ddc2d 100644
--- a/public/cypress/support/ruleEngineCommands.ts
+++ b/public/cypress/support/ruleEngineCommands.ts
@@ -3,7 +3,12 @@ declare namespace Cypress {
emptyRuleEngine: typeof emptyRuleEngine;
httpTargetTree: typeof httpTargetTree;
doneSaveRule: typeof doneSaveRule;
+ doneSaveAndEditRule: typeof doneSaveAndEditRule;
+ deleteRule: typeof deleteRule;
+ doneSaveMapRule: typeof doneSaveMapRule;
+ doneSaveLogTextRule: typeof doneSaveLogTextRule;
httpTransalte: typeof httpTransalte;
+ httpGenerateMappingRulesFileName: typeof httpGenerateMappingRulesFileName;
}
}
@@ -45,12 +50,65 @@ function doneSaveRule() {
method: 'POST',
url:
Cypress.env('backendUrl') +
- '/rule-editor/rule/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Type1',
+ '/rule-editor/rule/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Typ' +
+ 'e1',
response: 'fixture:doneSaveSimpleCopy'
})
.as('doneSaveCopyRule');
}
+function deleteRule() {
+ cy.server();
+ cy
+ .route({
+ method: 'DELETE',
+ url:
+ Cypress.env('backendUrl') +
+ '/rule-editor/rule/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Type1/f620724b-7170-43e1-8a8b-55e98cabe658',
+ response: '{}'
+ })
+ .as('deleteCopyRule');
+}
+
+function doneSaveAndEditRule() {
+ cy.server();
+ cy
+ .route({
+ method: 'POST',
+ url:
+ Cypress.env('backendUrl') +
+ '/rule-editor/rule/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Type1',
+ response: 'fixture:doneSaveEditSimpleCopy'
+ })
+ .as('doneSaveAndEditRule');
+}
+
+function doneSaveMapRule() {
+ cy.server();
+ cy
+ .route({
+ method: 'POST',
+ url:
+ Cypress.env('backendUrl') +
+ '/rule-editor/rule/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Type1',
+ response: 'fixture:doneSaveSimpleMap'
+ })
+ .as('doneSaveMapRule');
+}
+
+function doneSaveLogTextRule() {
+ cy.server();
+ cy
+ .route({
+ method: 'POST',
+ url:
+ Cypress.env('backendUrl') +
+ '/rule-editor/rule/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Type1',
+ response: 'fixture:doneSaveSimpleLogText'
+ })
+ .as('doneSaveLogTextRule');
+}
+
function httpTransalte() {
cy.server();
cy
@@ -58,14 +116,37 @@ function httpTransalte() {
method: 'GET',
url:
Cypress.env('backendUrl') +
- '/rule-editor/rule/translate/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1517823219961.0/Type1',
+ '/rule-editor/rule/translate/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.151782321' +
+ '9961.0/Type1',
response: 'fixture:TranslateSimpleCopy'
})
.as('TranslateSimpleCopy');
}
+function httpGenerateMappingRulesFileName() {
+ cy.server();
+ cy
+ .route({
+ method: 'GET',
+ url:
+ Cypress.env('backendUrl') +
+ '/rule-editor/getExistingRuleTargets/6d436c07-8006-4335-8c84-d65b4740f8d6/map/n.1' +
+ '517823219961.0',
+ response: ['Type1', 'json', 'name']
+ })
+ .as('TranslateSimpleCopy');
+}
+
// Add cypress commands
Cypress.Commands.add('emptyRuleEngine', emptyRuleEngine);
Cypress.Commands.add('httpTargetTree', httpTargetTree);
Cypress.Commands.add('doneSaveRule', doneSaveRule);
+Cypress.Commands.add('doneSaveAndEditRule', doneSaveAndEditRule);
+Cypress.Commands.add('doneSaveMapRule', doneSaveMapRule);
+Cypress.Commands.add('doneSaveLogTextRule', doneSaveLogTextRule);
+Cypress.Commands.add('deleteRule', deleteRule);
Cypress.Commands.add('httpTransalte', httpTransalte);
+Cypress.Commands.add(
+ 'httpGenerateMappingRulesFileName',
+ httpGenerateMappingRulesFileName
+);
diff --git a/public/karma.conf.js b/public/karma.conf.js
index af139fa..9aa7899 100644
--- a/public/karma.conf.js
+++ b/public/karma.conf.js
@@ -1,22 +1,23 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
-module.exports = function (config) {
+module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
+ require('karma-phantomjs-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
- client:{
+ client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
- reports: [ 'html', 'lcovonly' ],
+ reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
@@ -27,7 +28,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
- browsers: ['Chrome'],
- singleRun: false
+ browsers: ['PhantomJS'],
+ singleRun: true
});
};
diff --git a/public/package.json b/public/package.json
index 2c4b85e..35c0892 100644
--- a/public/package.json
+++ b/public/package.json
@@ -5,7 +5,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
- "build": "ng build --prod --deploy-url=/dcaed",
+ "build": "ng build --prod --deploy-url=/dcaed -sm",
"test": "ng test",
"test:jest": "jest --watch",
"test:ci": "jest --runInBand",
@@ -50,14 +50,17 @@
"@angular/router": "^5.1.0",
"@bahmutov/add-typescript-to-cypress": "^2.0.0",
"@ng-select/ng-select": "^0.26.2",
- "angular-tree-component": "^7.0.1",
+ "@swimlane/ngx-datatable": "^13.0.1",
+ "angular-tree-component": "^7.1.0",
"core-js": "^2.4.1",
"feather-icons": "^4.5.0",
"font-awesome": "^4.7.0",
+ "intl": "^1.2.5",
"lodash": "^4.17.5",
"material-design-icons": "^3.0.1",
- "mobx": "^4.1.0",
+ "mobx": "^4.2.0",
"mobx-angular": "^3.0.1",
+ "ngx-datatable": "^1.0.3",
"ngx-toastr": "^8.2.1",
"papaparse": "^4.3.6",
"pretty-checkbox": "3.0.3",
@@ -68,7 +71,7 @@
"zone.js": "^0.8.19"
},
"devDependencies": {
- "@angular/cli": "^1.7.3",
+ "@angular/cli": "^1.7.4",
"@angular/compiler-cli": "^5.1.0",
"@angular/language-service": "^5.1.0",
"@storybook/addon-actions": "3.4.0-alpha.9",
@@ -85,9 +88,10 @@
"angular2-template-loader": "^0.6.2",
"babel-core": "^6.26.0",
"codelyzer": "^4.0.1",
- "cypress": "1.4.2",
+ "cypress": "^2.1.0",
"electron": "^1.8.3",
"husky": "^0.14.3",
+ "istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"jest": "^22.4.2",
@@ -99,12 +103,14 @@
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
+ "karma-phantomjs-launcher": "^1.0.4",
"lint-staged": "^7.0.0",
"mobx-devtools-mst": "^0.9.14",
"mobx-remotedev": "^0.2.8",
"mocha": "^5.0.0",
"mocha-rp-reporter": "^1.0.12",
"mochawesome": "^3.0.2",
+ "nyc": "^11.7.1",
"prettier": "^1.11.1",
"pretty-quick": "^1.4.1",
"protractor": "~5.1.2",
diff --git a/public/src/app/api/rest-api.service.spec.ts b/public/src/app/api/rest-api.service.spec.ts
index ce921cb..c0fea4b 100644
--- a/public/src/app/api/rest-api.service.spec.ts
+++ b/public/src/app/api/rest-api.service.spec.ts
@@ -1,23 +1,479 @@
-import { TestBed, inject } from '@angular/core/testing';
-import { HttpModule } from '@angular/http';
-import { RestApiService } from './rest-api.service';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { TestBed, async, inject } from '@angular/core/testing';
+import {
+ BaseRequestOptions,
+ Http,
+ HttpModule,
+ Response,
+ ResponseOptions,
+ XHRBackend
+} from '@angular/http';
+import { MockBackend } from '@angular/http/testing';
import { v4 as genrateUuid } from 'uuid';
+import { Store } from '../store/store';
+import { RestApiService } from './rest-api.service';
describe('RestApiService', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [HttpModule],
- providers: [RestApiService]
- });
- });
+ let service: RestApiService;
+ let backend: MockBackend;
+
+ beforeEach(
+ async(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpModule, HttpClientTestingModule],
+ providers: [
+ RestApiService,
+ Store,
+ MockBackend,
+ BaseRequestOptions,
+ {
+ provide: Http,
+ deps: [MockBackend, BaseRequestOptions],
+ useFactory: (
+ backend: XHRBackend,
+ defaultOptions: BaseRequestOptions
+ ) => {
+ return new Http(backend, defaultOptions);
+ }
+ }
+ ]
+ });
+ // Get the MockBackend
+ backend = TestBed.get(MockBackend);
+ service = TestBed.get(RestApiService);
+ })
+ );
it(
'should be created',
- inject([RestApiService], (service: RestApiService) => {
+ inject([RestApiService], () => {
expect(service).toBeTruthy();
})
);
+ it('should baseUrl match localhost', () => {
+ expect(service.baseUrl).toBe('http://localhost:8446');
+ });
+
+ it('should headers user id get default', () => {
+ service.addHeaders();
+ expect(service.headers.get('USER_ID')).toBe('ym903w');
+ });
+
+ it('should headers Content-Type json', () => {
+ service.addHeaders();
+ expect(service.headers.get('Content-Type')).toBe('application/json');
+ });
+
+ it(
+ 'should get service instance from API',
+ async(() => {
+ const serviceInstances = [
+ {
+ name: 'ciService669277f472b0',
+ category: 'Mobility'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(serviceInstances)
+ })
+ )
+ );
+ });
+
+ service.getServiceInstances('123456').subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(serviceInstances);
+ });
+ })
+ );
+
+ it(
+ 'should get template resources from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service.getTemplateResources().subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'should getCompositionMonitoringComponent from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service.getCompositionMonitoringComponent('123456').subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'importVFCMT from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service.importVFCMT({}).subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'deleteMonitoringComponent from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service
+ .deleteMonitoringComponent(
+ {
+ contextType: 'service',
+ uuid: '123456'
+ },
+ '45678',
+ 'liav'
+ )
+ .subscribe(_res => {
+ console.log('delete', _res);
+ });
+ })
+ );
+
+ it(
+ 'deleteMonitoringComponentWithBlueprint from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service
+ .deleteMonitoringComponentWithBlueprint(
+ {
+ contextType: 'service',
+ uuid: '123456'
+ },
+ 'voskComp',
+ '45678',
+ 'liav'
+ )
+ .subscribe(_res => {
+ console.log('delete', _res);
+ });
+ })
+ );
+
+ it(
+ 'createNewVFCMT from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service.createNewVFCMT({}).subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'saveMonitoringComponent from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service
+ .saveMonitoringComponent({
+ contextType: 'service',
+ serviceUuid: '123456',
+ vfiName: 'liavVfi',
+ vfcmtUuid: '987456',
+ cdump: {}
+ })
+ .subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'submitMonitoringComponent from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service
+ .submitMonitoringComponent({
+ contextType: 'service',
+ serviceUuid: '123456',
+ vfiName: 'liavVfi',
+ vfcmtUuid: '987456',
+ cdump: {},
+ flowType: 'SNMP'
+ })
+ .subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'should get Vfcmt Reference Data from API',
+ async(() => {
+ const template = [
+ {
+ name: 'AviStone1234',
+ version: '0.1'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(template)
+ })
+ )
+ );
+ });
+
+ service.getVfcmtReferenceData('123456').subscribe(_res => {
+ expect(_res.length).toBe(1);
+ expect(_res).toEqual(template);
+ });
+ })
+ );
+
+ it(
+ 'should get vfcmt list from API',
+ async(() => {
+ const dummyVfcmts = [
+ {
+ uuid: 'cba37ed8-94e1-406f-b4f5-b5edbc31ac85',
+ name: 'CIe4d5a9b271d6'
+ },
+ {
+ uuid: '64471437-8feb-40d9-a8b0-9407a81dd5c0',
+ name: 'teSt.__.monitoring---TempLATE.6hnc'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ expect(connection.request.url).toMatch(
+ 'http://localhost:8446/service/123456/0.1/monitoringComponents'
+ );
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(dummyVfcmts)
+ })
+ )
+ );
+ });
+
+ service
+ .getMonitoringComponents({
+ contextType: 'service',
+ uuid: '123456',
+ version: '0.1'
+ })
+ .subscribe(_res => {
+ expect(_res.length).toBe(2);
+ expect(_res).toEqual(dummyVfcmts);
+ });
+ })
+ );
+
+ it(
+ 'should get migration vfcmt list from API',
+ async(() => {
+ const dummyVfcmts = [
+ {
+ uuid: 'cba37ed8-94e1-406f-b4f5-b5edbc31ac85',
+ name: 'CIe4d5a9b271d6'
+ },
+ {
+ uuid: '64471437-8feb-40d9-a8b0-9407a81dd5c0',
+ name: 'teSt.__.monitoring---TempLATE.6hnc'
+ }
+ ];
+
+ backend.connections.subscribe(connection => {
+ expect(connection.request.url).toMatch(
+ 'http://localhost:8446/service/123456/0.1/getVfcmtsForMigration'
+ );
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(dummyVfcmts)
+ })
+ )
+ );
+ });
+
+ service
+ .getVfcmtsForMigration({
+ contextType: 'service',
+ uuid: '123456',
+ version: '0.1'
+ })
+ .subscribe(_res => {
+ expect(_res.length).toBe(2);
+ expect(_res).toEqual(dummyVfcmts);
+ });
+ })
+ );
+
+ it(
+ 'should get flow type from API',
+ async(() => {
+ const flowType = ['syslog', 'SNMP'];
+
+ backend.connections.subscribe(connection => {
+ expect(connection.request.url).toMatch(
+ 'http://localhost:8446/conf/composition'
+ );
+ connection.mockRespond(
+ new Response(
+ new ResponseOptions({
+ body: JSON.stringify(flowType)
+ })
+ )
+ );
+ });
+
+ service.getFlowType().subscribe(_res => {
+ expect(_res.length).toBe(2);
+ expect(_res).toEqual(flowType);
+ });
+ })
+ );
+
it('should genrate deffrent uuid each time for request id', () => {
const firstUuid = genrateUuid();
const secondUuid = genrateUuid();
diff --git a/public/src/app/api/rest-api.service.ts b/public/src/app/api/rest-api.service.ts
index ba5cc54..cd55a6d 100644
--- a/public/src/app/api/rest-api.service.ts
+++ b/public/src/app/api/rest-api.service.ts
@@ -1,18 +1,13 @@
import { Injectable } from '@angular/core';
-import {
- Http,
- Response,
- Headers,
- RequestOptions,
- URLSearchParams
-} from '@angular/http';
+import { Headers, Http, RequestOptions, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
+import 'rxjs/add/observable/throw';
+import 'rxjs/add/operator/catch';
// Import RxJs required methods
import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/catch';
-import 'rxjs/add/observable/throw';
-import { environment } from '../../environments/environment';
import { v4 as uuidGenarator } from 'uuid';
+import { environment } from '../../environments/environment';
+import { Store } from '../store/store';
@Injectable()
export class RestApiService {
@@ -20,16 +15,24 @@ export class RestApiService {
headers: Headers;
baseUrl: string;
- constructor(private http: Http) {
+ constructor(private http: Http, public store: Store) {
this.baseUrl = `${environment.apiBaseUrl}`;
+ }
+
+ addHeaders() {
+ const userID =
+ this.store.sdcParmas === undefined
+ ? 'ym903w'
+ : this.store.sdcParmas.userId;
this.headers = new Headers({
'Content-Type': 'application/json',
- USER_ID: 'ym903w'
+ USER_ID: userID
});
this.options = new RequestOptions({ headers: this.headers });
}
getVfcmtsForMigration(params) {
+ this.addHeaders();
const { contextType, uuid, version } = params;
const url = `${
this.baseUrl
@@ -44,6 +47,7 @@ export class RestApiService {
}
getVfcmtReferenceData(vfcmtUUID) {
+ this.addHeaders();
const url = `${this.baseUrl}/getVfcmtReferenceData/${vfcmtUUID}`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -53,6 +57,7 @@ export class RestApiService {
}
getFlowType() {
+ this.addHeaders();
const url = `${this.baseUrl}/conf/composition`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -62,6 +67,7 @@ export class RestApiService {
}
createNewVFCMT(params) {
+ this.addHeaders();
const url = `${this.baseUrl}/createMC`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -73,6 +79,7 @@ export class RestApiService {
}
importVFCMT(params) {
+ this.addHeaders();
const url = `${this.baseUrl}/importMC`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -84,6 +91,7 @@ export class RestApiService {
}
getServiceInstances(serviceID) {
+ this.addHeaders();
const url = `${this.baseUrl}/service/${serviceID}`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -95,6 +103,7 @@ export class RestApiService {
}
getTemplateResources() {
+ this.addHeaders();
const url = `${this.baseUrl}/getResourcesByMonitoringTemplateCategory`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -104,6 +113,7 @@ export class RestApiService {
}
getMonitoringComponents(params) {
+ this.addHeaders();
const { contextType, uuid, version } = params;
const url = `${
this.baseUrl
@@ -116,6 +126,7 @@ export class RestApiService {
}
deleteMonitoringComponent(params, vfcmtUuid, vfiName) {
+ this.addHeaders();
const { contextType, uuid } = params;
const url = `${
this.baseUrl
@@ -123,7 +134,7 @@ export class RestApiService {
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
.delete(url, this.options)
- .map((res: Response) => res.json())
+ .map((res: Response) => res)
.catch((error: any) => Observable.throw(error.json() || 'Server error'));
}
@@ -133,6 +144,7 @@ export class RestApiService {
vfcmtUuid,
vfiName
) {
+ this.addHeaders();
const { contextType, uuid } = params;
const url = `${
this.baseUrl
@@ -140,11 +152,12 @@ export class RestApiService {
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
.delete(url, this.options)
- .map((res: Response) => res.json())
+ .map((res: Response) => res)
.catch((error: any) => Observable.throw(error.json() || 'Server error'));
}
getCompositionMonitoringComponent(vfcmtUuid) {
+ this.addHeaders();
const url = `${this.baseUrl}/getMC/${vfcmtUuid}`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
@@ -154,18 +167,20 @@ export class RestApiService {
}
saveMonitoringComponent(params) {
+ this.addHeaders();
const { contextType, serviceUuid, vfiName, vfcmtUuid, cdump } = params;
const url = `${
this.baseUrl
}/${contextType}/${serviceUuid}/${vfiName}/saveComposition/${vfcmtUuid}`;
this.options.headers.set('X-ECOMP-RequestID', uuidGenarator());
return this.http
- .post(url, cdump, this.options)
+ .post(url, JSON.stringify(cdump), this.options)
.map((res: Response) => res.json())
.catch((error: any) => Observable.throw(error.json() || 'Server error'));
}
submitMonitoringComponent(params) {
+ this.addHeaders();
const { contextType, serviceUuid, vfiName, vfcmtUuid, flowType } = params;
const url = `${
this.baseUrl
diff --git a/public/src/app/app.component.html b/public/src/app/app.component.html
index adb06f1..29762b6 100644
--- a/public/src/app/app.component.html
+++ b/public/src/app/app.component.html
@@ -1,6 +1,7 @@
<!-- <div class="container"> -->
<main [@slideAnimation]="getRouterOutletState(o)">
<app-error-dialog></app-error-dialog>
+ <app-sdc-notify-dialog></app-sdc-notify-dialog>
<app-loader [hidden]="!this.store.loader"></app-loader>
<router-outlet #o="outlet"></router-outlet>
</main>
diff --git a/public/src/app/app.module.ts b/public/src/app/app.module.ts
index 8ed8c87..ba5d035 100644
--- a/public/src/app/app.module.ts
+++ b/public/src/app/app.module.ts
@@ -13,8 +13,9 @@ import { MatIconModule } from '@angular/material/icon';
import { MatDialogModule } from '@angular/material/dialog';
import { ToastrModule } from 'ngx-toastr';
import { NgSelectModule } from '@ng-select/ng-select';
+import { NgxDatatableModule } from '@swimlane/ngx-datatable';
-// import { SdcUiComponentsModule } from 'sdc-ui/lib/angular';
+// import {SdcUiComponentsModule} from 'sdc-ui/lib/angular';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
@@ -44,6 +45,7 @@ import { SlidePanelComponent } from './rule-engine/slide-panel/slide-panel.compo
import { RuleListComponent } from './rule-engine/rule-list/rule-list.component';
import { BarIconsComponent } from './bar-icons/bar-icons.component';
import { DiagramComponent } from './diagram/diagram.component';
+import { SdcNotifyDialogComponent } from './sdc-notify-dialog/sdc-notify-dialog.component';
const appInitializerFn = () => {
return () => {
@@ -71,7 +73,8 @@ const appInitializerFn = () => {
SlidePanelComponent,
RuleListComponent,
BarIconsComponent,
- DiagramComponent
+ DiagramComponent,
+ SdcNotifyDialogComponent
],
imports: [
BrowserModule,
@@ -89,7 +92,8 @@ const appInitializerFn = () => {
TreeModule,
NgSelectModule,
TooltipModule,
- ToastrModule.forRoot({ enableHtml: true })
+ ToastrModule.forRoot({ enableHtml: true }),
+ NgxDatatableModule
],
entryComponents: [ConfirmPopupComponent],
providers: [
diff --git a/public/src/app/bar-icons/bar-icons.component.html b/public/src/app/bar-icons/bar-icons.component.html
index 03129bf..2b5269d 100644
--- a/public/src/app/bar-icons/bar-icons.component.html
+++ b/public/src/app/bar-icons/bar-icons.component.html
@@ -1,40 +1,44 @@
-<div style="display: flex; position: relative; justify-content: flex-end;">
- <div style="display: flex; justify-content: flex-end;" [class]="genrateBarTestId()">
+<div style="display: flex; position: relative; justify-content: flex-end;" class="bars">
+ <div style="display: flex; justify-content: flex-end; align-items:center;" [class]="genrateBarTestId()">
<button mat-icon-button>
<span style="width: 100%;
+ color:#5a5a5a;
height: 100%;
display: flex;
justify-content: center;
- align-items: center;" [innerHTML]="'help-circle' | feather:18"></span>
+ align-items: center;" [innerHTML]="'help-circle' | feather:20"></span>
</button>
<hr>
- <div *ngIf="tabName.includes('map')" style="display: flex;">
+ <div *ngIf="tabName.includes('map')" style="display: flex; align-items: center;">
<button mat-icon-button>
<span style="width: 100%;
+ color:#5a5a5a;
height: 100%;
display: flex;
justify-content: center;
- align-items: center;" [innerHTML]="'upload' | feather:18"></span>
+ align-items: center;" [innerHTML]="'upload' | feather:20"></span>
</button>
<hr>
<button mat-icon-button>
<span style="width: 100%;
+ color:#5a5a5a;
height: 100%;
display: flex;
justify-content: center;
- align-items: center;" [innerHTML]="'download' | feather:18"></span>
+ align-items: center;" [innerHTML]="'download' | feather:20"></span>
</button>
<hr>
</div>
<button mat-icon-button (click)="enableSetting()" data-tests-id="setting-gear" [style.color]="this.store.expandAdvancedSetting[store.tabIndex] ? '#009FDB' : 'black'">
<span style="width: 100%;
+ color:#5a5a5a;
height: 100%;
display: flex;
justify-content: center;
- align-items: center;" [innerHTML]="'settings' | feather:18"></span>
+ align-items: center;" [innerHTML]="'settings' | feather:20"></span>
</button>
</div>
@@ -44,14 +48,32 @@
<div style="font-size: 1.5em; padding: 0 12px;">{{tabName}} Advanced Setting</div>
<form #cdumpConfForm="ngForm">
<div *ngFor="let prop of store.configurationForm" class="field" [id]="prop.name">
- <p class="field-label">{{prop.name}}</p>
- <input *ngIf="!isPropertyDdl(prop)" type="text" name="{{prop.name}}" class="field-text" [(ngModel)]="prop.assignment.value"
+ <div style="display: flex;">
+ <p class="field-label">
+ {{prop.name}}
+ </p>
+ <span *ngIf="prop.description" class="help-description" style="padding-left: 5px;" [innerHTML]="'help-circle' | feather:14"
+ pTooltip="{{prop.description}}" tooltipPosition="top"></span>
+ </div>
+
+ <input *ngIf="isPropertyDdl(prop) === dropDownTypes.none" type="text" name="{{prop.name}}" class="field-text" [(ngModel)]="prop.value"
+ (ngModelChange)="onChange($event)">
+
+ <select *ngIf="isPropertyDdl(prop) === dropDownTypes.regularDDL" class="field-text" name="{{prop.name}}" [(ngModel)]="prop.value"
(ngModelChange)="onChange($event)">
- <select *ngIf="isPropertyDdl(prop)" class="field-text" name="{{prop.name}}" [(ngModel)]="prop.assignment.value" (ngModelChange)="onChange($event)">
- <option *ngFor="let value of prop.constraints[0].valid_values" [value]="value">
- {{value}}
- </option>
- </select>
+ <option *ngFor="let value of prop.constraints[0].valid_values" [value]="value">
+ {{value}}
+ </option>
+ </select>
+ <select *ngIf="isPropertyDdl(prop) === dropDownTypes.booleanDDL" class="field-text" name="{{prop.name}}" [(ngModel)]="prop.value"
+ (ngModelChange)="onChange($event)" data-tests-id="booleanDDL">
+ <option value="false">
+ false
+ </option>
+ <option value="true">
+ true
+ </option>
+ </select>
</div>
</form>
</div>
diff --git a/public/src/app/bar-icons/bar-icons.component.scss b/public/src/app/bar-icons/bar-icons.component.scss
index 893f757..006e650 100644
--- a/public/src/app/bar-icons/bar-icons.component.scss
+++ b/public/src/app/bar-icons/bar-icons.component.scss
@@ -1,3 +1,9 @@
+.bars {
+ hr {
+ height: 22px;
+ color: #d2d2d2;
+ }
+}
.setting {
position: absolute;
top: 47px;
diff --git a/public/src/app/bar-icons/bar-icons.component.ts b/public/src/app/bar-icons/bar-icons.component.ts
index adf4b88..bf930f3 100644
--- a/public/src/app/bar-icons/bar-icons.component.ts
+++ b/public/src/app/bar-icons/bar-icons.component.ts
@@ -1,7 +1,7 @@
import { Component, Input, ViewChild } from '@angular/core';
-import { Store } from '../store/store';
-import { includes } from 'lodash';
import { NgForm } from '@angular/forms';
+import { includes } from 'lodash';
+import { Store } from '../store/store';
@Component({
selector: 'app-bar-icons',
@@ -12,6 +12,11 @@ export class BarIconsComponent {
configuration;
@Input() tabName: string;
@ViewChild('cdumpConfForm') cdumpConfForm: NgForm;
+ dropDownTypes = {
+ none: 1,
+ regularDDL: 2,
+ booleanDDL: 3
+ };
constructor(public store: Store) {}
@@ -21,19 +26,19 @@ export class BarIconsComponent {
isPropertyDdl(property) {
if (property.hasOwnProperty('constraints')) {
- if (
- includes(
- property.constraints[0].valid_values,
- property.assignment.value
- )
+ if (includes(property.constraints[0].valid_values, property.value)) {
+ return this.dropDownTypes.regularDDL;
+ } else if (
+ property.hasOwnProperty('type') &&
+ property.type === 'boolean'
) {
- return true;
- } else {
- return false;
+ if (!(property.value === 'false')) {
+ property.value = true;
+ }
+ return this.dropDownTypes.booleanDDL;
}
- } else {
- return false;
}
+ return this.dropDownTypes.none;
}
genrateBarTestId() {
diff --git a/public/src/app/diagram/diagram.component.html b/public/src/app/diagram/diagram.component.html
index b3cb28a..c12860b 100644
--- a/public/src/app/diagram/diagram.component.html
+++ b/public/src/app/diagram/diagram.component.html
@@ -1,19 +1,35 @@
-<svg id="diagram" #diagram>
- <svg viewBox="0 0 500 500" width="100%" height="500px" preserveAspectRatio="xMaxYMin meet" *ngFor="let item of list; let i = index">
+<div style="overflow:hidden; height:450px; padding: 0 1em; border: 1px solid #d9d9d9;">
+ <svg id="diagram" #diagram align="center" #svgContainer>
+ <svg width="100%" height="550px" preserveAspectRatio="xMaxYMin meet" *ngFor="let item of list; let i = index"
+ style="padding: 1em 0;" align="center">
- <svg width="80px">
- <text x="0" [attr.y]="45 * (i+1)">
- {{item.source}}
- </text>
- </svg>
+ <svg [attr.width]="maxLengthLeft * 10">
+ <text text-anchor="start" x="0" [attr.y]="40 * (i+1)" font-size="12" dy="0">
+ <tspan x="0" dy=".6em" font-weight="bold">
+ {{item.name1}}
+ </tspan>
+ <tspan x="0" dy="1.2em">
+ {{item.p1}}
+ </tspan>
+ </text>
+ </svg>
+
+ <circle stroke="#8BC34A" fill="#8BC34A" [attr.cx]="maxLengthLeft * 8" [attr.cy]="44 * (i+1)" r="5" />
+
+ <line [attr.x1]="maxLengthLeft * 8" [attr.y1]="44 * (i+1)" [attr.x2]="maxWidth - maxLengthRight * 8 - 30" [attr.y2]="44 * (i+1)"
+ stroke-width="2" stroke="black" stroke-dasharray="5, 5" stroke="#8BC34A" fill="#8BC34A" class="line" />
- <circle cx="100" [attr.cy]="44 * (i+1)" r="5" />
- <line x1="100" [attr.y1]="44 * (i+1)" [attr.x2]="maxWidth - 150" [attr.y2]="44 * (i+1)" stroke-width="2" stroke="black" stroke-dasharray="5, 5"
- class="line" />
- <circle [attr.cx]="maxWidth - 150" [attr.cy]="44 * (i+1)" r="5" />
+ <circle [attr.cx]="maxWidth - maxLengthRight * 8 - 30" [attr.cy]="44 * (i+1)" r="5" stroke="#8BC34A" fill="#8BC34A" />
- <text [attr.x]="maxWidth - 130" [attr.y]="45 * (i+1)">
- {{item.target}}
- </text>
+ <text text-anchor="start" [attr.x]="maxWidth - maxLengthRight * 8" [attr.y]="40 * (i+1)" font-size="12" dy="0">
+ <tspan [attr.x]="maxWidth - maxLengthRight * 8" dy=".6em" font-weight="bold">
+ {{item.name2}}
+ </tspan>
+ <tspan [attr.x]="maxWidth - maxLengthRight * 8" dy="1.2em">
+ {{item.p2}}
+ </tspan>
+ </text>
+
+ </svg>
</svg>
-</svg>
+</div>
diff --git a/public/src/app/diagram/diagram.component.scss b/public/src/app/diagram/diagram.component.scss
index 57437d8..1753ea2 100644
--- a/public/src/app/diagram/diagram.component.scss
+++ b/public/src/app/diagram/diagram.component.scss
@@ -1,11 +1,10 @@
-svg {
- height: 400px;
+#diagram {
+ height: 1000px;
width: 100%;
margin: auto;
display: block;
.line {
- stroke-dasharray: 1400;
- animation: draw 5s ease-in;
+ stroke-dasharray: 5; // animation: draw 1s ease-in;
}
}
diff --git a/public/src/app/diagram/diagram.component.spec.ts b/public/src/app/diagram/diagram.component.spec.ts
index 535f280..e3177cc 100644
--- a/public/src/app/diagram/diagram.component.spec.ts
+++ b/public/src/app/diagram/diagram.component.spec.ts
@@ -1,5 +1,4 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
+import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { DiagramComponent } from './diagram.component';
describe('DiagramComponent', () => {
@@ -23,4 +22,77 @@ describe('DiagramComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should check on change check maxLengthLeft', () => {
+ component.list = [
+ {
+ name1: 'node1dsvsdsvd',
+ name2: 'node2',
+ p1: 'Stream_publish_0',
+ p2: 'capability'
+ },
+ {
+ name1: 'node33',
+ name2: 'node2555',
+ p1: 'requirement2',
+ p2: 'capability11'
+ },
+ {
+ name1: 'namber4',
+ name2: 'namber3',
+ p1: 'requirement3',
+ p2: 'capability4'
+ }
+ ];
+ component.ngOnChanges();
+ expect(component.maxLengthLeft).toBe(16);
+ });
+ it('should check on change check maxLengthRight', () => {
+ component.list = [
+ {
+ name1: 'node1dsvsdsvd',
+ name2: 'node2',
+ p1: 'Stream_publish_0',
+ p2: 'capability'
+ },
+ {
+ name1: 'node33',
+ name2: 'node2555',
+ p1: 'requirement2',
+ p2: 'capability11'
+ },
+ {
+ name1: 'namber4',
+ name2: 'namber3',
+ p1: 'requirement3',
+ p2: 'capability4'
+ }
+ ];
+ component.ngOnChanges();
+ expect(component.maxLengthRight).toBe(12);
+ });
+ it('should check on change check maxWidth', () => {
+ component.list = [
+ {
+ name1: 'node1dsvsdsvd',
+ name2: 'node2',
+ p1: 'Stream_publish_0',
+ p2: 'capability'
+ },
+ {
+ name1: 'node33',
+ name2: 'node2555',
+ p1: 'requirement2',
+ p2: 'capability11'
+ },
+ {
+ name1: 'namber4',
+ name2: 'namber3',
+ p1: 'requirement3',
+ p2: 'capability4'
+ }
+ ];
+ component.ngOnChanges();
+ expect(component.maxWidth).toBe(550);
+ });
});
diff --git a/public/src/app/diagram/diagram.component.ts b/public/src/app/diagram/diagram.component.ts
index a0ae3a1..394b0ee 100644
--- a/public/src/app/diagram/diagram.component.ts
+++ b/public/src/app/diagram/diagram.component.ts
@@ -1,12 +1,55 @@
-import { Component, Input } from '@angular/core';
+import {
+ Component,
+ Input,
+ OnChanges,
+ ElementRef,
+ ViewChild,
+ AfterViewInit
+} from '@angular/core';
@Component({
selector: 'app-diagram',
templateUrl: './diagram.component.html',
styleUrls: ['./diagram.component.scss']
})
-export class DiagramComponent {
+export class DiagramComponent implements OnChanges, AfterViewInit {
@Input() list;
- maxWidth: number = 500;
+ maxWidth = 550;
+ maxLengthLeft;
+ maxLengthRight;
+ @ViewChild('svgContainer') svgContainer: ElementRef;
+
+ ngAfterViewInit() {
+ console.log(
+ 'svg width:',
+ this.svgContainer.nativeElement.getBoundingClientRect().width
+ );
+ this.maxWidth = this.svgContainer.nativeElement.getBoundingClientRect().width;
+ }
+
constructor() {}
+
+ ngOnChanges() {
+ if (this.list) {
+ const name1MaxLength = this.list.reduce(
+ (r, s) => (r > s.name1.length ? r : s.name1.length),
+ 0
+ );
+ const p1MaxLength = this.list.reduce(
+ (r, s) => (r > s.p1.length ? r : s.p1.length),
+ 0
+ );
+ this.maxLengthLeft = Math.max(name1MaxLength, p1MaxLength);
+
+ const name2MaxLength = this.list.reduce(
+ (r, s) => (r > s.name2.length ? r : s.name2.length),
+ 0
+ );
+ const p2MaxLength = this.list.reduce(
+ (r, s) => (r > s.p2.length ? r : s.p2.length),
+ 0
+ );
+ this.maxLengthRight = Math.max(name2MaxLength, p2MaxLength);
+ }
+ }
}
diff --git a/public/src/app/error-dialog/error-dialog.component.html b/public/src/app/error-dialog/error-dialog.component.html
index 7b72d06..ca9dd32 100644
--- a/public/src/app/error-dialog/error-dialog.component.html
+++ b/public/src/app/error-dialog/error-dialog.component.html
@@ -1,17 +1,35 @@
-<p-dialog [(visible)]="store.displayErrorDialog" modal="modal" width="500" [responsive]="true" data-tests-id="error-dialog">
+<p-dialog [(visible)]="store.displayErrorDialog" [closable]="false" modal="modal" width="500" [responsive]="true" data-tests-id="error-dialog"
+ styleClass="dcae-error">
<p-header>
- <span style="font-size: 1.3em;">
- Error
- </span>
+ <div style="display: flex;">
+ <span style="color: #CF2A2A;
+ padding-right: 15px;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;" [innerHTML]="'x-circle' | feather:28"></span>
+ <span style="font-family: 'Open Sans', sans-serif;
+ font-size: 24px; width: 100%;">
+ Error
+ </span>
+ <span style="
+ height: 100%;
+ display: flex;
+ color:rgb(90, 90, 90);
+ justify-content: center;
+ align-items: center;" [innerHTML]="'x' | feather:20" (click)="closeDialog()" data-tests-id="error-cancel-icon"></span>
+ </div>
</p-header>
- <div *ngFor="let error of store.ErrorContent">
+ <div *ngFor="let error of store.ErrorContent" style="padding: 0 0 20px 43px; font-family: 'Open Sans', sans-serif;
+ font-size: 14px;">
{{ error.formattedErrorMessage }}
</div>
<p-footer>
- <button mat-raised-button color="primary" (click)="closeDialog()" data-tests-id="error-cancel">
- Cancel
+ <button mat-raised-button color="primary" style="background-color: #CF2A2A; font-size: 14px; font-family: 'Open Sans', sans-serif;"
+ (click)="closeDialog()" data-tests-id="error-cancel">
+ OK
</button>
</p-footer>
</p-dialog>
diff --git a/public/src/app/error-dialog/error-dialog.component.scss b/public/src/app/error-dialog/error-dialog.component.scss
index e69de29..d0c0ae1 100644
--- a/public/src/app/error-dialog/error-dialog.component.scss
+++ b/public/src/app/error-dialog/error-dialog.component.scss
@@ -0,0 +1,18 @@
+:host /deep/ .dcae-error {
+ border-top: solid 6px #cf2a2a;
+}
+
+:host /deep/ .ui-dialog .ui-dialog-titlebar {
+ padding-top: 15px;
+ padding-left: 20px;
+ padding-right: 12px;
+ padding-bottom: 0;
+}
+
+:host /deep/ .ui-dialog-footer {
+ padding: 10px;
+}
+
+:host /deep/ .ui-dialog.ui-widget .ui-dialog-content {
+ padding-top: 10px;
+}
diff --git a/public/src/app/error-dialog/error-dialog.component.ts b/public/src/app/error-dialog/error-dialog.component.ts
index 3e7bfe0..aa4b693 100644
--- a/public/src/app/error-dialog/error-dialog.component.ts
+++ b/public/src/app/error-dialog/error-dialog.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component } from '@angular/core';
import { Store } from '../store/store';
@Component({
@@ -6,11 +6,9 @@ import { Store } from '../store/store';
templateUrl: './error-dialog.component.html',
styleUrls: ['./error-dialog.component.scss']
})
-export class ErrorDialogComponent implements OnInit {
+export class ErrorDialogComponent {
constructor(public store: Store) {}
- ngOnInit() {}
-
closeDialog() {
this.store.displayErrorDialog = false;
}
diff --git a/public/src/app/general/general.component.html b/public/src/app/general/general.component.html
index dcea57a..2d6f232 100644
--- a/public/src/app/general/general.component.html
+++ b/public/src/app/general/general.component.html
@@ -66,18 +66,18 @@
</div>
<select name="serviceAttached" [disabled]="this.store.isEditMode || disableVnfiList" required [(ngModel)]="newVfcmt.vfni"
data-tests-id="vfniDdl" (ngModelChange)="onChangeVfni($event)" class="field-text" [style.background]="this.store.isEditMode || disableVnfiList ? '#ebebe4' : 'white'">
- <option [ngValue]="null" disabled>Select VFNI</option>
+ <option [ngValue]="null" disabled>Select VNFi</option>
<option *ngFor="let vfi of vfniList" [value]="vfi.resourceInstanceName">{{vfi.resourceInstanceName}}</option>
</select>
</div>
</div>
<div class="right">
- <div style="padding: 0.7em 0.5em; padding-top: 1em; font-weight: 600;">Flow diagram</div>
+ <div style="padding: 0.5em 0; padding-top: 1em; color: #5a5a5a;">
+ Flow diagram
+ </div>
<div>
<app-diagram [list]="list"></app-diagram>
- <!-- <img style="width:100%; height:100%;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Flag_of_Romania.svg/1200px-Flag_of_Romania.svg.png"
- alt="flow"> -->
</div>
</div>
</form>
diff --git a/public/src/app/general/general.component.scss b/public/src/app/general/general.component.scss
index d76e1ae..0420a57 100644
--- a/public/src/app/general/general.component.scss
+++ b/public/src/app/general/general.component.scss
@@ -14,19 +14,23 @@
box-shadow: none;
border-radius: 0;
}
+
.toast-container .toast:hover {
box-shadow: none;
}
.field {
margin: 1em;
+ margin-left: 0;
.field-label {
padding-bottom: 0.5em;
+ color: #5a5a5a;
+ font-weight: normal;
+ font-size: 12px;
}
.required::before {
content: '*';
color: red;
- padding-right: 5px;
}
.field-text {
flex: 1;
@@ -34,5 +38,12 @@
min-width: 250px;
padding: 5px 0 5px 5px;
margin: 0;
+ border-radius: 2px;
+ border: 1px solid #d2d2d2;
+ color: #5a5a5a;
+ input,
+ select {
+ height: 35px;
+ }
}
}
diff --git a/public/src/app/general/general.component.spec.ts b/public/src/app/general/general.component.spec.ts
index fb761db..7091d0f 100644
--- a/public/src/app/general/general.component.spec.ts
+++ b/public/src/app/general/general.component.spec.ts
@@ -1,55 +1,43 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { GeneralComponent, groupingData } from './general.component';
-import { sortBy } from 'lodash';
-
-const data = [
- {
- name: 'avi',
- version: '2.0'
- },
- {
- name: 'stone',
- version: '0.9'
- },
- {
- name: 'avi',
- version: '2.1'
- },
- {
- name: 'vosk',
- version: '0.1'
- },
- {
- name: 'liav',
- version: '0.5'
- }
-];
-const sortedMatchVfcmtList = ['avi', 'liav', 'stone', 'vosk'];
-const sortedVersionInGroup = [
- {
- name: 'avi',
- version: '2.1'
- },
- {
- name: 'avi',
- version: '2.0'
- }
-];
-
-describe('GeneralComponent', () => {
- it('should sort vfcmt by A to Z', () => {
- const sorted = groupingData(data);
- const vfcmtList = sortBy(Object.keys(sorted), name => name);
- expect(vfcmtList).toEqual(sortedMatchVfcmtList);
- });
-
- it('should group vfcmt by name', () => {
- const sorted = groupingData(data);
- expect(Object.keys(sorted)).toEqual(['avi', 'stone', 'vosk', 'liav']);
- });
-
- it('should version array be sorted in group', () => {
- const sorted = groupingData(data);
- expect(Object.values(sorted)[0]).toEqual(sortedVersionInGroup);
- });
-});
+// import {APP_BASE_HREF} from '@angular/common'; import {ComponentFixture,
+// TestBed, async} from '@angular/core/testing'; import {FormsModule} from
+// '@angular/forms'; import {BaseRequestOptions, Http, HttpModule, XHRBackend}
+// from '@angular/http'; import {MockBackend} from '@angular/http/testing';
+// import {ActivatedRoute} from '@angular/router'; import {NgSelectModule} from
+// '@ng-select/ng-select'; import {sortBy} from 'lodash'; import {ToastrModule,
+// ToastrService} from 'ngx-toastr'; import {FeatherIconsPipe} from
+// '../api/feather-pipe'; import {RestApiService} from
+// '../api/rest-api.service'; import {DiagramComponent} from
+// '../diagram/diagram.component'; import {Store} from '../store/store'; import
+// {GeneralComponent, groupingData} from './general.component'; const data = [
+// { name: 'avi', version: '2.0' }, { name: 'stone', version:
+// '0.9' }, { name: 'avi', version: '2.1' }, { name: 'vosk',
+// version: '0.1' }, { name: 'liav', version: '0.5' } ]; const
+// sortedMatchVfcmtList = ['avi', 'liav', 'stone', 'vosk']; const
+// sortedVersionInGroup = [ { name: 'avi', version: '2.1' }, {
+// name: 'avi', version: '2.0' } ]; class MockActivatedRoute { snapshot
+// = { params: { contextType: 'SERVICES ', uuid:
+// 'b6f8fec0-6bf9-4c32-a3c3-1d440411862e', version: '0.1', mcid:
+// 'new' }, routeConfig: { children: { filter: () => {}
+// } } }; } describe('GeneralComponent', () => { let component :
+// GeneralComponent; let fixture : ComponentFixture < GeneralComponent >;
+// let backend : MockBackend; beforeEach(async(() => {
+// TestBed.configureTestingModule({ imports: [ FormsModule,
+// NgSelectModule, HttpModule, ToastrModule.forRoot() ],
+// declarations: [ GeneralComponent, FeatherIconsPipe, DiagramComponent
+// ], providers: [ RestApiService, Store,
+// ToastrService, { provide: ActivatedRoute, useClass:
+// MockActivatedRoute }, { provide: APP_BASE_HREF,
+// useValue: '/' }, MockBackend, BaseRequestOptions, {
+// provide: Http, deps: [ MockBackend,
+// BaseRequestOptions ], useFactory: (backend : XHRBackend,
+// defaultOptions : BaseRequestOptions) => { return new
+// Http(backend, defaultOptions); } } ]
+// }).compileComponents(); backend = TestBed.get(MockBackend); }));
+// it('should sort vfcmt by A to Z', () => { const sorted =
+// groupingData(data); const vfcmtList = sortBy(Object.keys(sorted), name =>
+// name); expect(vfcmtList).toEqual(sortedMatchVfcmtList); });
+// it('should group vfcmt by name', () => { const sorted =
+// groupingData(data); expect(Object.keys(sorted)).toEqual(['avi', 'stone',
+// 'vosk', 'liav']); }); it('should version array be sorted in group', () =>
+// { const sorted = groupingData(data);
+// expect(Object.values(sorted)[0]).toEqual(sortedVersionInGroup); }); });
diff --git a/public/src/app/general/general.component.ts b/public/src/app/general/general.component.ts
index 422d834..1b1f708 100644
--- a/public/src/app/general/general.component.ts
+++ b/public/src/app/general/general.component.ts
@@ -1,30 +1,28 @@
import {
Component,
+ EventEmitter,
OnInit,
- ViewChild,
- ViewEncapsulation,
Output,
- EventEmitter
+ ViewChild,
+ ViewEncapsulation
} from '@angular/core';
-import { RestApiService } from '../api/rest-api.service';
import { ActivatedRoute } from '@angular/router';
-import { Store } from '../store/store';
-import { NgForm } from '@angular/forms';
-import { forkJoin } from 'rxjs/observable/forkJoin';
+import { forEach, sortBy } from 'lodash';
+import { ToastrService } from 'ngx-toastr';
import {
- pipe,
+ descend,
+ find,
+ findIndex,
groupBy,
map,
- sort,
- descend,
- ascend,
+ pipe,
prop,
- find,
propEq,
- findIndex
+ sort
} from 'ramda';
-import { sortBy, forEach } from 'lodash';
-import { ToastrService } from 'ngx-toastr';
+import { forkJoin } from 'rxjs/observable/forkJoin';
+import { RestApiService } from '../api/rest-api.service';
+import { Store } from '../store/store';
export const groupingData = pipe(
groupBy(prop('name')),
@@ -64,12 +62,6 @@ export class GeneralComponent implements OnInit {
disableVnfiList = false;
@Output() updateCdumpEv = new EventEmitter<string>();
@ViewChild('generalForm') generalForm;
- // list = [
- // { source: 'node1dsvsdsvd', target: 'node2' },
- // { source: 'node3', target: 'node4' },
- // { source: 'node5', target: 'nodedsvsds6' },
- // { source: 'node7', target: 'node8' }
- // ];
list = [];
constructor(
@@ -142,13 +134,23 @@ export class GeneralComponent implements OnInit {
.subscribe(
response => {
this.newVfcmt = response.vfcmt;
- this.flowTypes.push(this.newVfcmt.flowType);
+ this.flowTypes.push(response.cdump.flowType);
+ this.newVfcmt.flowType = response.cdump.flowType;
+ this.store.flowType = response.cdump.flowType;
this.newVfcmt.vfni = this.store.vfiName;
this.vfniList.push({ resourceInstanceName: this.newVfcmt.vfni });
- // this.store.cdump = response.cdump;
this.updateCdumpEv.next(response.cdump);
this.store.isEditMode = true;
this.store.loader = false;
+
+ this.list = response.cdump.relations.map(item => {
+ return {
+ name1: item.name1,
+ name2: item.name2,
+ p1: item.meta.p1,
+ p2: item.meta.p2
+ };
+ });
},
error => {
this.notifyError(error);
diff --git a/public/src/app/home/home.component.html b/public/src/app/home/home.component.html
index 90e82d3..8cea741 100644
--- a/public/src/app/home/home.component.html
+++ b/public/src/app/home/home.component.html
@@ -1,18 +1,19 @@
-<div class="container">
+<div class="home-container">
<div style="display: flex;
+ padding-bottom:7px;
justify-content: space-between;">
- <div style="font-size: 1.7em; display: flex; align-items: center;">Monitoring</div>
+ <div style="font-size: 22px; display: flex; align-items: center;">Monitoring</div>
<div style="display: flex;">
- <button mat-icon-button [disabled]="checkCanCreate()" (click)="importScreen()">
+ <button mat-icon-button [disabled]="checkCanCreate()" style="margin-right: 10px;" data-tests-id="btn-import-mc" (click)="importScreen()">
<span style="width: 100%;
height: 100%;
display: flex;
justify-content: center;
- align-items: center;" [innerHTML]="'download' | feather:22"></span>
+ align-items: center;" [innerHTML]="'download' | feather:20"></span>
</button>
- <button mat-raised-button color="primary" (click)="createScreen()" data-tests-id="btn-create-mc" [disabled]="checkCanCreate()">
+ <button mat-raised-button color="primary" (click)="createScreen()" data-tests-id="btn-create-mc" class="btn-create" [disabled]="checkCanCreate()">
Create New MC
</button>
</div>
@@ -21,62 +22,66 @@
<div *ngIf="showTable===true; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>
- <!-- Table -->
- <div class="table-wrapper">
- <div *ngIf="unavailableMonitoringComponents.length > 0" data-tests-id="unavailableArea" style="color: white; background: red; padding: 1rem; border-radius: 5px; font-weight: bold; margin: 1em 0;">
- <div *ngFor="let item of unavailableMonitoringComponents">
- {{item.uuid}}
- </div>
+
+ <div *ngIf="unavailableMonitoringComponents.length > 0" data-tests-id="unavailableArea" style="color: white; background: red; padding: 1rem; border-radius: 5px; font-weight: bold; margin: 1em 0;">
+ <div *ngFor="let item of unavailableMonitoringComponents">
+ {{item.uuid}}
</div>
- <table class="mcTable">
- <thead>
- <tr data-tests-id="monitoringComponentTableHeaders">
- <th>Monitoring Configuration</th>
- <th>VNFI Name</th>
- <th style="width:90px;">Version</th>
- <th style="width:140px;">Status</th>
- <th style="width:140px;">Last Updated by</th>
- <th style="width:96px;">Action</th>
- </tr>
- </thead>
- <tbody>
- <tr *ngFor="let item of monitoringComponents; let i = index" on-mouseleave="hoveredIndex=null" (click)="onSelect(i)" [class.active]="i == selectedLine"
- data-tests-id="monitoringComponentTableItems" on-mouseover="hoveredIndex=i">
- <td color="blue">
- <div [hidden]="checkHoverCondition(item)" data-tests-id="tableItemsMonitoringConfiguration" class="table-Monitoring-Component" (click)="editItem(item)">
- {{item.name}}
- </div>
- </td>
- <td>
- <span pTooltip="{{item.vfiName}}" tooltipPosition="bottom" style="padding:5px;">{{item.vfiName}}</span>
- </td>
- <td style="width:90px;">{{item.version}}</td>
- <td style="width:140px;">{{item.status}}</td>
- <td style="width:140px;">{{item.lastUpdaterUserId}}</td>
- <td style="width:80px;">
- <div *ngIf="i==hoveredIndex" [hidden]="checkHoverCondition(item)">
- <button mat-icon-button data-tests-id="tableItemsButtonDelete" (click)="deleteItem(item)" style="width:30px; height: 30px;">
- <span style="width: 100%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;" [innerHTML]="'trash-2' | feather:18"></span>
- </button>
- </div>
- <div *ngIf="i==hoveredIndex" [hidden]="!checkHoverCondition(item)">
- <button mat-icon-button data-tests-id="tableItemsButtonInfo" style="width:30px; height: 30px;">
- <span style="width: 100%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;" [innerHTML]="'info' | feather:18"></span>
- </button>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
</div>
+
+ <ngx-datatable data-tests-id="monitoringComponentTable" class="material" [rows]="monitoringComponents" [loadingIndicator]="loadingIndicator" [columnMode]="'flex'"
+ [headerHeight]="40" [footerHeight]="40" [limit]="10" [rowHeight]="40"(selected)="onTableSelectItem($event)"
+ [selectionType]="'single'" [selected]="selectedLine" (activate)="onTableActivate($event)">
+
+ <ngx-datatable-column name="Monitoring Configuration" prop="name" [flexGrow]="3">
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
+
+ <div data-tests-id="tableItemsMonitoringConfiguration" [hidden]="checkTableItemHoverCondition(row)" (click)="editTableItem(row)"
+ class="ngx-datatable-monitoring-name">
+ <span> {{value}} </span>
+ </div>
+ <div data-tests-id="tableItemsMonitoringConfigurationNotOwner" [hidden]="!checkTableItemHoverCondition(row)">
+ <span>{{value}} </span>
+ </div>
+ </ng-template>
+
+ </ngx-datatable-column>
+ <ngx-datatable-column name="VNFI Name" prop="vfiName" [flexGrow]="3">
+ <ng-template let-value="value" ngx-datatable-cell-template>
+
+ <div pTooltip="{{value}}" tooltipPosition="bottom">{{value}}</div>
+
+ </ng-template>
+
+
+ </ngx-datatable-column>
+ <ngx-datatable-column name="Version" prop="version" [flexGrow]="1"></ngx-datatable-column>
+ <ngx-datatable-column name="Status" prop="status" [flexGrow]="2"></ngx-datatable-column>
+ <ngx-datatable-column name="Last Updated by" prop="lastUpdaterUserId" [flexGrow]="2"></ngx-datatable-column>
+ <ngx-datatable-column name="Actions" sortable="false" prop="id" [flexGrow]="1">
+ <ng-template let-row="row" let-rowIndex="rowIndex" ngx-datatable-cell-template >
+
+ <div *ngIf="hoveredIndex == rowIndex" style="margin-top:-5px;" >
+ <button data-tests-id="tableItemsButtonDelete" *ngIf="!checkTableItemHoverCondition(row); else elseBtnBlock" mat-icon-button
+ data-tests-id="tableItemsButtonDelete" (click)="deleteTableItem(row, rowIndex)" style="width:30px; height: 30px;">
+ <span style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;" [innerHTML]="'trash-2' | feather:18"></span>
+ </button>
+
+ <ng-template #elseBtnBlock>
+
+ <button data-tests-id="tableItemsButtonInfo" mat-icon-button data-tests-id="tableItemsButtonInfo" style="width:30px; height: 30px;">
+ <span style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;" [innerHTML]="'info' | feather:18"></span>
+ </button>
+ </ng-template>
+
+ </div>
+
+ </ng-template>
+ </ngx-datatable-column>
+
+ </ngx-datatable>
+
+
</ng-template>
<ng-template #elseBlock>
@@ -85,22 +90,21 @@
justify-content: center;
align-items: center;
flex:1;">
- <div style="font-size: 1.5em;">
+ <div style="font-size: 18px;">
Monitoring Configuration does not Exist
</div>
- <div style="padding: 0.5em; padding-top: 1em;" data-tests-id="new-monitoring-title">
+ <div style="padding: 0.5em; padding-top: 1em; font-size: 13px;" data-tests-id="new-monitoring-title">
A Monitoring Configuration (MC) was not yet created
</div>
- <div>
+ <div style="font-size: 13px;">
Please create a new MC to monitor the service
</div>
<div class="wrapper-btn-add-mc">
<button mat-mini-fab color="primary" (click)="createScreen()" data-tests-id="btn-fab-create-mc" [disabled]="checkCanCreate()">
<span [innerHTML]="'plus' | feather:24"></span>
</button>
- <span data-tests-id="btn-span-create-mc" style="margin-top: 1rem; font-size: 1.2em; font-weight: 400;" [style.color]="checkCanCreate() ? '#ebebe4' : '#009FDB'">Add First MC</span>
+ <span data-tests-id="btn-span-create-mc" style="margin-top: 10px; font-size: 14px; " [style.color]="checkCanCreate() ? '#ebebe4' : '#009FDB'">Add First MC</span>
</div>
</div>
</ng-template>
</div>
-
diff --git a/public/src/app/home/home.component.scss b/public/src/app/home/home.component.scss
index 583705f..2217b7d 100644
--- a/public/src/app/home/home.component.scss
+++ b/public/src/app/home/home.component.scss
@@ -1,110 +1,78 @@
-.container {
+@import '~@swimlane/ngx-datatable/release/themes/material.css';
+.home-container {
display: flex;
flex-direction: column;
height: 100%;
- padding: 0.5em;
+ margin: 15px 20px;
margin-left: 15px;
margin-right: 15px;
.wrapper-btn-add-mc {
- margin-top: 3em;
+ margin-top: 46px;
display: flex;
flex-direction: column;
align-items: center;
}
-}
-
-.table-Monitoring-Component {
- &:hover {
- color: #009fdb;
- text-decoration: underline;
- cursor: pointer;
+ .btn-create {
+ width: 150px;
+ height: 36px;
}
}
-.table-wrapper {
- display: flex;
- justify-content: center;
- flex: 1;
- margin-bottom: 2em;
- flex-direction: column;
- display: block;
+.my-confrim-dialog .mat-dialog-container {
+ max-width: 600px;
+ width: 500px;
+ height: 200px;
+ padding: 0;
}
-table.mcTable {
- display: flex;
- flex-flow: column;
- height: calc(100vh - 150px);
- width: 100%;
- background-color: #ffffff;
- color: #5a5a5a;
-}
-table.mcTable thead {
- /* head takes the height it requires,
- and it's not scaled when table.mcTable is resized */
- flex: 0 0 auto;
- // width: calc(100% - 17px);
- width: 100%;
-}
-table.mcTable tbody {
- /* body takes all the remaining available space */
- flex: 1 1 auto;
- display: block;
- overflow-y: scroll;
-}
-table.mcTable tbody tr {
- width: 100%;
-}
-
-table.mcTable thead,
-table.mcTable tbody tr {
- display: table;
- table-layout: fixed;
+/deep/ .ui-tooltip .ui-tooltip-text {
+ font-size: 0.8em;
+ padding: 0.7em;
}
-table.mcTable {
- border-collapse: collapse;
- border-spacing: 0px;
+/deep/ .ui-tooltip {
+ max-width: 400px;
}
-table.mcTable tr.active td {
- background-color: #e6f6fb !important;
- color: #5a5a5a;
+.ngx-datatable-monitoring-name {
+ &:hover {
+ color: #009fdb;
+ text-decoration: underline;
+ cursor: pointer;
+ }
}
-table.mcTable th {
+.ngx-datatable.material .datatable-header .datatable-header-cell {
background: #f4f4f4;
- color: #191919;
- text-align: left;
-}
-table.mcTable tr {
- &:hover {
- background-color: #f8f8f8;
- color: #5a5a5a;
+ span {
+ font-weight: bold;
+ font-size: 13px;
+ font-family: 'Open Sans', sans-serif !important;
}
}
-table.mcTable table,
-table.mcTable th,
-table.mcTable td {
- padding: 5px 10px;
- border: 0.5px solid #d2d2d2;
- border-bottom: none;
- height: 40px;
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
+.ngx-datatable .datatable-body-cell,
+.ngx-datatable .datatable-header-cell {
+ border: 0.1px solid #d2d2d2;
}
-table.mcTable tr:last-child {
- border-bottom: 0.5px solid #d2d2d2;
-}
-
-/deep/ .ui-tooltip .ui-tooltip-text {
- font-size: 0.8em;
- padding: 0.7em;
+.ngx-datatable.material.single-selection .datatable-body-row.active,
+.ngx-datatable.material.single-selection
+ .datatable-body-row.active
+ .datatable-row-group,
+.ngx-datatable.material.multi-selection .datatable-body-row.active,
+.ngx-datatable.material.multi-selection
+ .datatable-body-row.active
+ .datatable-row-group,
+.ngx-datatable.material.multi-click-selection .datatable-body-row.active,
+.ngx-datatable.material.multi-click-selection
+ .datatable-body-row.active
+ .datatable-row-group {
+ background-color: #e6f6fb !important;
+ color: #5a5a5a;
}
-/deep/ .ui-tooltip {
- max-width: 400px;
+.ngx-datatable.material {
+ box-shadow: none;
}
diff --git a/public/src/app/home/home.component.ts b/public/src/app/home/home.component.ts
index 1c538c0..349a031 100644
--- a/public/src/app/home/home.component.ts
+++ b/public/src/app/home/home.component.ts
@@ -1,28 +1,31 @@
-import { Component } from '@angular/core';
-import { Store } from '../store/store';
-import { HostService } from '../host/host.service';
+import { ChangeDetectorRef, Component, ViewEncapsulation } from '@angular/core';
+import { MatDialog } from '@angular/material';
import { ActivatedRoute, Router } from '@angular/router';
+import { ToastrService } from 'ngx-toastr';
import { RestApiService } from '../api/rest-api.service';
-import { NgIf } from '@angular/common';
+import { HostService } from '../host/host.service';
import { ConfirmPopupComponent } from '../rule-engine/confirm-popup/confirm-popup.component';
-import { MatDialog } from '@angular/material';
-import { ToastrService } from 'ngx-toastr';
-import { ChangeDetectorRef } from '@angular/core';
+import { PluginPubSub } from '../sdc/plugin-pubsub';
+import { Store } from '../store/store';
+import { NgxDatatableModule } from '@swimlane/ngx-datatable';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
- styleUrls: ['./home.component.scss']
+ styleUrls: ['./home.component.scss'],
+ encapsulation: ViewEncapsulation.None
})
export class HomeComponent {
linkToMain: string;
- currentUserId: string;
showTable = true;
- selectedLine;
+ selectedLine = [];
monitoringComponents = new Array();
unavailableMonitoringComponents = new Array();
- hoveredIndex = null;
+ hoveredIndex = 1;
dialogRef;
+ deleteRow: number;
+
+ loadingIndicator = true;
constructor(
private activeRoute: ActivatedRoute,
@@ -37,14 +40,58 @@ export class HomeComponent {
this.activeRoute.queryParams.subscribe(params => {
console.log('params: %o', params);
this.store.sdcParmas = params;
+
+ console.log('init comunication with sdc');
+ const eventsToWaitFor = [
+ 'WINDOW_OUT',
+ 'VERSION_CHANGE',
+ 'CHECK_IN',
+ 'CHECK_OUT',
+ 'SUBMIT_FOR_TESTING',
+ 'UNDO_CHECK_OUT'
+ ];
+ this.store.ifrmaeMessenger = new PluginPubSub(
+ this.store.sdcParmas.eventsClientId,
+ this.store.sdcParmas.parentUrl,
+ eventsToWaitFor
+ );
+ console.log('send ready to sdc');
+ this.store.ifrmaeMessenger.notify('READY');
+
+ this.store.ifrmaeMessenger.on((eventData, event) => {
+ console.log('eventData', eventData);
+ console.log('event', event);
+ if (
+ eventData.type === 'WINDOW_OUT' ||
+ eventData.type === 'CHECK_IN' ||
+ eventData.type === 'SUBMIT_FOR_TESTING'
+ ) {
+ const currentUrl = this.route.url;
+ if (currentUrl.includes('main')) {
+ if (this.store.cdumpIsDirty) {
+ this.store.displaySDCDialog = true;
+ } else {
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ }
+ } else {
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ }
+ } else {
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ }
+ });
+
this.linkToMain = `/main/${params.contextType}/${params.uuid}/${
params.version
}/`;
+ this.loadingIndicator = true;
+
this._restApi.getMonitoringComponents(params).subscribe(
response => {
console.log('response: ', response);
if (response.hasOwnProperty('monitoringComponents')) {
this.monitoringComponents = response.monitoringComponents;
+ this.loadingIndicator = false;
}
if (response.hasOwnProperty('unavailable')) {
this.unavailableMonitoringComponents = response.unavailable;
@@ -83,8 +130,11 @@ export class HomeComponent {
}
}
- checkHoverCondition(item: any): boolean {
+ // Monitoring Table logic
+
+ checkTableItemHoverCondition(item: any): boolean {
if (
+ this.store.sdcParmas !== undefined &&
this.store.sdcParmas.userId === item.lastUpdaterUserId &&
this.store.sdcParmas.lifecycleState === 'NOT_CERTIFIED_CHECKOUT'
) {
@@ -94,12 +144,19 @@ export class HomeComponent {
}
}
- editItem(item: any): void {
+ onTableActivate(event: any): void {
+ this.hoveredIndex = this.monitoringComponents.findIndex(
+ s => s == event.row
+ );
+ console.log('selected : ');
+ }
+
+ editTableItem(item: any): void {
this.store.vfiName = item.vfiName;
this.route.navigate([this.linkToMain + '/' + item.uuid]);
}
- onSelect(item: any): void {
+ onTableSelectItem(item: any): void {
this.selectedLine = item;
console.log('selected : ', item);
}
@@ -107,17 +164,17 @@ export class HomeComponent {
deleteEnable(item: any): boolean {
console.log(
'delete enable: ',
- item.isOwner && item.Lifecycle == 'NOT_CERTIFIED_CHECKOUT'
+ item.isOwner && item.Lifecycle === 'NOT_CERTIFIED_CHECKOUT'
);
const { userId, lifecycleState } = this.store.sdcParmas;
return (
- item.lastUpdaterUserId == userId &&
- lifecycleState == 'NOT_CERTIFIED_CHECKOUT'
+ item.lastUpdaterUserId === userId &&
+ lifecycleState === 'NOT_CERTIFIED_CHECKOUT'
);
}
- deleteItem(item: any): void {
- let deleteRow = this.hoveredIndex;
+ deleteTableItem(item: any, index: any): void {
+ this.deleteRow = index;
this.dialogRef = this.dialog.open(ConfirmPopupComponent, {
panelClass: 'my-confrim-dialog',
disableClose: true
@@ -125,7 +182,7 @@ export class HomeComponent {
this.dialogRef.afterClosed().subscribe(result => {
// if the user want to delete
if (result) {
- if (item.status == 'submitted') {
+ if (item.status === 'Submitted') {
this._restApi
.deleteMonitoringComponentWithBlueprint(
this.store.sdcParmas,
@@ -135,15 +192,15 @@ export class HomeComponent {
)
.subscribe(
response => {
- this.itemDeletedRemoveAndNotify(deleteRow);
+ this.itemDeletedRemoveAndNotify(this.deleteRow);
},
error => {
if (error.messageId === 'SVC6118') {
- this.monitoringComponents.splice(deleteRow, 1);
+ this.monitoringComponents.splice(this.deleteRow, 1);
this.changeDetectorRef.detectChanges();
}
const errorMsg = Object.values(error.requestError) as any;
- this.toastr.error('', errorMsg[0]);
+ this.toastr.error('', errorMsg[0].formattedErrorMessage);
}
);
} else {
@@ -155,7 +212,7 @@ export class HomeComponent {
)
.subscribe(
response => {
- this.itemDeletedRemoveAndNotify(deleteRow);
+ this.itemDeletedRemoveAndNotify(this.deleteRow);
},
error => {
const errorMsg = Object.values(error.requestError) as any;
@@ -175,14 +232,4 @@ export class HomeComponent {
'Monitoring Configuration was successfully deleted'
);
}
-
- // convertFile(fileInput: any) {
- // // read file from input
- // const fileReaded = fileInput.target.files[0];
- // Papa.parse(fileReaded, {
- // complete: function(results) {
- // console.log('Finished:', results.data);
- // }
- // });
- // }
}
diff --git a/public/src/app/loader/loader.component.spec.ts b/public/src/app/loader/loader.component.spec.ts
index 7c82913..2159e0d 100644
--- a/public/src/app/loader/loader.component.spec.ts
+++ b/public/src/app/loader/loader.component.spec.ts
@@ -1,8 +1,7 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
+import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { LoaderComponent } from './loader.component';
-describe('LoaderComponent', () => {
+describe('DiagramComponent', () => {
let component: LoaderComponent;
let fixture: ComponentFixture<LoaderComponent>;
diff --git a/public/src/app/main/main.component.html b/public/src/app/main/main.component.html
index d54b27b..4c71a37 100644
--- a/public/src/app/main/main.component.html
+++ b/public/src/app/main/main.component.html
@@ -1,4 +1,4 @@
-<div class="container">
+<div class="main-container">
<div style="padding: .25em; display: flex;
justify-content: space-between;
@@ -6,16 +6,18 @@
<div>
<a (click)="goBack()" data-tests-id="btn-back-home" style="display: flex; cursor: pointer;text-decoration: none; color: #009fdb;">
<mat-icon fontSet="fontawesome" fontIcon="fa-angle-left" style="height: 17px; width: 12px; font-size: 17px;"></mat-icon>
- <span style="display: flex; align-items: center;">Back to Monitoring</span>
+ <span style="display: flex; align-items: center; font-size: 12px;">
+ Back to Monitoring
+ </span>
</a>
<div style="margin:10px 0;" data-tests-id="new-monitorying-titie">
- <span style="font-size: 2em;" *ngIf='store.generalflow === "new"'>
+ <span style="font-size: 22px;" *ngIf='store.generalflow === "new"'>
New
</span>
- <span style="font-size: 2em;" *ngIf='store.generalflow === "import"'>
+ <span style="font-size: 22px;" *ngIf='store.generalflow === "import"'>
Import
</span>
- <span style="font-size: 2em;">
+ <span style="font-size: 22px;">
Monitoring Configuration
</span>
</div>
@@ -24,7 +26,9 @@
<div>
<div *ngIf='store.generalflow === "new" || store.generalflow === "edit"'>
<button *ngIf="!this.store.isEditMode" mat-raised-button color="primary" [disabled]="this.generalComponent.generalForm.invalid"
- data-tests-id="createMonitoring" (click)="createMC(this.generalComponent.generalForm.value)">Create</button>
+ style="width: 95px;height: 36px;" data-tests-id="createMonitoring" (click)="createMC(this.generalComponent.generalForm.value)">
+ Create
+ </button>
<div *ngIf="this.store.isEditMode" style="display: flex;">
<button mat-icon-button (click)="saveCDUMP()" [disabled]="!store.cdumpIsDirty">
@@ -35,12 +39,12 @@
justify-content: center;
align-items: center;" [innerHTML]="'save' | feather:22"></span>
</button>
- <button mat-raised-button color="primary" (click)="saveAndCreateBlueprint()">Submit</button>
+ <button mat-raised-button color="primary" style="width: 95px; height: 36px; border-radius: 2px;" (click)="saveAndCreateBlueprint()">Submit</button>
</div>
</div>
<div *ngIf='store.generalflow === "import"'>
<button mat-raised-button color="primary" (click)="importMC(this.generalComponent.newVfcmt)" [disabled]="this.generalComponent.generalForm.invalid"
- data-tests-id="importMonitoring">Import</button>
+ data-tests-id="importMonitoring" style="width: 95px;height: 36px;">Import</button>
</div>
</div>
</div>
@@ -53,7 +57,7 @@
<app-general (updateCdumpEv)="updateCdump($event)"></app-general>
</div>
</p-tabPanel>
- <p-tabPanel *ngFor="let item of nodes" [header]="item.name">
+ <p-tabPanel *ngFor="let item of nodes;" [header]="item.name">
<app-rule-frame [tabName]="item.name"></app-rule-frame>
</p-tabPanel>
</p-tabView>
diff --git a/public/src/app/main/main.component.scss b/public/src/app/main/main.component.scss
index 402a56a..47f1bd9 100644
--- a/public/src/app/main/main.component.scss
+++ b/public/src/app/main/main.component.scss
@@ -1,7 +1,6 @@
-.container {
+.main-container {
display: flex;
- flex-direction: column;
- // height: 100%;
+ flex-direction: column; // height: 100%;
margin: 1em;
}
@@ -16,11 +15,12 @@
.ui-tabview .ui-tabview-nav li {
margin: 0;
+ border-radius: 0;
}
.ui-tabview .ui-tabview-nav li.ui-tabview-selected {
color: #009fdb;
- border-top: 4px solid #009fdb;
+ border-top: 2px solid #009fdb;
border-bottom: none;
}
diff --git a/public/src/app/main/main.component.ts b/public/src/app/main/main.component.ts
index fdbb077..a3f2271 100644
--- a/public/src/app/main/main.component.ts
+++ b/public/src/app/main/main.component.ts
@@ -1,12 +1,11 @@
-import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
import { Location } from '@angular/common';
+import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { ToastrService } from 'ngx-toastr';
import { RestApiService } from '../api/rest-api.service';
-import { Store } from '../store/store';
-import { RuleFrameComponent } from '../rule-frame/rule-frame.component';
import { GeneralComponent } from '../general/general.component';
-import { ToastrService } from 'ngx-toastr';
-import { forkJoin } from 'rxjs/observable/forkJoin';
+import { RuleEngineApiService } from '../rule-engine/api/rule-engine-api.service';
+import { Store } from '../store/store';
@Component({
selector: 'app-main',
@@ -18,11 +17,13 @@ export class MainComponent {
cdump;
nodes = [];
@ViewChild(GeneralComponent) generalComponent: GeneralComponent;
- // @ViewChildren(RuleFrameComponent) ruleFrameRef: QueryList<RuleFrameComponent>;
+ // @ViewChildren(RuleFrameComponent) ruleFrameRef:
+ // QueryList<RuleFrameComponent>;
constructor(
private route: ActivatedRoute,
private restApi: RestApiService,
+ private _ruleApi: RuleEngineApiService,
private toastr: ToastrService,
public store: Store,
private location: Location
@@ -39,6 +40,8 @@ export class MainComponent {
createMC(params) {
console.log('newVfcmt: %o', params);
this.store.loader = true;
+ this.store.vfiName = params.serviceAttached;
+ this.store.flowType = 'default';
this.restApi
.createNewVFCMT({
name: params.name,
@@ -55,6 +58,7 @@ export class MainComponent {
this.store.mcUuid = success.vfcmt.uuid;
console.log(this.cleanProperty(success));
this.store.cdump = success.cdump;
+ this.diagramRelationsFromCdump(success);
this.nodes = this.store.cdump.nodes;
this.store.setTabsProperties(this.nodes);
this.setDataFromMapToRuleEngine(success.cdump);
@@ -70,6 +74,17 @@ export class MainComponent {
);
}
+ private diagramRelationsFromCdump(success: any) {
+ this.generalComponent.list = success.cdump.relations.map(item => {
+ return {
+ name1: item.name1,
+ name2: item.name2,
+ p1: item.meta.p1,
+ p2: item.meta.p2
+ };
+ });
+ }
+
updateCdump(cdump) {
this.store.cdump = cdump;
this.nodes = this.store.cdump.nodes;
@@ -81,6 +96,8 @@ export class MainComponent {
console.log('importVfcmt: %o', params);
this.generalComponent.importCompleted = true;
this.store.loader = true;
+ this.store.vfiName = params.serviceAttached;
+ this.store.flowType = params.flowType;
this.restApi
.importVFCMT({
name: params.name,
@@ -96,11 +113,13 @@ export class MainComponent {
.subscribe(
success => {
console.log(success);
+
this.location.path();
// this.location.go();
this.store.mcUuid = success.vfcmt.uuid;
console.log(this.cleanProperty(success));
this.store.cdump = success.cdump;
+ this.diagramRelationsFromCdump(success);
this.nodes = this.store.cdump.nodes;
this.store.setTabsProperties(this.nodes);
this.setDataFromMapToRuleEngine(success.cdump);
@@ -119,12 +138,9 @@ export class MainComponent {
setDataFromMapToRuleEngine(cdump) {
this.store.tabParmasForRule = cdump.nodes
- .filter(x => x.name.includes('map'))
+ .filter(x => x.name.toLowerCase().includes('map'))
.map(y => {
- return {
- name: y.name,
- nid: y.nid
- };
+ return { name: y.name, nid: y.nid };
});
}
@@ -139,7 +155,6 @@ export class MainComponent {
}
saveCDUMP() {
- debugger;
this.store.loader = true;
this.restApi
.saveMonitoringComponent({
@@ -167,7 +182,6 @@ export class MainComponent {
}
saveAndCreateBlueprint() {
- debugger;
this.store.loader = true;
if (this.store.cdumpIsDirty) {
this.restApi
@@ -210,6 +224,7 @@ export class MainComponent {
.subscribe(
success => {
this.store.loader = false;
+
this.toastr.success('', 'Save succeeded');
},
error => {
@@ -223,6 +238,7 @@ export class MainComponent {
}
handleChange(e) {
+ this._ruleApi.callUpdateTabIndex(e.index - 1);
this.store.setTabIndex(e.index - 1);
}
}
diff --git a/public/src/app/rule-engine/action-list/action-list.component.html b/public/src/app/rule-engine/action-list/action-list.component.html
index e7879b7..1ee74df 100644
--- a/public/src/app/rule-engine/action-list/action-list.component.html
+++ b/public/src/app/rule-engine/action-list/action-list.component.html
@@ -1,10 +1,10 @@
<form #actionListFrm="ngForm" class="wrapper" data-tests-id="popupRuleEditor">
<div class="header">
- <div style="display: flex; justify-content: flex-end; align-items: center;">
+ <div style="display: flex; justify-content: flex-end; align-items: center; margin-left: 20px;">
<a (click)="closeDialog()" data-tests-id="btnBackRule" style="cursor: pointer;text-decoration: none; color: #009fdb;">
<mat-icon fontSet="fontawesome" fontIcon="fa-angle-left" style="height: 22px; width: 22px; font-size: 22px; padding-right: 20px;"></mat-icon>
</a>
- <span style="font-size: 18px;">New Rule Editor</span>
+ <span style="font-size: 18px;">{{title}}</span>
</div>
<div style="display: flex; justify-content: flex-end; align-items: center; padding: 10px;">
@@ -17,7 +17,7 @@
align-items: center;" [innerHTML]="'save' | feather:22"></span>
</button>
- <button mat-raised-button [disabled]="actions.length === 0" style="height: 35px; margin-left: 20px;" color="primary" data-tests-id="btnDone"
+ <button mat-raised-button [disabled]="actions.length === 0" style="height: 35px; margin-left: 10px;" color="primary" data-tests-id="btnDone"
(click)="saveAndDone()">
Done
</button>
@@ -62,18 +62,24 @@
<div style="display: flex;">
<select [(ngModel)]="selectedAction" name="selectedAction" style="height: 2rem; width: 150px; margin-right: 1rem;" data-tests-id="selectAction">
<option [ngValue]="null" disabled>Select Action</option>
+
<option value="copy">Copy</option>
<option value="concat">Concat</option>
<option value="map">Map</option>
<option value="date formatter">Date Formatter</option>
+ <option value="log text">Log Text</option>
+ <option value="log event">Log Event</option>
+ <option value="replace text">Replace Text</option>
+ <option value="clear">Clear</option>
+
</select>
<div style="display: flex; align-items: center;">
- <button mat-mini-fab color="primary" style="height: 24px; width: 24px; display:flex; justify-content: center;" (click)="addAction2list(selectedAction)"
+ <button mat-mini-fab color="primary" style="height: 16px; width: 16px; display:flex; justify-content: center;" (click)="addAction2list(selectedAction)"
data-tests-id="btnAddAction">
- <span style="display: flex; justify-content: center; align-items: center" [innerHTML]="'plus' | feather:16"></span>
+ <span style="display: flex; justify-content: center; align-items: center" [innerHTML]="'plus' | feather:12"></span>
</button>
- <span style="color: #009FDB; display: flex; justify-content: center; padding-left: 10px">Add Action</span>
+ <span style="color: #009FDB; display: flex; justify-content: center; padding-left: 6px">Add Action</span>
</div>
</div>
diff --git a/public/src/app/rule-engine/action-list/action-list.component.scss b/public/src/app/rule-engine/action-list/action-list.component.scss
index 39b9dce..67fa048 100644
--- a/public/src/app/rule-engine/action-list/action-list.component.scss
+++ b/public/src/app/rule-engine/action-list/action-list.component.scss
@@ -9,7 +9,9 @@
justify-content: space-between;
align-items: center;
color: #191919;
- border-bottom: 2px solid #d2d2d2;
+ border-bottom: 1px solid #d2d2d2;
+ padding-bottom: 0px;
+ margin: 0;
// padding: 0.4rem 1rem;
}
diff --git a/public/src/app/rule-engine/action-list/action-list.component.ts b/public/src/app/rule-engine/action-list/action-list.component.ts
index 40ff46d..27a74d4 100644
--- a/public/src/app/rule-engine/action-list/action-list.component.ts
+++ b/public/src/app/rule-engine/action-list/action-list.component.ts
@@ -1,20 +1,16 @@
import {
+ AfterViewInit,
Component,
- Inject,
- ViewChildren,
QueryList,
- AfterViewInit,
ViewChild,
- Input
+ ViewChildren
} from '@angular/core';
-import { RuleEngineApiService } from '../api/rule-engine-api.service';
-import { Subject } from 'rxjs/Subject';
-import { v1 as uuid } from 'uuid';
-import { environment } from '../../../environments/environment';
-import { ActionComponent } from '../action/action.component';
+import { NgForm } from '@angular/forms';
import { cloneDeep } from 'lodash';
+import { v1 as uuid } from 'uuid';
import { Store } from '../../store/store';
-import { NgForm } from '@angular/forms';
+import { ActionComponent } from '../action/action.component';
+import { RuleEngineApiService } from '../api/rule-engine-api.service';
@Component({
selector: 'app-action-list',
@@ -22,6 +18,7 @@ import { NgForm } from '@angular/forms';
styleUrls: ['./action-list.component.scss']
})
export class ActionListComponent implements AfterViewInit {
+ title = '';
error: Array<string>;
condition: any;
eventType: string;
@@ -53,8 +50,10 @@ export class ActionListComponent implements AfterViewInit {
this.condition = data.item.condition;
this.uid = data.item.uid;
this.description = data.item.description;
+ this.title = this.description + ' - Rule Editor';
this.ifStatement = this.condition == null ? false : true;
} else {
+ this.title = 'New Rule Editor';
this.actions = new Array();
this.backupActionForCancel = new Array();
this.condition = null;
@@ -97,12 +96,24 @@ export class ActionListComponent implements AfterViewInit {
value: '',
regex: '',
state: 'closed',
- values: [{ value: '' }, { value: '' }]
+ values: [
+ {
+ value: ''
+ },
+ {
+ value: ''
+ }
+ ]
},
actionType: this.selectedAction,
target: '',
map: {
- values: [{ key: '', value: '' }],
+ values: [
+ {
+ key: '',
+ value: ''
+ }
+ ],
haveDefault: false,
default: ''
},
@@ -111,6 +122,18 @@ export class ActionListComponent implements AfterViewInit {
toFormat: '',
fromTimezone: '',
toTimezone: ''
+ },
+ replaceText: {
+ find: '',
+ replace: ''
+ },
+ logText: {
+ name: '',
+ level: '',
+ text: ''
+ },
+ logEvent: {
+ title: ''
}
});
}
@@ -162,7 +185,10 @@ export class ActionListComponent implements AfterViewInit {
? item.target
: item.selectedNode.id,
map: item.map,
- dateFormatter: item.dateFormatter
+ dateFormatter: item.dateFormatter,
+ replaceText: item.replaceText,
+ logText: item.logText,
+ logEvent: item.logEvent
};
});
let conditionData2server = null;
@@ -178,6 +204,7 @@ export class ActionListComponent implements AfterViewInit {
return {
version: this.version,
eventType: this.eventType,
+ notifyId: this.store.notifyIdValue,
uid: this.uid,
description: this.description,
actions: actionSetData,
@@ -225,12 +252,12 @@ export class ActionListComponent implements AfterViewInit {
const actionComp = this.actionsRef.toArray();
const filterInvalidActions = actionComp.filter(comp => {
return (
- comp.fromInstance.fromFrm.invalid ||
- comp.targetInstance.targetFrm.invalid ||
- comp.actionFrm.invalid
+ // (comp.fromInstance && comp.fromInstance.fromFrm.invalid) ||
+ // (comp.targetInstance && comp.targetInstance.targetFrm.invalid) ||
+ comp.actionFrm && comp.actionFrm.invalid
);
});
- if (this.actionListFrm.valid && filterInvalidActions.length === 0) {
+ if (this.actionListFrm.valid && filterInvalidActions.length == 0) {
const data = this.prepareDataToSaveRule();
this.store.loader = true;
this._ruleApi.modifyRule(data).subscribe(
@@ -249,11 +276,10 @@ export class ActionListComponent implements AfterViewInit {
}
);
} else {
- // scroll to first invalid element
- const elId = filterInvalidActions[0].action.id;
- const el = document.getElementById(elId as string);
- const label = el.children.item(0) as HTMLElement;
- el.scrollIntoView();
+ // scroll to first invalid element const elId =
+ // filterInvalidActions[0].action.id; const el = document.getElementById(elId as
+ // string); const label = el.children.item(0) as HTMLElement;
+ // el.scrollIntoView();
}
}
diff --git a/public/src/app/rule-engine/action/action.component.html b/public/src/app/rule-engine/action/action.component.html
index b41ab82..250af34 100644
--- a/public/src/app/rule-engine/action/action.component.html
+++ b/public/src/app/rule-engine/action/action.component.html
@@ -1,56 +1,151 @@
<form #actionFrm="ngForm" class="conatiner" id="{{action.id}}" (mouseover)="changeStyle($event)" (mouseout)="changeStyle($event)">
<div>
+
<div class="center-content">
<!-- type info -->
<div class="action-info" [ngClass]="highlight">
{{action.actionType | uppercase}}
</div>
+
<!-- from component -->
- <app-from #from style="width: 100%" [actionType]="action.actionType" (onFromChange)="updateFrom($event)"></app-from>
+ <app-from [hidden]="action.actionType === 'log event' || action.actionType === 'log text'" class="center-content-item" #from
+ [actionType]="action.actionType" (onFromChange)="updateFrom($event)"></app-from>
+
<!-- target component -->
- <app-target #target style="width: 100%" (onTargetChange)="updateTarget($event)" [nodes]="action.nodes">
+ <app-target [hidden]="action.actionType === 'clear' || action.actionType === 'replace text' || action.actionType === 'log text' || action.actionType === 'log event'"
+ #target style="width: 100%" (onTargetChange)="updateTarget($event)" [nodes]="action.nodes">
</app-target>
- </div>
- <!-- dateFormatter -->
- <div *ngIf="action.actionType === 'date formatter'" style="display: flex; flex-direction: column; margin: 1em; align-items: flex-end;">
- <div style="display: flex; margin: 0.5em 0;">
+ <!-- log Event -->
+ <div *ngIf="action.actionType === 'log event'" class="center-content-item">
<div class="from">
- <div class="from-conatiner">
- <div style="display: flex; align-items: center;" class="label">
- <span class="label" style="padding: 0 5px; width: 100px;">From Format</span>
- <input class="input-text" ngModel required name="fromFormat" [(ngModel)]="action.dateFormatter.fromFormat" type="text">
+ <div class="from-container">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 100px;">Title</span>
+ <input required class="input-text" data-tests-id="InputLogTitle" ngModel name="title" [(ngModel)]="action.logEvent.title"
+ type="text" placeholder="The title for the log entry">
</div>
</div>
</div>
+ </div>
+
+ <!-- log Text -->
+ <div *ngIf="action.actionType === 'log text'" class="center-content-item">
<div class="from">
- <div class="from-conatiner">
- <div style="display: flex; align-items: center;" class="label">
- <span class="label" style="padding: 0 5px; width: 100px;">To Format</span>
- <input class="input-text" ngModel required name="toFormat" [(ngModel)]="action.dateFormatter.toFormat" type="text">
+ <div class="from-container">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 100px;">Log Text</span>
+ <input required class="input-text" data-tests-id="InputLogText" ngModel name="logText" [(ngModel)]="action.logText.text"
+ type="text" placeholder="The title for the log entry">
</div>
</div>
</div>
</div>
- <div style="display: flex; margin: 0.5em 0;">
- <div class="from">
- <div class="from-conatiner">
- <div style="display: flex; align-items: center;" class="label">
- <span class="label" style="padding: 0 5px; width: 100px;">From Time-zone</span>
- <input class="input-text" ngModel required name="fromTimezone" [(ngModel)]="action.dateFormatter.fromTimezone" type="text">
+ </div>
+
+ <!-- dateFormatter -->
+ <div *ngIf="action.actionType === 'date formatter'" style="flex-direction: column; margin-left: 156px; align-items: flex-end;">
+ <div style="display: flex; margin: 0.5em 0; padding-left: 6px;">
+ <div class="from" style="width:50%;">
+ <div class="from-container">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 100px;">From Format</span>
+ <input data-tests-id="InputFromFormat" class="input-text" ngModel required name="fromFormat" [(ngModel)]="action.dateFormatter.fromFormat" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="from" style="width:50%; padding: 0;">
+ <div class="from-container">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 100px;">To Format</span>
+ <input data-tests-id="InputToFormat" class="input-text" ngModel required name="toFormat" [(ngModel)]="action.dateFormatter.toFormat" type="text">
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style="display: flex; margin: 0.5em 0; padding-left: 6px;">
+ <div class="from" style="width:50%;">
+ <div class="from-container">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 132px;">From Time-zone</span>
+ <input class="input-text" data-tests-id="InputFromTimezone" ngModel required name="fromTimezone" [(ngModel)]="action.dateFormatter.fromTimezone" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="from" style="width:50%; padding: 0;">
+ <div class="from-container">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 100px;">To Time-zone</span>
+ <input class="input-text" data-tests-id="InputToTimezone" ngModel required name="toTimezone" [(ngModel)]="action.dateFormatter.toTimezone" type="text">
+ </div>
+ </div>
</div>
</div>
</div>
- <div class="from">
- <div class="from-conatiner">
- <div style="display: flex; align-items: center;" class="label">
- <span class="label" style="padding: 0 5px; width: 100px;">To Time-zone</span>
- <input class="input-text" ngModel required name="toTimezone" [(ngModel)]="action.dateFormatter.toTimezone" type="text">
+
+ <!-- replace text -->
+ <div *ngIf="action.actionType === 'replace text'" class="action-container" style="flex-direction: row; margin-left: 152px; padding: 0 0.8em;">
+
+ <div class="action-item">
+ <div class="from" style="width:100%;">
+ <div class="from-container" display="padding:0;">
+
+ <div class="label" style="width: 100%;">
+ <span class="label" style="padding: 0 5px; width: 100px;">Find what</span>
+ <input data-tests-id="InputFindWhat" class="input-text" ngModel required name="findWhat" [(ngModel)]="action.replaceText.find"
+ type="text" placeholder="Find text">
+ </div>
+
+ </div>
+ </div>
+
+ </div>
+
+ <div class="action-item">
+ <div class="from" style="width: 100%; padding: 0;">
+ <div class="from-container">
+
+ <div class="label" style="width: 100%;">
+ <span class="label" style="padding: 0 5px; width: 100px;">Replace with</span>
+ <input data-tests-id="InputReplaceWith" class="input-text" ngModel required name="replaceWith" [(ngModel)]="action.replaceText.replace"
+ type="text" placeholder="Replace with text">
+ </div>
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+ <!-- log text -->
+ <div *ngIf="action.actionType === 'log text'" class="action-container" style="flex-direction: row; margin-left: 152px; padding: 0 0.8em;">
+
+ <div class="action-item">
+ <div class="from" style="width: 100%;">
+ <div class="from-container" display="padding:0;">
+ <div class="label" style="width: 100%;">
+ <span class="label" style="padding: 0 5px; width: 100px;">Log Name</span>
+ <input class="input-text" data-tests-id="InputLogName" ngModel name="logName" [(ngModel)]="action.logText.name"
+ type="text" placeholder="Enter log name">
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="action-item">
+ <div class="from" style="width: 100%; padding: 0;">
+ <div class="from-container">
+ <div class="label" style="width: 100%;">
+ <span class="label" style="padding: 0 5px; width: 100px;">Log Level</span>
+ <input class="input-text" data-tests-id="InputLogLevel" ngModel required name="logLevel" [(ngModel)]="action.logText.level"
+ type="text" placeholder="Text to log">
</div>
</div>
</div>
</div>
+
</div>
<!-- Map -->
@@ -90,8 +185,8 @@
<input [(ngModel)]="item.value" ngModel required name="mapValue[{{index}}]" data-tests-id="value" type="text" style="width:97%; height: 100%;border: none; padding:0 5px;">
</th>
<th style="height: 30px; display: flex; align-items: baseline;">
- <button mat-icon-button [ngStyle]="hoveredIndex === index ? {'opacity':'1'} : {'opacity':'0'}" class="button-remove" (click)="removeMapRow(index)"
- *ngIf="action.map.values.length > 1" style="height: 24px; width: 24px; display:flex; box-shadow: none;">
+ <button mat-icon-button data-tests-id="btn-remove-row" [ngStyle]="hoveredIndex === index ? {'opacity':'1'} : {'opacity':'0'}"
+ class="button-remove" (click)="removeMapRow(index)" *ngIf="action.map.values.length > 1" style="height: 24px; width: 24px; display:flex; box-shadow: none;">
<mat-icon class="md-24">delete</mat-icon>
</button>
</th>
@@ -102,8 +197,9 @@
<div style="display:flex; justify-content: space-between;">
<div style="display: flex; align-items: center;">
- <button mat-mini-fab color="primary" (click)="addMapRow()" style="height: 24px; width: 24px; display:flex; box-shadow: none;">
- <mat-icon>add</mat-icon>
+ <button mat-mini-fab color="primary" (click)="addMapRow()" data-tests-id="btn-add-row" style="height: 16px; width: 16px; display:flex; box-shadow: none;">
+ <span style="padding-left: 2px; display: flex; justify-content: center; align-items: center" [innerHTML]="'plus' | feather:12"></span>
+ <!-- <mat-icon>add</mat-icon> -->
</button>
<span style="color: #009FDB; display: flex; justify-content: center; padding-left: 6px">Add Row</span>
</div>
diff --git a/public/src/app/rule-engine/action/action.component.scss b/public/src/app/rule-engine/action/action.component.scss
index f903db4..fc36380 100644
--- a/public/src/app/rule-engine/action/action.component.scss
+++ b/public/src/app/rule-engine/action/action.component.scss
@@ -4,7 +4,7 @@
width: 100%;
height: 100%;
justify-content: space-between;
- margin: 10px 0;
+ margin-top: 10px;
.black {
color: black;
}
@@ -25,9 +25,12 @@
justify-content: center;
min-width: 142px;
}
+ .center-content-item {
+ width: 100%;
+ }
}
.map-container {
- padding-left: 115px;
+ padding-left: 172px;
.default {
display: flex;
width: 100%;
@@ -82,7 +85,7 @@
display: flex;
flex-direction: column;
padding: 0 10px;
- .from-conatiner {
+ .from-container {
display: flex;
flex-direction: column;
align-items: flex-start;
@@ -114,3 +117,17 @@
color: #009fdb;
}
}
+
+.action-container {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-end;
+}
+.action-item {
+ width: 100%;
+ margin-top: 0.5em;
+}
+.label .action-item-label {
+ padding: 0 5px;
+ width: 110px;
+}
diff --git a/public/src/app/rule-engine/action/action.component.ts b/public/src/app/rule-engine/action/action.component.ts
index 9c7023f..1a62e1a 100644
--- a/public/src/app/rule-engine/action/action.component.ts
+++ b/public/src/app/rule-engine/action/action.component.ts
@@ -27,9 +27,12 @@ export class ActionComponent implements OnInit {
if (this.action.from !== '') {
console.log('Action %o', this.action);
this.fromInstance.updateMode(this.action.from);
+ }
+ if (this.action.target !== '') {
this.targetInstance.updateMode(this.action);
}
}
+
updateFrom(data) {
this.action.from = data;
}
diff --git a/public/src/app/rule-engine/api/rule-engine-api.service.spec.ts b/public/src/app/rule-engine/api/rule-engine-api.service.spec.ts
deleted file mode 100644
index e15535b..0000000
--- a/public/src/app/rule-engine/api/rule-engine-api.service.spec.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { TestBed, inject } from '@angular/core/testing';
-import { HttpModule } from '@angular/http';
-import { RuleEngineApiService } from './rule-engine-api.service';
-
-describe('RuleEngineApiService', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [HttpModule],
- providers: [RuleEngineApiService]
- });
- });
-
- it(
- 'should be created',
- inject([RuleEngineApiService], (service: RuleEngineApiService) => {
- expect(service).toBeTruthy();
- })
- );
-});
diff --git a/public/src/app/rule-engine/api/rule-engine-api.service.ts b/public/src/app/rule-engine/api/rule-engine-api.service.ts
index 0d7ab5e..7bf5e18 100644
--- a/public/src/app/rule-engine/api/rule-engine-api.service.ts
+++ b/public/src/app/rule-engine/api/rule-engine-api.service.ts
@@ -1,17 +1,17 @@
-import { Injectable, EventEmitter } from '@angular/core';
+import { Injectable } from '@angular/core';
import {
- Http,
- Response,
Headers,
+ Http,
RequestOptions,
+ Response,
URLSearchParams
} from '@angular/http';
-import { Observable, Subject } from 'rxjs/Rx';
+import 'rxjs/add/operator/catch';
// Import RxJs required methods
import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/catch';
-import { environment } from '../../../environments/environment';
+import { Observable, Subject } from 'rxjs/Rx';
import { v4 as uuid } from 'uuid';
+import { environment } from '../../../environments/environment';
@Injectable()
export class RuleEngineApiService {
@@ -25,6 +25,7 @@ export class RuleEngineApiService {
flowType: string;
editorData: Subject<any> = new Subject();
updateVersionLock: Subject<any> = new Subject();
+ tabIndex: Subject<any> = new Subject();
constructor(private http: Http) {
this.baseUrl = `${environment.apiBaseUrl}/rule-editor`;
@@ -108,16 +109,35 @@ export class RuleEngineApiService {
});
}
- translate() {
- const url = `${this.baseUrl}/rule/translate/${this.vfcmtUuid}/${
- this.dcaeCompName
- }/${this.nid}/${this.configParam}`;
+ translate(nofityId) {
+ const url = `${this.baseUrl}/rule/translate`;
+ const params = {
+ vfcmtUuid: this.vfcmtUuid,
+ dcaeCompLabel: this.dcaeCompName,
+ nid: this.nid,
+ configParam: this.configParam,
+ flowType: this.flowType,
+ notifyId: nofityId
+ };
+ this.options.headers.set('X-ECOMP-RequestID', uuid());
+ // const params = new URLSearchParams(); params.append('flowType',
+ // this.flowType); const options = { ...this.options, params: params };
+ return this.http
+ .post(url, params, this.options)
+ .map(response => response.json())
+ .catch((error: any) => {
+ return Observable.throw(error.json().requestError || 'Server error');
+ });
+ }
+
+ generateMappingRulesFileName(dcaeCompLabel, nid, vfcmtUuid) {
+ const url = `${
+ this.baseUrl
+ }/getExistingRuleTargets/${vfcmtUuid}/${dcaeCompLabel}/${nid}`;
this.options.headers.set('X-ECOMP-RequestID', uuid());
const params = new URLSearchParams();
- params.append('flowType', this.flowType);
- const options = { ...this.options, params: params };
return this.http
- .get(url, options)
+ .get(url, this.options)
.map(response => response.json())
.catch((error: any) => {
return Observable.throw(error.json().requestError || 'Server error');
@@ -131,4 +151,8 @@ export class RuleEngineApiService {
callUpdateVersionLock() {
this.updateVersionLock.next();
}
+
+ callUpdateTabIndex(index) {
+ this.tabIndex.next(index);
+ }
}
diff --git a/public/src/app/rule-engine/condition/condition.component.html b/public/src/app/rule-engine/condition/condition.component.html
index a441f55..0ff244b 100644
--- a/public/src/app/rule-engine/condition/condition.component.html
+++ b/public/src/app/rule-engine/condition/condition.component.html
@@ -18,7 +18,7 @@
<div style="display: flex; margin-left: auto;">
<div style="display: flex; align-items: center; padding: 0 25px;">
- <button mat-mini-fab color="primary" (click)="addConditional(tree, node)" style="height: 24px; width: 24px; display:flex; box-shadow: none;">
+ <button mat-mini-fab color="primary" data-tests-id="addCondition" (click)="addConditional(tree, node)" style="height: 24px; width: 24px; display:flex; box-shadow: none;">
<mat-icon class="material-icons md-18">add</mat-icon>
</button>
<span class="btn-label">Add Condition
@@ -36,7 +36,7 @@
</div>
<div style="display: flex; align-items: center; padding: 0 5px; background: #FFFFFF;">
- <button mat-icon-button (click)="removeConditional(tree, node)" class="button-remove">
+ <button data-tests-id="removeConditionNode" mat-icon-button (click)="removeConditional(tree, node)" class="button-remove">
<mat-icon class="md-24">delete</mat-icon>
</button>
</div>
@@ -77,7 +77,7 @@
</div>
<!-- remove button -->
<div class="show-delete">
- <button mat-icon-button (click)="removeConditional(tree, node)" class="button-remove">
+ <button mat-icon-button data-tests-id="RemoveCondition" (click)="removeConditional(tree, node)" class="button-remove">
<mat-icon class="md-24">delete</mat-icon>
</button>
</div>
diff --git a/public/src/app/rule-engine/condition/condition.component.spec.ts b/public/src/app/rule-engine/condition/condition.component.spec.ts
deleted file mode 100644
index bb0d38a..0000000
--- a/public/src/app/rule-engine/condition/condition.component.spec.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { DebugElement } from '@angular/core';
-import { FormsModule } from '@angular/forms';
-import { HttpModule } from '@angular/http';
-import {
- MatDialogModule,
- MatButtonModule,
- MatIconModule,
- MatDialogRef,
- MAT_DIALOG_DATA
-} from '@angular/material';
-
-import { ConditionComponent } from './condition.component';
-
-describe('Condition Component', () => {
- let component: ConditionComponent;
- let fixture: ComponentFixture<ConditionComponent>;
- let de: DebugElement;
- let el: HTMLElement;
-
- beforeEach(
- async(() => {
- TestBed.configureTestingModule({
- imports: [
- FormsModule,
- HttpModule,
- MatDialogModule,
- MatButtonModule,
- MatIconModule
- ],
- providers: [],
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
- declarations: [ConditionComponent]
- }).compileComponents();
- })
- );
-
- beforeEach(() => {
- // create component and test fixture
- fixture = TestBed.createComponent(ConditionComponent);
- // get test component from the fixture
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should be created', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/public/src/app/rule-engine/confirm-popup/confirm-popup.component.html b/public/src/app/rule-engine/confirm-popup/confirm-popup.component.html
index 49c800a..837e0f8 100644
--- a/public/src/app/rule-engine/confirm-popup/confirm-popup.component.html
+++ b/public/src/app/rule-engine/confirm-popup/confirm-popup.component.html
@@ -1,12 +1,36 @@
-<div class="container" data-tests-id="delete-popup">
+<div class="container-popup" data-tests-id="delete-popup">
<div class="header">
- Delete
+ <div style="display: flex; width:100%;">
+ <span style="color: #CF2A2A;
+ padding-right: 15px;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;" [innerHTML]="'x-circle' | feather:28"></span>
+ <span style="font-family: 'Open Sans', sans-serif;
+ font-size: 24px; width: 100%;">
+ Delete
+ </span>
+ <span style="
+ height: 100%;
+ display: flex;
+ color:rgb(90, 90, 90);
+ justify-content: center;
+ align-items: center;" [innerHTML]="'x' | feather:20" (click)="close(false)"></span>
+ </div>
</div>
- <div class="content">
+ <div class="content" style="padding: 0 0 20px 50px; font-family: 'Open Sans', sans-serif; font-size: 14px;">
Are you sure you want to delete?
</div>
<div class="buttons">
- <button mat-raised-button (click)="close(true)" data-tests-id="btnDelete" style="margin-right: 1rem;" color="primary">Delete</button>
- <button mat-raised-button (click)="close(false)" data-tests-id="btnCancel" style="border: 1px solid #009FDB; color: #009FDB; background: #ffffff;">Cancel</button>
+
+ <button mat-raised-button color="primary" style="background-color: #CF2A2A; margin-right: 10px; font-size: 14px; font-family: 'Open Sans', sans-serif; height: 36px; color:white;"
+ (click)="close(true)" data-tests-id="btnDelete">
+ DELETE
+ </button>
+ <button mat-raised-button class="btn-secondry" style="border-color: #CF2A2A !important; color:#CF2A2A !important; font-size: 14px; font-family: 'Open Sans', sans-serif;text-align: center; height: 36px;"
+ (click)="close(false)" data-tests-id="btnCancel">
+ CANCEL
+ </button>
</div>
</div>
diff --git a/public/src/app/rule-engine/confirm-popup/confirm-popup.component.scss b/public/src/app/rule-engine/confirm-popup/confirm-popup.component.scss
index 2a826ff..4e3539d 100644
--- a/public/src/app/rule-engine/confirm-popup/confirm-popup.component.scss
+++ b/public/src/app/rule-engine/confirm-popup/confirm-popup.component.scss
@@ -1,10 +1,19 @@
-.container {
+.my-confrim-dialog .mat-dialog-container {
+ height: 180px;
+}
+
+.container-popup {
display: flex;
justify-content: space-between;
+ flex-direction: column;
margin: 0 !important;
- border-top: solid 6px #ffb81c;
+ border-top: solid 6px #cf2a2a;
.header {
border-bottom: none;
+ padding-top: 15px;
+ padding-left: 20px;
+ padding-right: 12px;
+ padding-bottom: 0;
}
.content {
margin: 1rem;
diff --git a/public/src/app/rule-engine/confirm-popup/confirm-popup.component.ts b/public/src/app/rule-engine/confirm-popup/confirm-popup.component.ts
index 23b6cee..d65cc5b 100644
--- a/public/src/app/rule-engine/confirm-popup/confirm-popup.component.ts
+++ b/public/src/app/rule-engine/confirm-popup/confirm-popup.component.ts
@@ -1,10 +1,11 @@
-import { Component, Inject } from '@angular/core';
+import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
@Component({
selector: 'app-confirm-popup',
templateUrl: './confirm-popup.component.html',
- styleUrls: ['./confirm-popup.component.scss']
+ styleUrls: ['./confirm-popup.component.scss'],
+ encapsulation: ViewEncapsulation.None
})
export class ConfirmPopupComponent {
constructor(
diff --git a/public/src/app/rule-engine/from/from.component.html b/public/src/app/rule-engine/from/from.component.html
index 7af653d..df2c110 100644
--- a/public/src/app/rule-engine/from/from.component.html
+++ b/public/src/app/rule-engine/from/from.component.html
@@ -1,6 +1,6 @@
<form #fromFrm="ngForm" novalidate>
<!-- Copy template -->
- <div class="from" *ngIf="actionType === 'copy'" data-tests-id="fromComponent">
+ <div class="from" *ngIf="actionType === 'copy' || actionType === 'replace text' || actionType === 'log text'" data-tests-id="fromComponent">
<div class="from-conatiner">
<div style="display: flex; align-items: center; width: 100%;" class="label">
<span class="label" style="padding: 0 5px; width: 50px;">From</span>
@@ -38,6 +38,39 @@
</div>
</div>
+ <!-- clear template -->
+ <div class="from" *ngIf="actionType === 'clear'" ngModelGroup="clear" #clearFrom="ngModelGroup">
+ <div *ngFor="let input of from.values; let index = index;" data-tests-id="clearInputArrayFrom" (mouseleave)="hoveredIndex=-1"
+ (mouseover)="hoveredIndex=index" class="from-conatiner" style="margin-bottom:1rem; display: flex; flex-direction: column; align-items: flex-start;"
+ data-tests-id="fromComponent">
+ <div style="display: flex; align-items: center; width: 100%;">
+ <div style="display: flex; align-items: center; width: 100%;" class="label">
+ <span class="label" style="padding: 0 5px; width: 50px;">From</span>
+ <input class="input-text" (ngModelChange)="modelChange(from)" [(ngModel)]="input.value" type="text" data-tests-id="valueInput"
+ ngModel required name="clear[{{index}}]">
+ </div>
+
+ <button mat-icon-button class="button-remove" [ngStyle]="hoveredIndex === index ? {'opacity':'1'} : {'opacity':'0'}" (click)="removeFromInput(index)"
+ *ngIf="from.values.length > 1" style="box-shadow: none; height: 24px; width: 24px; display:flex" data-tests-id="btnDelete">
+ <mat-icon class="md-24">delete</mat-icon>
+ </button>
+ </div>
+
+ </div>
+ <div style="display:flex; justify-content: space-between;">
+ <div style="display: flex; align-items: center;">
+ <button mat-mini-fab color="primary" (click)="addFromInput()" style="box-shadow: none; height: 16px; width: 16px; display:flex"
+ data-tests-id="btnAddInput">
+ <span style="padding-left: 2px; display: flex; justify-content: center; align-items: center" [innerHTML]="'plus' | feather:12"></span>
+<!--
+ <mat-icon>add</mat-icon> -->
+ </button>
+ <span style="color: #009FDB; display: flex; justify-content: center; padding-left: 6px">Add input</span>
+ </div>
+ </div>
+ </div>
+
+
<!-- Concat template -->
<div class="from" *ngIf="actionType === 'concat'" ngModelGroup="concat" #concatFrom="ngModelGroup">
<div *ngFor="let input of from.values; let index = index;" data-tests-id="concatInputArrayFrom" (mouseleave)="hoveredIndex=-1"
@@ -59,11 +92,12 @@
</div>
<div style="display:flex; justify-content: space-between;">
<div style="display: flex; align-items: center;">
- <button mat-mini-fab color="primary" (click)="addFromInput()" style="box-shadow: none; height: 24px; width: 24px; display:flex"
+ <button mat-mini-fab color="primary" (click)="addFromInput()" style="box-shadow: none; height: 16px; width: 16px; display:flex"
data-tests-id="btnAddInput">
- <mat-icon>add</mat-icon>
+ <span style="padding-left: 2px; display: flex; justify-content: center; align-items: center" [innerHTML]="'plus' | feather:12"></span>
+ <!-- <mat-icon>add</mat-icon> -->
</button>
- <span style="color: #009FDB; display: flex; justify-content: center; padding-left: 6px">Add input</span>
+ <span style="color: #009FDB; display: flex; justify-content: center; padding-top: 1px; padding-left: 6px;">Add input</span>
</div>
</div>
</div>
diff --git a/public/src/app/rule-engine/from/from.component.ts b/public/src/app/rule-engine/from/from.component.ts
index e7c276b..bc1dedb 100644
--- a/public/src/app/rule-engine/from/from.component.ts
+++ b/public/src/app/rule-engine/from/from.component.ts
@@ -64,6 +64,12 @@ export class FromComponent {
hoveredIndex;
// public keyUp = new BehaviorSubject<string>(null);
+ ngOnInit(): void {
+ if (this.actionType === 'clear') {
+ this.from.values = [{ value: '' }];
+ }
+ }
+
showRegex(item) {
item.state = item.state === 'closed' ? 'open' : 'closed';
if (item.state === 'closed') {
diff --git a/public/src/app/rule-engine/host/exit-mode.enum.ts b/public/src/app/rule-engine/host/exit-mode.enum.ts
deleted file mode 100644
index 784ba3b..0000000
--- a/public/src/app/rule-engine/host/exit-mode.enum.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export enum ExitMode {
- Done,
- Cancel
-}
diff --git a/public/src/app/rule-engine/host/host-params.ts b/public/src/app/rule-engine/host/host-params.ts
deleted file mode 100644
index f204101..0000000
--- a/public/src/app/rule-engine/host/host-params.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface HostParams {
- readonly vfcmtUuid: string;
- readonly nodeName: string;
- readonly nodeId: string;
- readonly fieldName: string;
- readonly userId: string;
- readonly flowType: string;
-}
diff --git a/public/src/app/rule-engine/host/host.service.spec.ts b/public/src/app/rule-engine/host/host.service.spec.ts
deleted file mode 100644
index 048be80..0000000
--- a/public/src/app/rule-engine/host/host.service.spec.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { TestBed, inject } from '@angular/core/testing';
-
-import { HostService } from './host.service';
-
-describe('HostService', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- providers: [HostService]
- });
- });
-
- it(
- 'should be created',
- inject([HostService], (service: HostService) => {
- expect(service).toBeTruthy();
- })
- );
-});
diff --git a/public/src/app/rule-engine/host/host.service.ts b/public/src/app/rule-engine/host/host.service.ts
deleted file mode 100644
index 7918d30..0000000
--- a/public/src/app/rule-engine/host/host.service.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HostParams } from './host-params';
-import { ExitMode } from './exit-mode.enum';
-
-@Injectable()
-export class HostService {
- /* Public Members */
-
- public static getParams(): HostParams {
- return this.getQueryParamsObj(window.location.search) as HostParams;
- }
-
- public static enterModifyRule(): void {
- this.postMessage('modifyRule', null);
- }
-
- public static exitModifyRule(): void {
- this.postMessage('ruleList', null);
- }
-
- public static disableLoader(): void {
- this.postMessage('disable-loader', null);
- }
-
- public static exit(mode: ExitMode, data: string): void {
- if (mode === ExitMode.Cancel) {
- this.postMessage('exit', null);
- } else if (mode === ExitMode.Done) {
- this.postMessage('exit', data);
- }
- }
-
- /* Private Methods */
-
- private static postMessage(eventName: string, data: string): void {
- window.parent.postMessage(
- {
- type: eventName,
- data: data
- },
- '*'
- );
- }
-
- private static getQueryParamsObj(query: string): object {
- return query
- .substring(1) // removes '?' that always appears as prefix to the query-string
- .split('&') // splits query-string to "key=value" strings
- .map(p => p.split('=')) // splits each "key=value" string to [key,value] array
- .reduce((res, p) => {
- // converts to a dictionary (object) of params
- res[p[0]] = p[1];
- return res;
- }, {});
- }
-}
diff --git a/public/src/app/rule-engine/rule-list/rule-list.component.html b/public/src/app/rule-engine/rule-list/rule-list.component.html
index c68c706..4ce6efb 100644
--- a/public/src/app/rule-engine/rule-list/rule-list.component.html
+++ b/public/src/app/rule-engine/rule-list/rule-list.component.html
@@ -1,8 +1,8 @@
<div class="container">
<div class="header">
- <span style="font-size: 18px;">Rule Engine</span>
+ <span style="font-size: 18px; margin-left:20px;">Rule Engine</span>
<div style="display:flex">
- <button mat-raised-button (click)="translateRules()" color="primary" [disabled]="store.ruleList.length === 0" style="margin-left: 20px;"
+ <button mat-raised-button (click)="translateRules()" color="primary" [disabled]="store.ruleList.length === 0" style="margin-right: 10px; width: 113px;height: 36px;"
data-tests-id="btnTranslate">
Translate
</button>
@@ -20,6 +20,35 @@
<app-version-type-select #versionEventType [versions]="versions" [metaData]="metaData" (nodesUpdated)="handleUpdateNode($event)"
(refrashRuleList)="handlePropertyChange()"></app-version-type-select>
+ <!-- <div class="container-phase-notify">
+ <div>
+ <span class="field-label required" style="margin-right: 10px;">
+ phase
+ </span>
+ <select name="phase" [(ngModel)]="phase" data-tests-id="phase" style="height: 27px; padding: 0.3rem; margin-right: 18px;"
+ class="field-select">
+ <option [ngValue]="null" disabled>Select phase</option>
+ </select>
+ </div>
+
+ <div class="default" style="display: flex; align-items: center">
+ <div class="pretty p-svg">
+ <input type="checkbox" name="notifyCheckbox" data-tests-id="notifyCheckbox" />
+ <div class="state">
+ <svg class="svg svg-icon" viewBox="0 0 20 20">
+ <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z"
+ style="stroke: #009fdb; fill:#009fdb;"></path>
+ </svg>
+ <label>notify OID</label>
+ </div>
+ </div>
+ <div class="input-wrapper">
+ <input type="text" ngModel required name="notify-oid" data-tests-id="notify-oid" class="input">
+ </div>
+ </div>
+
+ </div> -->
+
<div *ngIf="targetSource && store.ruleList.length === 0" style="margin: 30px 0; display: flex; align-items: center; justify-content: center; flex-direction: column;">
<div style="margin: 3em 0 2em 0;">
@@ -40,9 +69,6 @@
</div>
<div *ngIf="store.ruleList.length > 0">
- <div style="padding: 10px 0;">
- Rules
- </div>
<div style="display: flex; align-items: center;">
<button mat-mini-fab color="primary" id="addMoreRule" data-tests-id="addMoreRule" style="height: 24px; width: 24px; display:flex"
(click)="openAction()">
diff --git a/public/src/app/rule-engine/rule-list/rule-list.component.scss b/public/src/app/rule-engine/rule-list/rule-list.component.scss
index c4aee05..6446fbd 100644
--- a/public/src/app/rule-engine/rule-list/rule-list.component.scss
+++ b/public/src/app/rule-engine/rule-list/rule-list.component.scss
@@ -4,30 +4,30 @@
height: 100%;
display: flex;
flex-direction: column;
-
+ margin: 0;
+ padding: 0;
.header {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
color: #191919;
- border-bottom: 2px solid #d2d2d2;
- padding-bottom: 0.5rem;
- margin: 1rem;
+ border-bottom: 1px solid #d2d2d2;
+ padding-bottom: 5px;
+ margin: 8px 0;
}
-
.item {
border: 1px solid #d2d2d2;
padding: 0 10px;
height: 40px;
}
-
.mat-fab,
.mat-mini-fab,
.mat-raised-button {
box-shadow: none;
}
}
+
.my-full-screen-dialog .mat-dialog-container {
max-width: none;
width: 100vw;
@@ -46,7 +46,6 @@
display: flex !important;
justify-content: center !important;
color: #d2d2d2 !important;
-
&:hover {
color: #009fdb !important;
}
@@ -68,6 +67,7 @@
.mat-mini-fab .mat-button-wrapper {
padding: 0 !important;
}
+
.mat-icon {
// width: 18px;
// height: 18px;
@@ -75,35 +75,45 @@
justify-content: center !important;
align-items: center !important;
}
+
/* Rules for sizing the icon. */
+
.material-icons.md-18 {
font-size: 18px;
}
+
.material-icons.md-24 {
font-size: 24px;
}
+
.material-icons.md-30 {
font-size: 30px;
}
+
.material-icons.md-36 {
font-size: 36px;
}
+
.material-icons.md-48 {
font-size: 48px;
}
/* Rules for using icons as black on a light background. */
+
.material-icons.md-dark {
color: rgba(0, 0, 0, 0.54);
}
+
.material-icons.md-dark.md-inactive {
color: rgba(0, 0, 0, 0.26);
}
/* Rules for using icons as white on a dark background. */
+
.material-icons.md-light {
color: rgba(255, 255, 255, 1);
}
+
.material-icons.md-light.md-inactive {
color: rgba(255, 255, 255, 0.3);
}
diff --git a/public/src/app/rule-engine/rule-list/rule-list.component.ts b/public/src/app/rule-engine/rule-list/rule-list.component.ts
index 45cfbd0..2857ea2 100644
--- a/public/src/app/rule-engine/rule-list/rule-list.component.ts
+++ b/public/src/app/rule-engine/rule-list/rule-list.component.ts
@@ -1,12 +1,11 @@
-import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
+import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog } from '@angular/material';
-import { ActionListComponent } from '../action-list/action-list.component';
-import { RuleEngineApiService } from '../api/rule-engine-api.service';
-import { ConfirmPopupComponent } from '../confirm-popup/confirm-popup.component';
-import { Store } from '../../store/store';
import { isEmpty } from 'lodash';
import { ToastrService } from 'ngx-toastr';
import { timer } from 'rxjs/observable/timer';
+import { Store } from '../../store/store';
+import { RuleEngineApiService } from '../api/rule-engine-api.service';
+import { ConfirmPopupComponent } from '../confirm-popup/confirm-popup.component';
const primaryColor = '#009fdb';
@@ -58,7 +57,11 @@ export class RuleListComponent {
);
this.store.updateRuleList(Object.values(response.rules));
this.targetSource = response.schema;
+ this.store.notifyIdValue = response.notifyId;
+ this.versionType.notifyIdCheckbox =
+ response.notifyId !== '' ? true : false;
} else {
+ this.versionType.notifyIdCheckbox = false;
this.store.resetRuleList();
this.versionType.updateVersionTypeFlag(false);
this.targetSource = null;
@@ -83,20 +86,29 @@ export class RuleListComponent {
private toastr: ToastrService,
public store: Store
) {
- this.store.loader = true;
- this.params = {
- vfcmtUuid: this.store.mcUuid,
- nodeName: this.store.tabParmasForRule[0].name,
- nodeId: this.store.tabParmasForRule[0].nid,
- fieldName: this.store.configurationForm[0].name,
- userId: 'ym903w', // this.store.sdcParmas.userId
- flowType: this.store.cdump.flowType
- };
- console.log('params: %o', this.params);
- this.store.loader = true;
- // set api params by iframe url query
- this._ruleApi.setParams(this.params);
- this.getListOfRules();
+ this.store.loader = false;
+ this._ruleApi.tabIndex.subscribe(index => {
+ console.log('rule index in rule-list component:', index);
+ const tabName = this.store.cdump.nodes[index].name;
+ console.log('tab name:', tabName);
+
+ if (tabName.toLowerCase().includes('map')) {
+ this.params = {
+ vfcmtUuid: this.store.mcUuid,
+ nodeName: this.store.tabParmasForRule[0].name,
+ nodeId: this.store.tabParmasForRule[0].nid,
+ fieldName: this.store.tabsProperties[index][0].name,
+ userId: this.store.sdcParmas.userId,
+ flowType: this.store.cdump.flowType
+ };
+ console.log('params: %o', this.params);
+ this.store.loader = true;
+ // set api params by iframe url query
+ this._ruleApi.setParams(this.params);
+ store.ruleListExistParams = this.params;
+ this.getListOfRules();
+ }
+ });
}
handlePropertyChange() {
@@ -108,7 +120,8 @@ export class RuleListComponent {
translateRules() {
this.store.loader = true;
// send translate JSON
- this._ruleApi.translate().subscribe(
+ const nofityId = this.store.notifyIdValue;
+ this._ruleApi.translate(nofityId).subscribe(
data => {
this.store.loader = false;
console.log(JSON.stringify(data));
@@ -116,7 +129,7 @@ export class RuleListComponent {
this.store.configurationForm.forEach(property => {
console.log('mappingTarget ', this.versionType.mappingTarget);
if (property.name === this.versionType.mappingTarget) {
- property.assignment.value = JSON.stringify(data);
+ property.value = JSON.stringify(data);
domElementName = property.name;
console.log(property.name);
}
diff --git a/public/src/app/rule-engine/target/target.component.html b/public/src/app/rule-engine/target/target.component.html
index 7a321ef..d643ad8 100644
--- a/public/src/app/rule-engine/target/target.component.html
+++ b/public/src/app/rule-engine/target/target.component.html
@@ -7,7 +7,7 @@
<img src="{{imgBase}}/target.svg" alt="target">
</span>
</div>
- <div class="bottom-select" *ngIf="showOption" [@toggleDropdown]>
+ <div class="bottom-select" *ngIf="showOption">
<div class="filter-container" style="display: flex; border-bottom: 1px solid #F2F2F2;margin-bottom: 1rem; width:100%;">
<input id="filter" #filter class="filter" (keyup)="tree.treeModel.filterNodes(filter.value)" placeholder="Search..." />
<button mat-raised-button style="min-width: 18px; box-shadow: none; display: flex; justify-content: center;" (click)="tree.treeModel.clearFilter(); filter.value = ''">
diff --git a/public/src/app/rule-engine/target/target.component.spec.ts b/public/src/app/rule-engine/target/target.component.spec.ts
index 6ddd8cd..e9a69c8 100644
--- a/public/src/app/rule-engine/target/target.component.spec.ts
+++ b/public/src/app/rule-engine/target/target.component.spec.ts
@@ -1,10 +1,9 @@
-import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { DebugElement } from '@angular/core';
+import { CUSTOM_ELEMENTS_SCHEMA, DebugElement } from '@angular/core';
+import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatButtonModule, MatIconModule } from '@angular/material';
+import { By } from '@angular/platform-browser';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
// component
import { TargetComponent } from './target.component';
@@ -46,12 +45,28 @@ describe('TargetComponent', () => {
const openTargetElement = fixture.debugElement
.query(By.css('span[data-tests-id=openTargetTree]'))
.nativeElement.click();
-
fixture.detectChanges();
-
const treeContainer = fixture.debugElement.query(
By.css('.filter-container')
);
expect(treeContainer).not.toBeNull();
});
+
+ it('should toggle target tree when clicking 2 times on button', () => {
+ fixture.debugElement
+ .query(By.css('span[data-tests-id=openTargetTree]'))
+ .nativeElement.click();
+ fixture.detectChanges();
+ fixture.debugElement
+ .query(By.css('span[data-tests-id=openTargetTree]'))
+ .nativeElement.click();
+ fixture.detectChanges();
+ const treeContainer = fixture.debugElement.query(
+ By.css('.filter-container')
+ );
+ expect(treeContainer).toBeNull();
+ });
+
+ // it('check when input change', () => { tree.setData({nodes: _nodes, options:
+ // null, events: null}); component.filterFn('liav', tree); });
});
diff --git a/public/src/app/rule-engine/target/target.component.ts b/public/src/app/rule-engine/target/target.component.ts
index f17cdef..c9aa75c 100644
--- a/public/src/app/rule-engine/target/target.component.ts
+++ b/public/src/app/rule-engine/target/target.component.ts
@@ -7,13 +7,8 @@ import {
EventEmitter
} from '@angular/core';
import { TreeModel, TreeComponent, ITreeOptions } from 'angular-tree-component';
-import {
- trigger,
- state,
- animate,
- transition,
- style
-} from '@angular/animations';
+// import {trigger, state, animate, transition, style} from
+// '@angular/animations';
import { fuzzysearch, getBranchRequierds, validation } from './target.util';
import { environment } from '../../../environments/environment';
import { NgForm } from '@angular/forms';
@@ -22,24 +17,15 @@ import { NgForm } from '@angular/forms';
selector: 'app-target',
templateUrl: './target.component.html',
styleUrls: ['./target.component.scss'],
- encapsulation: ViewEncapsulation.None,
- animations: [
- trigger('toggleDropdown', [
- transition('void => *', [
- style({ opacity: 0, offset: 0, height: 0 }),
- animate('300ms cubic-bezier(0.17, 0.04, 0.03, 0.94)')
- ]),
- transition('* => void', [
- style({ opacity: 1, offset: 1, height: 'auto' }),
- animate('100ms cubic-bezier(0.17, 0.04, 0.03, 0.94)')
- ])
- ])
- ]
+ encapsulation: ViewEncapsulation.None
})
export class TargetComponent {
imgBase = environment.imagePath;
showOption = false;
- selectedNode = { name: '', id: '' };
+ selectedNode = {
+ name: '',
+ id: ''
+ };
@Input() nodes;
@Output() onTargetChange = new EventEmitter();
@ViewChild(TreeComponent) private tree: TreeComponent;
diff --git a/public/src/app/rule-engine/target/target.validation.spec.ts b/public/src/app/rule-engine/target/target.validation.spec.ts
index 71dc083..e66235f 100644
--- a/public/src/app/rule-engine/target/target.validation.spec.ts
+++ b/public/src/app/rule-engine/target/target.validation.spec.ts
@@ -1,8 +1,7 @@
-import { TestBed, async } from '@angular/core/testing';
-import { TreeModel, TreeComponent, ITreeOptions } from 'angular-tree-component';
-import { validation, getBranchRequierds } from './target.util';
+import { TreeModel } from 'angular-tree-component';
+import { fuzzysearch, getBranchRequierds, validation } from './target.util';
-const _nodes = [
+export const _nodes = [
{
id: 1,
name: 'North America',
@@ -13,46 +12,68 @@ const _nodes = [
name: 'United States',
requiredChildren: ['New York', 'Florida'],
children: [
- { id: 111, name: 'New York' },
- { id: 112, name: 'California' },
- { id: 113, name: 'Florida' }
+ {
+ id: 111,
+ name: 'New York'
+ },
+ {
+ id: 112,
+ name: 'California'
+ },
+ {
+ id: 113,
+ name: 'Florida'
+ }
]
},
- { id: 12, name: 'Canada' }
+ {
+ id: 12,
+ name: 'Canada'
+ }
]
},
{
name: 'South America',
- children: [{ name: 'Argentina', children: [] }, { name: 'Brazil' }]
+ children: [
+ {
+ name: 'Argentina',
+ children: []
+ },
+ {
+ name: 'Brazil'
+ }
+ ]
},
{
name: 'Europe',
children: [
- { name: 'England' },
- { name: 'Germany' },
- { name: 'France' },
- { name: 'Italy' },
- { name: 'Spain' }
+ {
+ name: 'England'
+ },
+ {
+ name: 'Germany'
+ },
+ {
+ name: 'France'
+ },
+ {
+ name: 'Italy'
+ },
+ {
+ name: 'Spain'
+ }
]
}
];
-const tree = new TreeModel();
+export const tree = new TreeModel();
describe('treeTest', () => {
beforeAll(() => {
- tree.setData({
- nodes: _nodes,
- options: null,
- events: null
- });
+ tree.setData({ nodes: _nodes, options: null, events: null });
});
- it('should return node branch requireds', () => {
- // console.log('root', tree.getFirstRoot().data.name);
- // console.log(tree.getNodeBy((node) => node.data.name === 'California').data.uuid);
- // console.log(tree.getNodeBy((node) => node.data.name === 'California').id);
- // console.log(tree.getNodeById(1));
+ it('should return node branch requireds toBeGreaterThan 1', () => {
const selectedNode = tree.getNodeBy(
node => node.data.name === 'California'
);
@@ -60,6 +81,14 @@ describe('treeTest', () => {
const expected = [['New York', 'Florida'], ['United States']];
expect(result.length).toBeGreaterThan(1);
+ });
+
+ it('should return node branch requireds', () => {
+ const selectedNode = tree.getNodeBy(
+ node => node.data.name === 'California'
+ );
+ const result = getBranchRequierds(selectedNode, []);
+ const expected = [['New York', 'Florida'], ['United States']];
expect(result).toEqual(expected);
});
@@ -67,9 +96,14 @@ describe('treeTest', () => {
const userSelect = ['Florida', 'New York', 'United States'];
const selectedNode = tree.getNodeBy(node => node.data.name === 'New York');
const result = validation(selectedNode, userSelect);
+ expect(result).toEqual([]);
+ });
+ it('should return empty array - success state lenght zero', () => {
+ const userSelect = ['Florida', 'New York', 'United States'];
+ const selectedNode = tree.getNodeBy(node => node.data.name === 'New York');
+ const result = validation(selectedNode, userSelect);
expect(result.length).toEqual(0);
- expect(result).toEqual([]);
});
it('should return validation array - missing required filed', () => {
@@ -80,4 +114,29 @@ describe('treeTest', () => {
expect(result).toEqual(expected);
});
+
+ it('fuzzysearch find match one char', () => {
+ const search = fuzzysearch('1', '1');
+ expect(search).toBe(true);
+ });
+
+ it('fuzzysearch find match string', () => {
+ const search = fuzzysearch('liav', 'liavEzar');
+ expect(search).toBe(true);
+ });
+
+ it('fuzzysearch not find match', () => {
+ const search = fuzzysearch('1', '2');
+ expect(search).toBe(false);
+ });
+
+ it('fuzzysearch not find match', () => {
+ const search = fuzzysearch('liavEzar', 'liav');
+ expect(search).toBe(false);
+ });
+
+ it('fuzzysearch not find match', () => {
+ const search = fuzzysearch('var', 'r2f44');
+ expect(search).toBe(false);
+ });
});
diff --git a/public/src/app/rule-engine/version-type-select/version-type-select.component.html b/public/src/app/rule-engine/version-type-select/version-type-select.component.html
index 79b9eae..74c55a8 100644
--- a/public/src/app/rule-engine/version-type-select/version-type-select.component.html
+++ b/public/src/app/rule-engine/version-type-select/version-type-select.component.html
@@ -1,34 +1,64 @@
<div class="selected-event">
- <div style="flex:1; display: flex; align-items: center;">
+ <div style="flex:1; display: flex; align-items: flex-end;">
- <span class="field-label required" style="margin-right: 10px;">Mapping Target</span>
- <select name="mappingTarget" [(ngModel)]="mappingTarget" (ngModelChange)="onChangeMapping($event)" data-tests-id="mappingDdl"
- style="height: 27px; padding: 0.3rem; margin-right: 18px;" class="field-select">
- <option [ngValue]="null" disabled>Select Mapping</option>
- <option *ngFor="let target of advancedSetting" [value]="target.name" data-tests-id="templateOptions">{{target.name}}</option>
- </select>
+ <div style="display:flex; flex-direction:column; margin-right: 25px;">
+ <span class="field-label required space-down" style="margin-right: 10px;">Mapping Target</span>
+ <select name="mappingTarget" [(ngModel)]="mappingTarget" (ngModelChange)="onChangeMapping($event)" data-tests-id="mappingDdl"
+ style="height: 35px; padding: 0.3rem; border: 1px solid #d2d2d2" class="field-select">
+ <option [ngValue]="null" disabled>Select Mapping</option>
+ <optgroup label="Rules Configured">
+ <option *ngFor="let target of advancedSetting" [hidden]="!target.isExist" [value]="target.name" data-tests-id="templateOptionsExist">{{target.name}}</option>
+ </optgroup>
+ <optgroup label="No Mapping Configuration">
+ <option *ngFor="let target of advancedSetting" [hidden]="target.isExist" [value]="target.name" data-tests-id="templateOptionsNotExist">{{target.name}}</option>
+ </optgroup>
+ </select>
+ </div>
- <span class="field-label required" style="font-size: 13px; margin-right: 10px; display: flex;
- align-items: center;" [ngClass]="{'required' : !readOnly}">
- Version
- </span>
- <select *ngIf="!readOnly" style="height: 27px; padding: 0.3rem; margin-right: 18px;" [(ngModel)]="selectedVersion" (ngModelChange)="onSelectVersion($event)"
- data-tests-id="selectVersion">
- <option [ngValue]="null" disabled>Select Version</option>
- <option *ngFor="let version of versions" [value]="version" data-tests-id="option">{{version}}</option>
- </select>
- <span *ngIf="readOnly" style="height: 27px; padding: 0.3rem; width:100px; margin-right: 18px; border: 1px solid #D2D2D2; display: flex; align-items: center; background: #F2F2F2">{{selectedVersion}}</span>
+ <div style="display:flex; flex-direction:column; margin-right: 25px;">
+ <span class="field-label required space-down" style="font-size: 13px; margin-right: 10px; display: flex;
+ align-items: center;" [ngClass]="{'required' : !readOnly}">
+ Version
+ </span>
+ <select *ngIf="!readOnly" style="height: 35px; padding: 0.3rem; border: 1px solid #d2d2d2" [(ngModel)]="selectedVersion" (ngModelChange)="onSelectVersion($event)"
+ data-tests-id="selectVersion">
+ <option [ngValue]="null" disabled>Select Version</option>
+ <option *ngFor="let version of versions" [value]="version" data-tests-id="option">{{version}}</option>
+ </select>
+ <span *ngIf="readOnly" style="height: 35px; padding: 0.3rem; width:100px; border: 1px solid #D2D2D2; display: flex; align-items: center; background: #F2F2F2">{{selectedVersion}}</span>
+ </div>
- <span class="field-label required" style="font-size: 13px; display: flex; align-items: center; width: 100px;" [ngClass]="{'required' : !readOnly}">
- Event Domain
- </span>
- <select *ngIf="!readOnly" style="height: 27px; padding: 0.3rem;" [(ngModel)]="selectedEvent" (ngModelChange)="onSelectEventType($event)"
- data-tests-id="selectEventType">
- <option [ngValue]="null" disabled>Select Type</option>
- <option *ngFor="let event of events" [value]="event" data-tests-id="option">{{event | slice:0:event.length-6}}</option>
- </select>
- <span *ngIf="readOnly" style="height: 27px; padding: 0.3rem; width:200px; border: 1px solid #D2D2D2; display: flex; align-items: center; background: #F2F2F2">{{selectedEvent | slice:0:selectedEvent.length-6}}</span>
+ <div style="display:flex; flex-direction:column; margin-right: 25px;">
+ <span class="field-label required space-down" style="font-size: 13px; display: flex; align-items: center; width: 100px;"
+ [ngClass]="{'required' : !readOnly}">
+ Event Domain
+ </span>
+ <select *ngIf="!readOnly" style="height: 35px; padding: 0.3rem; border: 1px solid #d2d2d2" [(ngModel)]="selectedEvent" (ngModelChange)="onSelectEventType($event)"
+ data-tests-id="selectEventType">
+ <option [ngValue]="null" disabled>Select Type</option>
+ <option *ngFor="let event of events" [value]="event" data-tests-id="option">{{event | slice:0:event.length-6}}</option>
+ </select>
+ <span *ngIf="readOnly" style="height: 35px; padding: 0.3rem; width:200px; border: 1px solid #D2D2D2; display: flex; align-items: center; background: #F2F2F2">{{selectedEvent | slice:0:selectedEvent.length-6}}</span>
+ </div>
+
+ <div class="notifyId" style="display: flex; flex-direction:column; margin-right:25px;">
+ <div class="pretty p-svg space-down">
+ <input type="checkbox" name="notifyIdCheckbox" data-tests-id="notifyIdCheckbox" [checked]="notifyIdCheckbox" (change)="changeNotifyId()"
+ />
+ <div class="state">
+ <!-- svg path -->
+ <svg class="svg svg-icon" viewBox="0 0 20 20">
+ <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z"
+ style="stroke: #009fdb; fill:#009fdb;"></path>
+ </svg>
+ <label style="margin-left: 5px;">Notify OID</label>
+ </div>
+ </div>
+ <div *ngIf="notifyIdCheckbox" class="input-wrapper">
+ <input type="text" ngModel required name="defaultInput" data-tests-id="defaultInput" [(ngModel)]="store.notifyIdValue" class="input">
+ </div>
+ </div>
</div>
</div>
diff --git a/public/src/app/rule-engine/version-type-select/version-type-select.component.scss b/public/src/app/rule-engine/version-type-select/version-type-select.component.scss
index 9f7bad3..1be996e 100644
--- a/public/src/app/rule-engine/version-type-select/version-type-select.component.scss
+++ b/public/src/app/rule-engine/version-type-select/version-type-select.component.scss
@@ -1,7 +1,6 @@
.selected-event {
display: flex;
- margin: 10px 0;
- // align-items: center;
+ // margin: 10px 0; // align-items: center;
flex-direction: column;
margin-bottom: 30px;
}
@@ -23,6 +22,20 @@
outline: none;
}
+.space-down {
+ margin-bottom: 5px;
+}
+
+.input-wrapper {
+ .input {
+ height: 35px;
+ border-radius: 2px;
+ padding: 5px;
+ width: 100%;
+ border: 1px solid #d2d2d2;
+ }
+}
+
.target-field {
width: 370px;
display: flex;
@@ -42,5 +55,6 @@
min-width: 250px;
padding: 5px 0 5px 5px;
margin: 0;
+ border: 1px solid #d2d2d2;
}
}
diff --git a/public/src/app/rule-engine/version-type-select/version-type-select.component.ts b/public/src/app/rule-engine/version-type-select/version-type-select.component.ts
index b4170a5..ff229cd 100644
--- a/public/src/app/rule-engine/version-type-select/version-type-select.component.ts
+++ b/public/src/app/rule-engine/version-type-select/version-type-select.component.ts
@@ -1,6 +1,6 @@
-import { Component, Output, EventEmitter, Input } from '@angular/core';
-import { RuleEngineApiService } from '../api/rule-engine-api.service';
+import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Store } from '../../store/store';
+import { RuleEngineApiService } from '../api/rule-engine-api.service';
@Component({
selector: 'app-version-type-select',
@@ -19,25 +19,60 @@ export class VersionTypeSelectComponent {
@Input() metaData;
@Output() nodesUpdated = new EventEmitter();
@Output() refrashRuleList = new EventEmitter();
- advancedSetting;
+ advancedSetting: Array<any>;
+ notifyIdCheckbox = false;
constructor(private _ruleApi: RuleEngineApiService, public store: Store) {
this.selectedVersion = null;
this.selectedEvent = null;
// set ddl with the first option value.
- this.mappingTarget = this.store.configurationForm[0].name;
- this.advancedSetting = this.store.configurationForm.filter(item => {
- if (
- !(
- item.hasOwnProperty('constraints') &&
- !item.assignment.value.includes('get_input')
- )
- ) {
- return item;
+
+ this._ruleApi.tabIndex.subscribe(index => {
+ console.log('rule index:', index);
+
+ const tabName = this.store.cdump.nodes[index].name;
+ console.log('tab name:', tabName);
+
+ if (tabName.toLowerCase().includes('map')) {
+ this.mappingTarget = this.store.tabsProperties[index][0].name;
+ this.advancedSetting = this.store.tabsProperties[index].filter(item => {
+ if (
+ !(
+ item.hasOwnProperty('constraints') &&
+ !item.value.includes('get_input')
+ )
+ ) {
+ return item;
+ }
+ });
+
+ this._ruleApi
+ .generateMappingRulesFileName(
+ this.store.ruleListExistParams.nodeName,
+ this.store.ruleListExistParams.nodeId,
+ this.store.ruleListExistParams.vfcmtUuid
+ )
+ .subscribe(response => {
+ console.log('generateMappingRulesFileName response: ', response);
+ this.advancedSetting.forEach(element => {
+ if (response.includes(element.name)) {
+ element.isExist = true;
+ } else {
+ element.isExist = false;
+ }
+ });
+ });
}
});
}
+ changeNotifyId() {
+ if (!this.notifyIdCheckbox) {
+ this.store.notifyIdValue = '';
+ }
+ return (this.notifyIdCheckbox = !this.notifyIdCheckbox);
+ }
+
onChangeMapping(configurationKey) {
console.log('changing propertiy key:', configurationKey);
this._ruleApi.setFieldName(configurationKey);
@@ -78,9 +113,7 @@ export class VersionTypeSelectComponent {
.subscribe(tree => {
console.log('tree: ', tree);
this.loader = false;
- this.nodesUpdated.emit({
- nodes: tree
- });
+ this.nodesUpdated.emit({ nodes: tree });
});
}
}
diff --git a/public/src/app/rule-frame/rule-frame.component.html b/public/src/app/rule-frame/rule-frame.component.html
index 10f3032..e0afa3d 100644
--- a/public/src/app/rule-frame/rule-frame.component.html
+++ b/public/src/app/rule-frame/rule-frame.component.html
@@ -1,16 +1,16 @@
<div style="position: relative; display: flex; justify-content: flex-end; height: 100%;">
- <div *ngIf="!tabName.includes('map')" style="margin: 1em;">
+ <div *ngIf="!tabName.toLowerCase().includes('map')" style="margin: 1em;">
<app-bar-icons [tabName]="tabName"></app-bar-icons>
</div>
<!-- rule engine -->
- <div style="width: 100%;" *ngIf="tabName.includes('map')">
+ <div style="width: 100%;" *ngIf="tabName.toLowerCase().includes('map')">
<app-slide-panel [activePane]="store.isLeftVisible ? 'left' : 'right'">
<div leftPane style="height: 100%; overflow: auto;">
<app-rule-list></app-rule-list>
</div>
- <div rightPane style="height: 100%; overflow: auto;">
+ <div rightPane style="height: 100%; overflow: scroll;">
<app-action-list></app-action-list>
</div>
</app-slide-panel>
diff --git a/public/src/app/rule-frame/rule-frame.component.ts b/public/src/app/rule-frame/rule-frame.component.ts
index 4d5f999..2729c14 100644
--- a/public/src/app/rule-frame/rule-frame.component.ts
+++ b/public/src/app/rule-frame/rule-frame.component.ts
@@ -1,6 +1,5 @@
-import { Component, OnDestroy, Input, ViewChild } from '@angular/core';
+import { Component, Input, OnDestroy } from '@angular/core';
import { Store } from '../store/store';
-import { BarIconsComponent } from '../bar-icons/bar-icons.component';
@Component({
selector: 'app-rule-frame',
diff --git a/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.html b/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.html
new file mode 100644
index 0000000..f8d51fe
--- /dev/null
+++ b/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.html
@@ -0,0 +1,39 @@
+<p-dialog [style]="{'border-top-color':'#ffb81c'}" [closable]="false" [(visible)]="store.displaySDCDialog" modal="modal" styleClass="dcae-notify"
+ width="500" [responsive]="true" data-tests-id="sdc-dialog">
+ <p-header>
+ <div style="display: flex;">
+ <span style="color: #ffb81c;
+ padding-right: 15px;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;" [innerHTML]="'alert-triangle' | feather:28"></span>
+ <span style="font-family: 'Open Sans', sans-serif;
+ font-size: 24px; width: 100%;">
+ Exit from DCAE
+ </span>
+ <span style="
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ color:rgb(90, 90, 90);
+ align-items: center;" [innerHTML]="'x' | feather:20
+ " (click)="closeforChange()"></span>
+ </div>
+ </p-header>
+
+ <div style="padding: 0 0 20px 43px; font-family: 'Open Sans', sans-serif;
+ font-size: 14px;">
+ Do you want to save?
+ </div>
+
+ <p-footer>
+ <button mat-raised-button color="primary" style="background-color: #FFB81C; margin-right: 10px; font-size: 14px; font-family: 'Open Sans', sans-serif; height: 36px;" (click)="closeDialog()" data-tests-id="error-cancel">
+ SAVE
+ </button>
+ <button mat-raised-button class="btn-secondry" style="border-color: #FFB81C !important; color:#FFB81C !important; font-size: 14px; font-family: 'Open Sans', sans-serif;text-align: center; height: 36px;" (click)="closeforChange()"
+ data-tests-id="error-cancel">
+ DISCARD
+ </button>
+ </p-footer>
+</p-dialog>
diff --git a/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.scss b/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.scss
new file mode 100644
index 0000000..a775398
--- /dev/null
+++ b/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.scss
@@ -0,0 +1,17 @@
+:host /deep/ .dcae-notify {
+ border-top: solid 6px #ffb81c;
+}
+:host /deep/ .ui-dialog .ui-dialog-titlebar {
+ padding-top: 15px;
+ padding-left: 20px;
+ padding-right: 12px;
+ padding-bottom: 0;
+}
+
+:host /deep/ .ui-dialog-footer {
+ padding: 10px;
+}
+
+:host /deep/ .ui-dialog.ui-widget .ui-dialog-content {
+ padding-top: 10px;
+}
diff --git a/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.ts b/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.ts
new file mode 100644
index 0000000..7572012
--- /dev/null
+++ b/public/src/app/sdc-notify-dialog/sdc-notify-dialog.component.ts
@@ -0,0 +1,72 @@
+import { Component, ElementRef, ViewChild } from '@angular/core';
+import { Router } from '@angular/router';
+import { RestApiService } from '../api/rest-api.service';
+import { MainComponent } from '../main/main.component';
+import { Store } from '../store/store';
+
+@Component({
+ selector: 'app-sdc-notify-dialog',
+ templateUrl: './sdc-notify-dialog.component.html',
+ styleUrls: ['./sdc-notify-dialog.component.scss']
+})
+export class SdcNotifyDialogComponent {
+ @ViewChild(MainComponent) mainComponent: ElementRef;
+
+ constructor(
+ public store: Store,
+ private router: Router,
+ private _restApi: RestApiService
+ ) {}
+
+ closeDialog() {
+ const currentUrl = this.router.url;
+ if (currentUrl.includes('main')) {
+ if (this.store.cdumpIsDirty) {
+ this.saveCDUMP();
+ } else {
+ this.completeAndClose();
+ }
+ } else {
+ this.completeAndClose();
+ }
+ }
+
+ saveCDUMP() {
+ this.store.loader = true;
+ this._restApi
+ .saveMonitoringComponent({
+ contextType: this.store.sdcParmas.contextType,
+ serviceUuid: this.store.sdcParmas.uuid,
+ vfiName: this.store.vfiName,
+ vfcmtUuid: this.store.mcUuid,
+ flowType: this.store.flowType,
+ cdump: this.store.cdump
+ })
+ .subscribe(
+ success => {
+ this.store.loader = false;
+ this.store.mcUuid = success.uuid;
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ },
+ error => {
+ this.store.loader = false;
+ console.log(error.notes);
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ this.store.ErrorContent = Object.values(error.requestError);
+ this.store.displayErrorDialog = true;
+ },
+ () => {
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ }
+ );
+ }
+
+ private completeAndClose() {
+ this.store.ifrmaeMessenger.notify('ACTION_COMPLETED');
+ this.store.displaySDCDialog = false;
+ }
+
+ closeforChange() {
+ this.completeAndClose();
+ }
+}
diff --git a/public/src/app/sdc/base-pubsub.ts b/public/src/app/sdc/base-pubsub.ts
new file mode 100644
index 0000000..f7fcadc
--- /dev/null
+++ b/public/src/app/sdc/base-pubsub.ts
@@ -0,0 +1,124 @@
+declare const window: Window;
+
+export interface IPubSubEvent {
+ type: string;
+ originId: string;
+ data: any;
+}
+
+export interface ISubscriber {
+ window: Window;
+ locationUrl: string;
+}
+
+export class BasePubSub {
+ subscribers: Map<string, ISubscriber>;
+ eventsCallbacks: Array<Function>;
+ clientId: string;
+ eventsToWait: Map<string, Array<string>>;
+
+ constructor(pluginId: string) {
+ this.subscribers = new Map<string, ISubscriber>();
+ this.eventsCallbacks = [];
+ this.eventsToWait = new Map<string, Array<string>>();
+ this.clientId = pluginId;
+ this.onMessage = this.onMessage.bind(this);
+
+ window.addEventListener('message', this.onMessage);
+ }
+
+ public register(
+ subscriberId: string,
+ subscriberWindow: Window,
+ subscriberUrl: string
+ ) {
+ const subscriber = {
+ window: subscriberWindow,
+ locationUrl: subscriberUrl || subscriberWindow.location.href
+ };
+
+ this.subscribers.set(subscriberId, subscriber);
+ }
+
+ public unregister(subscriberId: string) {
+ this.subscribers.delete(subscriberId);
+ }
+
+ public on(callback: Function) {
+ const functionExists = this.eventsCallbacks.find((func: Function) => {
+ return callback.toString() === func.toString();
+ });
+
+ if (!functionExists) {
+ this.eventsCallbacks.push(callback);
+ }
+ }
+
+ public off(callback: Function) {
+ const index = this.eventsCallbacks.indexOf(callback);
+ this.eventsCallbacks.splice(index, 1);
+ }
+
+ public notify(eventType: string, eventData?: any) {
+ const eventObj = {
+ type: eventType,
+ data: eventData,
+ originId: this.clientId
+ };
+
+ this.subscribers.forEach(
+ (subscriber: ISubscriber, subscriberId: string) => {
+ subscriber.window.postMessage(eventObj, subscriber.locationUrl);
+ }
+ );
+
+ return {
+ subscribe: function(callbackFn) {
+ if (this.subscribers.size !== 0) {
+ const subscribersToNotify = Array.from(this.subscribers.keys());
+
+ const checkNotifyComplete = (subscriberId: string) => {
+ const index = subscribersToNotify.indexOf(subscriberId);
+ subscribersToNotify.splice(index, 1);
+
+ if (subscribersToNotify.length === 0) {
+ callbackFn();
+ }
+ };
+
+ this.subscribers.forEach(
+ (subscriber: ISubscriber, subscriberId: string) => {
+ if (
+ this.eventsToWait.has(subscriberId) &&
+ this.eventsToWait.get(subscriberId).indexOf(eventType) !== -1
+ ) {
+ const actionCompletedFunction = (
+ eventData,
+ subId = subscriberId
+ ) => {
+ if (eventData.type === 'ACTION_COMPLETED') {
+ checkNotifyComplete(subId);
+ }
+ this.off(actionCompletedFunction);
+ };
+ this.on(actionCompletedFunction);
+ } else {
+ checkNotifyComplete(subscriberId);
+ }
+ }
+ );
+ } else {
+ callbackFn();
+ }
+ }.bind(this)
+ };
+ }
+
+ protected onMessage(event: any) {
+ if (this.subscribers.has(event.data.originId)) {
+ this.eventsCallbacks.forEach((callback: Function) => {
+ callback(event.data, event);
+ });
+ }
+ }
+}
diff --git a/public/src/app/sdc/plugin-pubsub.ts b/public/src/app/sdc/plugin-pubsub.ts
new file mode 100644
index 0000000..848c7d2
--- /dev/null
+++ b/public/src/app/sdc/plugin-pubsub.ts
@@ -0,0 +1,32 @@
+import { BasePubSub } from './base-pubsub';
+
+declare const window: Window;
+
+export class PluginPubSub extends BasePubSub {
+ constructor(
+ pluginId: string,
+ parentUrl: string,
+ eventsToWait?: Array<string>
+ ) {
+ super(pluginId);
+ this.register('sdc-hub', window.parent, parentUrl);
+ this.subscribe(eventsToWait);
+ }
+
+ public subscribe(eventsToWait?: Array<string>) {
+ const registerData = {
+ pluginId: this.clientId,
+ eventsToWait: eventsToWait || []
+ };
+
+ this.notify('PLUGIN_REGISTER', registerData);
+ }
+
+ public unsubscribe() {
+ const unregisterData = {
+ pluginId: this.clientId
+ };
+
+ this.notify('PLUGIN_UNREGISTER', unregisterData);
+ }
+}
diff --git a/public/src/app/store/store.ts b/public/src/app/store/store.ts
index a9f2431..b075699 100644
--- a/public/src/app/store/store.ts
+++ b/public/src/app/store/store.ts
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
-import { observable, computed, action, toJS, reaction } from 'mobx';
import { findIndex } from 'lodash';
+import { action, computed, observable, toJS } from 'mobx';
@Injectable()
export class Store {
@@ -16,6 +16,10 @@ export class Store {
@observable expandAdvancedSetting = [];
@observable generalflow;
@observable vfiName;
+ @observable flowType;
+ @observable ifrmaeMessenger;
+ @observable waitForSave = false;
+ @observable displaySDCDialog = false;
// error dialog
@observable displayErrorDialog = false;
@observable ErrorContent = [];
@@ -23,9 +27,11 @@ export class Store {
// rule-engine
@observable tabParmasForRule;
@observable ruleList = new Array();
+ @observable ruleListExistParams;
@observable ruleEditorInitializedState;
@observable isLeftVisible;
@observable inprogress;
+ @observable notifyIdValue = '';
@action
updateRuleInList(rule) {
@@ -82,6 +88,13 @@ export class Store {
} else if (typeof x.assignment.value === 'object') {
x.assignment.value = JSON.stringify(x.assignment.value);
}
+ if (x.value) {
+ if (typeof x.value === 'object') {
+ x.value = JSON.stringify(x.value);
+ }
+ } else if (!x.value) {
+ x.value = x.assignment.value;
+ }
return x;
});
});
diff --git a/public/src/environments/environment.prod.ts b/public/src/environments/environment.prod.ts
index bc3ac4b..84965a9 100644
--- a/public/src/environments/environment.prod.ts
+++ b/public/src/environments/environment.prod.ts
@@ -1,5 +1,5 @@
export const environment = {
production: true,
- apiBaseUrl: 'dcae/dcaeProxy',
- imagePath: 'dcae_fe/assets/images'
+ apiBaseUrl: 'dcaed/dcaeProxy',
+ imagePath: 'dcaed/assets/images'
};
diff --git a/public/src/polyfills.ts b/public/src/polyfills.ts
index d68672f..5db0ca6 100644
--- a/public/src/polyfills.ts
+++ b/public/src/polyfills.ts
@@ -19,48 +19,39 @@
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
-// import 'core-js/es6/symbol';
-// import 'core-js/es6/object';
-// import 'core-js/es6/function';
-// import 'core-js/es6/parse-int';
-// import 'core-js/es6/parse-float';
-// import 'core-js/es6/number';
-// import 'core-js/es6/math';
-// import 'core-js/es6/string';
-// import 'core-js/es6/date';
-// import 'core-js/es6/array';
-// import 'core-js/es6/regexp';
-// import 'core-js/es6/map';
-// import 'core-js/es6/weak-map';
-// import 'core-js/es6/set';
-
+import 'core-js/es6/array';
+import 'core-js/es6/date';
+import 'core-js/es6/function';
+import 'core-js/es6/map';
+import 'core-js/es6/math';
+import 'core-js/es6/number';
+import 'core-js/es6/object';
+import 'core-js/es6/parse-float';
+import 'core-js/es6/parse-int';
+import 'core-js/es6/regexp';
+import 'core-js/es6/set';
+import 'core-js/es6/string';
+import 'core-js/es6/symbol';
+import 'core-js/es6/weak-map';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
-
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
-
-
/** Evergreen browsers require these. **/
-// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
+// Used for reflect-metadata in JIT. If you use AOT (and only Angular
+// decorators), you can remove.
import 'core-js/es7/reflect';
-
-
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
+import 'intl';
+import 'intl/locale-data/jsonp/en';
/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
-
-
-
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
-import 'zone.js/dist/zone'; // Included with Angular CLI.
-
-
-
-/***************************************************************************************************
- * APPLICATION IMPORTS
- */
+import 'zone.js/dist/zone'; // Included with Angular CLI.
diff --git a/public/src/stories/diagram.stories.ts b/public/src/stories/diagram.stories.ts
index 00dd922..682fa6d 100644
--- a/public/src/stories/diagram.stories.ts
+++ b/public/src/stories/diagram.stories.ts
@@ -13,10 +13,24 @@ storiesOf('Diagram', module).add('simple', () => ({
},
props: {
list: array('list', [
- { source: 'node1dsvsdsvd', target: 'node2' },
- { source: 'node3', target: 'node4' },
- { source: 'node5', target: 'nodedsvsds6' },
- { source: 'node7', target: 'node8' }
+ {
+ name1: 'node1dsvsdsvd',
+ name2: 'node2',
+ p1: 'Stream_publish_0',
+ p2: 'capability'
+ },
+ {
+ name1: 'node33',
+ name2: 'node2555',
+ p1: 'requirement2',
+ p2: 'capability11'
+ },
+ {
+ name1: 'namber4',
+ name2: 'namber3',
+ p1: 'requirement3',
+ p2: 'capability4'
+ }
])
}
}));
diff --git a/public/src/styles.css b/public/src/styles.css
index 4b1d433..a56199a 100644
--- a/public/src/styles.css
+++ b/public/src/styles.css
@@ -1,8 +1,13 @@
/* You can add global styles to this file, and also import other style files */
-@import '@angular/material/prebuilt-themes/indigo-pink.css';
+@import '@angular/material/prebuilt-themes/indigo-pink.css';
@font-face {
font-family: 'Open Sans';
+ src: url('./assets/fonts/OpenSans-Regular.ttf') format('ttf');
+}
+
+@font-face {
+ font-family: 'Open Sans-SemiBold';
src: url('./assets/fonts/OpenSans-SemiBold.ttf') format('ttf');
}
@@ -19,28 +24,31 @@ body,
app-root,
app-home {
height: 100%;
- font-family: 'Open Sans', sans-serif;
+ font-family: 'Open Sans', sans-serif !important;
font-size: 13px;
/* height: 100vh; */
}
+select,
+input,
+textarea {
+ font-family: 'Open Sans', sans-serif !important;
+}
+
div,
span {
font-weight: 400;
}
-div .field-label,
-span .field-label,
-div .field-label > span {
- font-weight: 600;
-}
-
/* form input validation border */
-textarea.ng-touched.ng-invalid:not(form),input.ng-touched.ng-invalid:not(form) {
+
+textarea.ng-touched.ng-invalid:not(form),
+input.ng-touched.ng-invalid:not(form) {
border: 1px solid #cf2a2a !important;
}
/** reset button **/
+
.mat-fab.mat-primary,
.mat-mini-fab.mat-primary,
.mat-raised-button.mat-primary {
@@ -60,7 +68,13 @@ textarea.ng-touched.ng-invalid:not(form),input.ng-touched.ng-invalid:not(form) {
box-shadow: none !important;
}
+.mat-raised-button.mat-primary[disabled] {
+ background-color: #979797;
+ color: white;
+}
+
/* Astrix required */
+
.required::before {
content: '*';
color: red;
@@ -68,9 +82,11 @@ textarea.ng-touched.ng-invalid:not(form),input.ng-touched.ng-invalid:not(form) {
}
/** overide dialog **/
-.ui-dialog {
+
+/* .ui-dialog {
border-top: solid 6px #cf2a2a;
-}
+} */
+
.ui-dialog-titlebar {
background: white;
}
diff --git a/public/yarn.lock b/public/yarn.lock
index df0e3b2..c6209bd 100644
--- a/public/yarn.lock
+++ b/public/yarn.lock
@@ -39,9 +39,9 @@
dependencies:
tslib "^1.7.1"
-"@angular/cli@^1.7.3":
- version "1.7.3"
- resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-1.7.3.tgz#ac917b69240bb1b340421e9f985135890e0d53b4"
+"@angular/cli@^1.7.4":
+ version "1.7.4"
+ resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-1.7.4.tgz#b6c31b5fc6f8ea07e55b1b01a26422f5358a4ea6"
dependencies:
"@angular-devkit/build-optimizer" "0.3.2"
"@angular-devkit/core" "0.3.2"
@@ -519,6 +519,10 @@
react-treebeard "^2.1.0"
redux "^3.7.2"
+"@swimlane/ngx-datatable@^13.0.1":
+ version "13.0.1"
+ resolved "https://registry.yarnpkg.com/@swimlane/ngx-datatable/-/ngx-datatable-13.0.1.tgz#6e949e19130b2054e2715d30d158751c4fbaa502"
+
"@types/blob-util@1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@types/blob-util/-/blob-util-1.3.3.tgz#adba644ae34f88e1dd9a5864c66ad651caaf628a"
@@ -764,13 +768,13 @@ amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-angular-tree-component@^7.0.1:
- version "7.0.1"
- resolved "https://registry.yarnpkg.com/angular-tree-component/-/angular-tree-component-7.0.1.tgz#fc8d0e72d8c34b87131a3ba2bd32ad20945689ac"
+angular-tree-component@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/angular-tree-component/-/angular-tree-component-7.1.0.tgz#53674ea944f7147647c7e48931f5fad66237a632"
dependencies:
- lodash "4.17.4"
- mobx ">=3"
- mobx-angular ">=1"
+ lodash "^4.17.5"
+ mobx "^3.6.2"
+ mobx-angular "2.1.1"
angular2-template-loader@^0.6.2:
version "0.6.2"
@@ -846,6 +850,10 @@ aproba@^1.0.3, aproba@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
+archy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+
are-we-there-yet@~1.1.2:
version "1.1.4"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d"
@@ -2270,6 +2278,10 @@ buffer-crc32@~0.2.3:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
+buffer-from@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04"
+
buffer-indexof@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
@@ -2380,6 +2392,14 @@ cached-path-relative@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7"
+caching-transform@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1"
+ dependencies:
+ md5-hex "^1.2.0"
+ mkdirp "^0.5.1"
+ write-file-atomic "^1.1.4"
+
callsite@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20"
@@ -2853,6 +2873,15 @@ concat-stream@1.6.0, concat-stream@^1.5.0:
readable-stream "^2.2.2"
typedarray "^0.0.6"
+concat-stream@1.6.2:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
+ dependencies:
+ buffer-from "^1.0.0"
+ inherits "^2.0.3"
+ readable-stream "^2.2.2"
+ typedarray "^0.0.6"
+
concat-stream@~1.5.0, concat-stream@~1.5.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
@@ -2911,7 +2940,7 @@ content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
-convert-source-map@^1.4.0, convert-source-map@^1.5.0:
+convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
@@ -3067,6 +3096,13 @@ cross-spawn@^3.0.0:
lru-cache "^4.0.1"
which "^1.2.9"
+cross-spawn@^4:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
cryptiles@2.x.x:
version "2.0.5"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -3235,9 +3271,9 @@ cyclist@~0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
-cypress@1.4.2:
- version "1.4.2"
- resolved "https://registry.yarnpkg.com/cypress/-/cypress-1.4.2.tgz#d957d631617aa87e64a7eae71502f2e175076638"
+cypress@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cypress/-/cypress-2.1.0.tgz#a8bd7d9b89c38a1e380db83b57d9bba0dbb95ba4"
dependencies:
"@cypress/listr-verbose-renderer" "0.4.1"
"@cypress/xvfb" "1.1.3"
@@ -3315,6 +3351,10 @@ deasync@^0.1.8:
bindings "~1.2.1"
nan "^2.0.7"
+debug-log@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
+
debug@*, debug@3.1.0, debug@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
@@ -3864,7 +3904,7 @@ es6-map@^0.1.3:
es6-symbol "~3.1.1"
event-emitter "~0.3.5"
-es6-promise@^4.0.5:
+es6-promise@^4.0.3, es6-promise@^4.0.5:
version "4.2.4"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
@@ -4221,6 +4261,15 @@ extract-zip@1.6.6, extract-zip@^1.0.3:
mkdirp "0.5.0"
yauzl "2.4.1"
+extract-zip@^1.6.5:
+ version "1.6.7"
+ resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9"
+ dependencies:
+ concat-stream "1.6.2"
+ debug "2.6.9"
+ mkdirp "0.5.1"
+ yauzl "2.4.1"
+
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
@@ -4380,6 +4429,14 @@ finalhandler@1.1.0:
statuses "~1.3.1"
unpipe "~1.0.0"
+find-cache-dir@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
+ dependencies:
+ commondir "^1.0.1"
+ mkdirp "^0.5.1"
+ pkg-dir "^1.0.0"
+
find-cache-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f"
@@ -4454,6 +4511,13 @@ foreach@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
+foreground-child@^1.5.3, foreground-child@^1.5.6:
+ version "1.5.6"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9"
+ dependencies:
+ cross-spawn "^4"
+ signal-exit "^3.0.0"
+
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
@@ -4535,6 +4599,14 @@ fs-extra@^0.30.0:
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
+fs-extra@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^2.1.0"
+ klaw "^1.0.0"
+
fs-write-stream-atomic@^1.0.8:
version "1.0.10"
resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
@@ -4997,6 +5069,13 @@ hash.js@^1.0.0, hash.js@^1.0.3:
inherits "^2.0.3"
minimalistic-assert "^1.0.0"
+hasha@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1"
+ dependencies:
+ is-stream "^1.0.1"
+ pinkie-promise "^2.0.0"
+
hawk@3.1.3, hawk@~3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
@@ -5414,6 +5493,10 @@ interpret@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
+intl@^1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde"
+
invariant@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
@@ -5802,6 +5885,15 @@ istanbul-instrumenter-loader@^3.0.0:
loader-utils "^1.1.0"
schema-utils "^0.3.0"
+istanbul-instrumenter-loader@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz#9957bd59252b373fae5c52b7b5188e6fde2a0949"
+ dependencies:
+ convert-source-map "^1.5.0"
+ istanbul-lib-instrument "^1.7.3"
+ loader-utils "^1.1.0"
+ schema-utils "^0.3.0"
+
istanbul-lib-coverage@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da"
@@ -5816,28 +5908,28 @@ istanbul-lib-hook@^1.1.0:
dependencies:
append-transform "^0.4.0"
-istanbul-lib-instrument@^1.7.3, istanbul-lib-instrument@^1.9.1:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e"
+istanbul-lib-instrument@^1.10.0, istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0:
+ version "1.10.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b"
dependencies:
babel-generator "^6.18.0"
babel-template "^6.16.0"
babel-traverse "^6.18.0"
babel-types "^6.18.0"
babylon "^6.18.0"
- istanbul-lib-coverage "^1.1.1"
+ istanbul-lib-coverage "^1.2.0"
semver "^5.3.0"
-istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0:
- version "1.10.1"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b"
+istanbul-lib-instrument@^1.7.3, istanbul-lib-instrument@^1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e"
dependencies:
babel-generator "^6.18.0"
babel-template "^6.16.0"
babel-traverse "^6.18.0"
babel-types "^6.18.0"
babylon "^6.18.0"
- istanbul-lib-coverage "^1.2.0"
+ istanbul-lib-coverage "^1.1.1"
semver "^5.3.0"
istanbul-lib-report@^1.1.2:
@@ -5849,7 +5941,16 @@ istanbul-lib-report@^1.1.2:
path-parse "^1.0.5"
supports-color "^3.1.2"
-istanbul-lib-source-maps@^1.2.1:
+istanbul-lib-report@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259"
+ dependencies:
+ istanbul-lib-coverage "^1.1.2"
+ mkdirp "^0.5.1"
+ path-parse "^1.0.5"
+ supports-color "^3.1.2"
+
+istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6"
dependencies:
@@ -5875,6 +5976,12 @@ istanbul-reports@^1.1.3:
dependencies:
handlebars "^4.0.3"
+istanbul-reports@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.4.0.tgz#3d7b44b912ecbe7652a603662b962120739646a1"
+ dependencies:
+ handlebars "^4.0.3"
+
jasmine-core@~2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
@@ -6485,6 +6592,13 @@ karma-jasmine@^1.0.2, karma-jasmine@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529"
+karma-phantomjs-launcher@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz#d23ca34801bda9863ad318e3bb4bd4062b13acd2"
+ dependencies:
+ lodash "^4.0.1"
+ phantomjs-prebuilt "^2.1.7"
+
karma-source-map-support@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz#1bf81e7bb4b089627ab352ec4179e117c406a540"
@@ -6524,6 +6638,10 @@ karma@~2.0.0:
tmp "0.0.33"
useragent "^2.1.12"
+kew@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b"
+
keycode@^2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.1.9.tgz#964a23c54e4889405b4861a5c9f0480d45141dfa"
@@ -7097,6 +7215,16 @@ math-expression-evaluator@^1.2.14:
version "1.2.17"
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
+md5-hex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4"
+ dependencies:
+ md5-o-matic "^0.1.1"
+
+md5-o-matic@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
+
md5.js@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d"
@@ -7140,6 +7268,12 @@ merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
+merge-source-map@^1.0.2:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646"
+ dependencies:
+ source-map "^0.6.1"
+
merge-stream@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
@@ -7327,7 +7461,7 @@ mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdi
dependencies:
minimist "0.0.8"
-mobx-angular@>=1:
+mobx-angular@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/mobx-angular/-/mobx-angular-2.1.1.tgz#d5e36539acb200186dd5a1170806b4776b9a8b88"
@@ -7347,13 +7481,13 @@ mobx-remotedev@^0.2.8:
remotedev "^0.2.7"
remotedev-utils "^0.1.4"
-mobx@>=3:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/mobx/-/mobx-3.5.1.tgz#8e682ec535cf44e04005b9e37e2df66acc975a42"
+mobx@^3.6.2:
+ version "3.6.2"
+ resolved "https://registry.yarnpkg.com/mobx/-/mobx-3.6.2.tgz#fb9f5ff5090539a1ad54e75dc4c098b602693320"
-mobx@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/mobx/-/mobx-4.1.0.tgz#e4a9679cdafbe215b20e32ef93a7031845b3f1af"
+mobx@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/mobx/-/mobx-4.2.0.tgz#ee0b0a4f3da2f4776225046ab208ac329a4841d4"
mocha-rp-reporter@^1.0.12:
version "1.0.12"
@@ -7534,6 +7668,10 @@ netmask@~1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/netmask/-/netmask-1.0.6.tgz#20297e89d86f6f6400f250d9f4f6b4c1945fcd35"
+ngx-datatable@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/ngx-datatable/-/ngx-datatable-1.0.3.tgz#9ef9915aa019e9983aa8e3897b61f400f2fd69d5"
+
ngx-toastr@^8.2.1:
version "8.2.1"
resolved "https://registry.yarnpkg.com/ngx-toastr/-/ngx-toastr-8.2.1.tgz#86cffec666a9dadde5f8a37f2a8fe2ab527b3dde"
@@ -7827,6 +7965,38 @@ nwmatcher@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c"
+nyc@^11.7.1:
+ version "11.7.1"
+ resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.7.1.tgz#7cb0a422e501b88ff2c1634341dec2560299d67b"
+ dependencies:
+ archy "^1.0.0"
+ arrify "^1.0.1"
+ caching-transform "^1.0.0"
+ convert-source-map "^1.5.1"
+ debug-log "^1.0.1"
+ default-require-extensions "^1.0.0"
+ find-cache-dir "^0.1.1"
+ find-up "^2.1.0"
+ foreground-child "^1.5.3"
+ glob "^7.0.6"
+ istanbul-lib-coverage "^1.1.2"
+ istanbul-lib-hook "^1.1.0"
+ istanbul-lib-instrument "^1.10.0"
+ istanbul-lib-report "^1.1.3"
+ istanbul-lib-source-maps "^1.2.3"
+ istanbul-reports "^1.4.0"
+ md5-hex "^1.2.0"
+ merge-source-map "^1.0.2"
+ micromatch "^2.3.11"
+ mkdirp "^0.5.0"
+ resolve-from "^2.0.0"
+ rimraf "^2.5.4"
+ signal-exit "^3.0.1"
+ spawn-wrap "^1.4.2"
+ test-exclude "^4.2.0"
+ yargs "11.1.0"
+ yargs-parser "^8.0.0"
+
oauth-sign@~0.8.1, oauth-sign@~0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
@@ -8245,6 +8415,20 @@ performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+phantomjs-prebuilt@^2.1.7:
+ version "2.1.16"
+ resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef"
+ dependencies:
+ es6-promise "^4.0.3"
+ extract-zip "^1.6.5"
+ fs-extra "^1.0.0"
+ hasha "^2.2.0"
+ kew "^0.7.0"
+ progress "^1.1.8"
+ request "^2.81.0"
+ request-progress "^2.0.1"
+ which "^1.2.10"
+
pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -8263,6 +8447,12 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+pkg-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
+ dependencies:
+ find-up "^1.0.0"
+
pkg-dir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
@@ -8698,7 +8888,7 @@ progress-stream@^1.1.0:
speedometer "~0.1.2"
through2 "~0.2.3"
-progress@1.1.8:
+progress@1.1.8, progress@^1.1.8:
version "1.1.8"
resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
@@ -9438,6 +9628,12 @@ request-progress@0.3.1:
dependencies:
throttleit "~0.0.2"
+request-progress@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08"
+ dependencies:
+ throttleit "^1.0.0"
+
request-promise-core@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6"
@@ -9599,6 +9795,10 @@ resolve-dir@^1.0.0:
expand-tilde "^2.0.0"
global-modules "^1.0.0"
+resolve-from@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
+
resolve-from@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
@@ -10023,7 +10223,7 @@ shortid@^2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.8.tgz#033b117d6a2e975804f6f0969dbe7d3d0b355131"
-signal-exit@^3.0.0, signal-exit@^3.0.2:
+signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
@@ -10053,6 +10253,10 @@ slice-ansi@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
+slide@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
+
smart-buffer@^1.0.13, smart-buffer@^1.0.4:
version "1.1.15"
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16"
@@ -10258,6 +10462,17 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+spawn-wrap@^1.4.2:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c"
+ dependencies:
+ foreground-child "^1.5.6"
+ mkdirp "^0.5.0"
+ os-homedir "^1.0.1"
+ rimraf "^2.6.2"
+ signal-exit "^3.0.2"
+ which "^1.3.0"
+
spdx-correct@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
@@ -10708,7 +10923,7 @@ terminal-banner@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/terminal-banner/-/terminal-banner-1.1.0.tgz#ef81ce7d9d7e541a81d09eb2c0257c3d5463c3ea"
-test-exclude@^4.1.1:
+test-exclude@^4.1.1, test-exclude@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa"
dependencies:
@@ -10730,6 +10945,10 @@ throttleit@0.0.2, throttleit@~0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf"
+throttleit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c"
+
through2@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
@@ -11626,6 +11845,14 @@ wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+write-file-atomic@^1.1.4:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f"
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ slide "^1.1.5"
+
write-file-atomic@^2.0.0, write-file-atomic@^2.1.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
@@ -11751,7 +11978,7 @@ yargs-parser@^7.0.0:
dependencies:
camelcase "^4.1.0"
-yargs-parser@^8.1.0:
+yargs-parser@^8.0.0, yargs-parser@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950"
dependencies:
@@ -11763,6 +11990,23 @@ yargs-parser@^9.0.2:
dependencies:
camelcase "^4.1.0"
+yargs@11.1.0:
+ version "11.1.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77"
+ dependencies:
+ cliui "^4.0.0"
+ decamelize "^1.1.1"
+ find-up "^2.1.0"
+ get-caller-file "^1.0.1"
+ os-locale "^2.0.0"
+ require-directory "^2.1.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^2.0.0"
+ string-width "^2.0.0"
+ which-module "^2.0.0"
+ y18n "^3.2.1"
+ yargs-parser "^9.0.2"
+
yargs@6.6.0:
version "6.6.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208"