summaryrefslogtreecommitdiffstats
path: root/public/src/app/main/main.component.html
blob: 182ed9cbd9e09c37e88bbbf5986a7c1df0822233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<div class="main-container">

  <div style="padding: .25em; display: flex;
  justify-content: space-between;
  align-items: flex-end;">
    <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; font-size: 12px;">
          Back to Monitoring
        </span>
      </a>
      <div style="margin:10px 0; display:flex;" data-tests-id="new-monitorying-titie">
        <span style="font-size: 22px;" *ngIf='store.generalflow === "new"'>
          New Monitoring Configuration
        </span>
        <span style="font-size: 22px;" *ngIf='store.generalflow === "import"'>
          Import Monitoring Configuration
        </span>
        <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>

    <div>
      <div *ngIf='store.generalflow === "new" || store.generalflow === "edit"'>
        <button *ngIf="!this.store.isEditMode" mat-raised-button color="primary" [disabled]="this.generalComponent.generalForm.invalid"
          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 || 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>
          </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>

      <div *ngIf='store.generalflow === "import"'>
        <button mat-raised-button color="primary" (click)="importMC(this.generalComponent.newVfcmt)" [disabled]="this.generalComponent.generalForm.invalid || this.generalComponent.importBtnDisabled"
          data-tests-id="importMonitoring" style="width: 95px;height: 36px;">Import</button>
      </div>
    </div>
  </div>

  <div style="position: relative; flex:1;">

    <p-tabView (onChange)="handleChange($event)" data-tests-id="tabs">
      <p-tabPanel header="General">
        <div>
          <app-general (updateCdumpEv)="updateCdump($event)"></app-general>
        </div>
      </p-tabPanel>
      <p-tabPanel *ngFor="let item of nodes;" [header]="item.name">
        <app-rule-frame [tabName]="item.name"></app-rule-frame>
      </p-tabPanel>
    </p-tabView>

  </div>
</div>