summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.html
blob: 0117669f6173b7101af0bb578448c54ff69ce9c9 (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
<nz-modal nzWidth="428" [nzVisible]="healModelVisible" nzTitle=" {{'i18nTextDefine_Heal' | translate}} "
          (nzOnCancel)="healCancel()" (nzOnOk)="healOk()"
          nzClassName="healModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} "
          nzOkText=" {{'i18nTextDefine_modelOk' | translate}} ">
  <h3><span style="color: red">*&nbsp;</span> {{"i18nTextDefine_SureHeal" | translate}} </h3>
  <div class="heal-question">
    <p class="heal-label"> {{"i18nTextDefine_InstanceID" | translate}} : </p>
    <div class="healModelContent" title="{{ thisService['service-instance-id'] || thisService['nsInstanceId'] ||
                    thisService['vnfInstanceId']}}"> {{ thisService["service-instance-id"] ||
      thisService["nsInstanceId"] ||
      thisService["vnfInstanceId"]}}
    </div>
  </div>
  <!-- NS -->
  <div *ngIf="thisService['serviceDomain'] == 'Network Service'">
    <div class="question">
      <p class="heal-label"> {{"i18nTextDefine_degreeHealing" | translate}} :</p>
      <nz-select style="width: 200px;height:42px;margin-left: 15px;border-radius: 6px"
                 [(ngModel)]="nsParams.degreeHealing">
        <nz-option nzValue="HEAL_RESTORE" nzLabel="HEAL_RESTORE"></nz-option>
        <nz-option nzValue="HEAL_QOS" nzLabel="HEAL_QOS"></nz-option>
        <nz-option nzValue="HEAL_RESET" nzLabel="HEAL_RESET"></nz-option>
        <nz-option nzValue="PARTIAL_HEALING" nzLabel="PARTIAL_HEALING"></nz-option>
      </nz-select>
    </div>
    <div>
      <span style="display:inline-block;"> {{"i18nTextDefine_actionsHealing" | translate}} :</span>
      <button nz-button [nzType]="'default'" (click)="addActionsHealing()"><i
              class="anticon anticon-plus-circle-o"></i></button>
      <br>
      <div *ngFor="let item of healActions;let i = index;" style="display:inline-block;">
        <input style="width: 165px;" nz-input [(ngModel)]="item.value">
        <button nz-button [nzType]="'dashed'" (click)="minusActionsHealing(i)"><i
                class="anticon anticon-minus-circle-o"></i></button>
        &nbsp;
      </div>
    </div>
    <span style="display:inline-block;width:50%;"> {{"i18nTextDefine_healScript" | translate}} :</span>
    <input style="width: 165px;" nz-input [(ngModel)]="nsParams.healScript">
    <div>
      <span style="display:inline-block;"> {{"i18nTextDefine_additionalParamsforNs" | translate}} :</span>
      <button nz-button [nzType]="'default'" (click)="addNsAdditional()"><i
              class="anticon anticon-plus-circle-o"></i></button>
      <br>
      <div *ngFor="let item of nsAdditional;let i = index;">
        Key: <input style="width: 165px;" nz-input [(ngModel)]="item.key"> &nbsp;
        Value: <input style="width: 165px;" nz-input [(ngModel)]="item.value">
        <button nz-button [nzType]="'dashed'" (click)="minusNsAdditional(i)"><i
                class="anticon anticon-minus-circle-o"></i></button>
      </div>
    </div>
  </div>
  <!-- vnf -->
  <div *ngIf="thisService['serviceDomain'] == 'vnf'" style="clear: both">
    <div class="heal-question">
      <p class="heal-label"> {{"i18nTextDefine_cause" | translate}} :</p>
      <input nz-input [(ngModel)]="vnfParams.cause" class="heal-input">
    </div>
    <div class="heal-question">
      <p class="heal-label"> {{"i18nTextDefine_action" | translate}} :</p>
      <input nz-input [(ngModel)]="vnfParams.additionalParams.action" class="heal-input">
    </div>
    <div class="heal-question">
      <p class="heal-label"> {{"i18nTextDefine_actionvminfo" | translate}}:</p>
      <nz-select
              style=" float: right;width: 200px;margin-left: 15px;border-radius: 6px;margin-right: 30px"
              [(ngModel)]="vmSelected">
        <nz-option *ngFor="let item of vnfVms" [nzValue]="item" [nzLabel]="item.vmName"></nz-option>
      </nz-select>
    </div>
  </div>
</nz-modal>