From b7a1bd777a4880ea236b609b398757086f0686f6 Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Tue, 19 May 2020 09:37:02 +0200 Subject: [PATCH] Small modifications to instance dialogs Change-Id: Iaacccc5d92287577488001d2f1e9cacc4e61c49f Issue-ID: NONRTRIC-212 Signed-off-by: elinuxhenrik --- .../config/PolicyControllerMockConfiguration.java | 4 ++-- webapp-frontend/package.json | 3 ++- .../no-type-policy-instance-dialog.component.html | 16 +++++++++------- .../no-type-policy-instance-dialog.component.ts | 2 -- .../policy-control/policy-instance-dialog.component.html | 12 +++++++----- .../policy-control/policy-instance-dialog.component.ts | 14 +++++++++++--- 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/webapp-backend/src/test/java/org/oransc/portal/nonrtric/controlpanel/config/PolicyControllerMockConfiguration.java b/webapp-backend/src/test/java/org/oransc/portal/nonrtric/controlpanel/config/PolicyControllerMockConfiguration.java index 89a3ede..6fb657b 100644 --- a/webapp-backend/src/test/java/org/oransc/portal/nonrtric/controlpanel/config/PolicyControllerMockConfiguration.java +++ b/webapp-backend/src/test/java/org/oransc/portal/nonrtric/controlpanel/config/PolicyControllerMockConfiguration.java @@ -77,13 +77,13 @@ public class PolicyControllerMockConfiguration { public ResponseEntity putPolicy(String policyTypeIdString, String policyInstanceId, Object json, String ric) { database.putInstance(policyTypeIdString, policyInstanceId, json, ric); - return new ResponseEntity<>("Policy was put successfully", HttpStatus.OK); + return new ResponseEntity<>(HttpStatus.OK); } @Override public ResponseEntity deletePolicy(String policyInstanceId) { database.deleteInstance(policyInstanceId); - return new ResponseEntity<>("Policy was deleted successfully", HttpStatus.NO_CONTENT); + return new ResponseEntity<>(HttpStatus.OK); } @Override diff --git a/webapp-frontend/package.json b/webapp-frontend/package.json index e9e9ee0..dd68902 100644 --- a/webapp-frontend/package.json +++ b/webapp-frontend/package.json @@ -26,8 +26,9 @@ "@kubernetes/client-node": "^0.10.3", "@material/radio": "^2.3.0", "@types/chart.js": "^2.9.11", + "@types/uuid": "^7.0.3", "angular-bootstrap-md": "^7.5.4", - "angular6-json-schema-form": "^7.3.0", + "angular6-json-schema-form": "^8.0.0", "bootstrap": "^4.4.1", "chart.js": "^2.9.3", "core-js": "^2.6.11", diff --git a/webapp-frontend/src/app/policy-control/no-type-policy-instance-dialog.component.html b/webapp-frontend/src/app/policy-control/no-type-policy-instance-dialog.component.html index 393d40b..b3211c0 100644 --- a/webapp-frontend/src/app/policy-control/no-type-policy-instance-dialog.component.html +++ b/webapp-frontend/src/app/policy-control/no-type-policy-instance-dialog.component.html @@ -18,6 +18,9 @@ ========================LICENSE_END=================================== --> +
- -
Since this is a policy type without a schema, the user will have to make sure that the content - of the policy has the necessary content. This dialog will only validate that it is a valid JSON string.
+
+
Enter policy statements (JSON).
- Select RIC + Select RIC {{ric}}
+ class="alert mat-error">
A Ric must be selected.
@@ -56,7 +58,7 @@ cdkAutosizeMinRows="10" required>
+ class="alert mat-error">
The policy body is required.
@@ -66,7 +68,7 @@
-