summaryrefslogtreecommitdiffstats
path: root/public/src/app/main
diff options
context:
space:
mode:
Diffstat (limited to 'public/src/app/main')
-rw-r--r--public/src/app/main/main.component.html26
-rw-r--r--public/src/app/main/main.component.ts8
2 files changed, 24 insertions, 10 deletions
diff --git a/public/src/app/main/main.component.html b/public/src/app/main/main.component.html
index 87ee2bf..182ed9c 100644
--- a/public/src/app/main/main.component.html
+++ b/public/src/app/main/main.component.html
@@ -10,15 +10,23 @@
Back to Monitoring
</span>
</a>
- <div style="margin:10px 0;" data-tests-id="new-monitorying-titie">
+ <div style="margin:10px 0; display:flex;" data-tests-id="new-monitorying-titie">
<span style="font-size: 22px;" *ngIf='store.generalflow === "new"'>
- New
+ New Monitoring Configuration
</span>
<span style="font-size: 22px;" *ngIf='store.generalflow === "import"'>
- Import
+ Import Monitoring Configuration
</span>
- <span style="font-size: 22px;">
- Monitoring Configuration
+ <span style="display: flex;">
+ <span style="font-size: 22px; padding-right: 10px;">
+ MC Name {{store.mcName}}
+ </span>
+ <span *ngIf="store.viewOnly" style="display: flex; background: #673AB7; border-radius: 5px; color: white; padding: 0px 10px; align-items: center;">
+ <span style="display: flex; align-items: center" [innerHTML]="'eye' | feather:16"></span>
+ <span style="padding-left: 5px;" data-tests-id="viewOnlyLabel">
+ view only
+ </span>
+ </span>
</span>
</div>
</div>
@@ -31,15 +39,17 @@
</button>
<div *ngIf="this.store.isEditMode" style="display: flex;">
- <button mat-icon-button (click)="saveCDUMP()" [disabled]="!store.cdumpIsDirty">
+ <button mat-icon-button (click)="saveCDUMP()" [disabled]="!store.cdumpIsDirty || store.viewOnly" data-tests-id="save-btn">
<span style="width: 100%;
height: 100%;
padding-right: 20px;
display: flex;
justify-content: center;
- align-items: center;" [innerHTML]="'save' | feather:22"></span>
+ align-items: center;"
+ [innerHTML]="'save' | feather:22"></span>
</button>
- <button mat-raised-button color="primary" style="width: 95px; height: 36px; border-radius: 2px;" (click)="saveAndCreateBlueprint()">Submit</button>
+ <button mat-raised-button color="primary" [disabled]="store.viewOnly" style="width: 95px; height: 36px; border-radius: 2px;"
+ (click)="saveAndCreateBlueprint()" data-tests-id="submit-btn">Submit</button>
</div>
</div>
diff --git a/public/src/app/main/main.component.ts b/public/src/app/main/main.component.ts
index 3070435..8ba0d1f 100644
--- a/public/src/app/main/main.component.ts
+++ b/public/src/app/main/main.component.ts
@@ -41,7 +41,7 @@ export class MainComponent {
console.log('newVfcmt: %o', params);
this.store.loader = true;
this.store.vfiName = params.serviceAttached;
- this.store.flowType = 'default';
+ // this.store.flowType = 'default';
this.restApi
.createNewVFCMT({
name: params.name,
@@ -56,6 +56,9 @@ export class MainComponent {
success => {
console.log(success);
this.store.mcUuid = success.vfcmt.uuid;
+ this.store.generalflow = '';
+ this.store.mcName = success.vfcmt.name;
+ this.store.flowType = success.cdump.flowType;
console.log(this.cleanProperty(success));
this.store.cdump = success.cdump;
this.diagramRelationsFromCdump(success);
@@ -113,10 +116,11 @@ export class MainComponent {
.subscribe(
success => {
console.log(success);
-
this.location.path();
// this.location.go();
this.store.mcUuid = success.vfcmt.uuid;
+ this.store.generalflow = '';
+ this.store.mcName = success.vfcmt.name;
console.log(this.cleanProperty(success));
this.store.cdump = success.cdump;
this.diagramRelationsFromCdump(success);