summaryrefslogtreecommitdiffstats
path: root/public/src/app/main/main.component.html
blob: e94fc6ae787e5725e2a45e27b00280bcd0eb7e5f (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
78
79
80
81
<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; flex-wrap: wrap;" 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="font-size: 22px; padding-right: 10px;" *ngIf='store.generalflow === "edit"'>
            Edit Monitoring Configuration
        </span>
        <span style="display: flex;">
          <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>
        <br class="newline">
        <span style="display: block; font-size: 16px;" *ngIf='store.mcName'>
              MC Name {{store.mcName}}
        </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" style="margin-right: 10px;">
            <span style="width: 100%;
            height: 100%;
            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>