Code Review
/
portal
/
nonrtric-controlpanel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CI: Migrate Sonar Scan job to GHA
[portal/nonrtric-controlpanel.git]
/
webapp-frontend
/
src
/
app
/
policy
/
no-type-policy-editor
/
no-type-policy-editor.component.ts
diff --git
a/webapp-frontend/src/app/policy/no-type-policy-editor/no-type-policy-editor.component.ts
b/webapp-frontend/src/app/policy/no-type-policy-editor/no-type-policy-editor.component.ts
index
5d2398c
..
ece0175
100644
(file)
--- a/
webapp-frontend/src/app/policy/no-type-policy-editor/no-type-policy-editor.component.ts
+++ b/
webapp-frontend/src/app/policy/no-type-policy-editor/no-type-policy-editor.component.ts
@@
-47,9
+47,15
@@
export class NoTypePolicyEditorComponent implements OnInit {
constructor() {}
ngOnInit(): void {
constructor() {}
ngOnInit(): void {
+ let initialJson: string;
+ if (this.policyJson) {
+ initialJson = formatJsonString(this.policyJson);
+ } else {
+ initialJson = "{}";
+ }
this.instanceForm.addControl(
"policyJsonTextArea",
this.instanceForm.addControl(
"policyJsonTextArea",
- new FormControl(
this.policy
Json, [
+ new FormControl(
initial
Json, [
Validators.required,
this.jsonValidator(),
])
Validators.required,
this.jsonValidator(),
])