summaryrefslogtreecommitdiffstats
path: root/public/src/app/main/main.component.html
blob: 87ee2bfb2b06c187e7d4e7992453ecb117c4753a (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
<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;" data-tests-id="new-monitorying-titie">
        <span style="font-size: 22px;" *ngIf='store.generalflow === "new"'>
          New
        </span>
        <span style="font-size: 22px;" *ngIf='store.generalflow === "import"'>
          Import
        </span>
        <span style="font-size: 22px;">
          Monitoring Configuration
        </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">
            <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" style="width: 95px; height: 36px; border-radius: 2px;" (click)="saveAndCreateBlueprint()">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>