summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/network/ccvpn-network/ccvpn-network.component.html
blob: c9e150faec912d3eb737b5f1aaed68212f66fafa (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!--
    Copyright (C) 2019 CMCC, Inc. and others. All rights reserved.
    Copyright (C) 2022 Huawei Canada Limited. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<nz-spin [nzSpinning]="isSpinning" nzSize="large">
<div class="model">
  <!--chart-->
  <div class="action ant-tabs-bar">
    <span>
        <i class="icon">
            <img src="assets/images/service-type.png"alt="">
        </i>
        {{"i18nTextDefine_CCVPNLayer" | translate}} :
    </span>
    <nz-dropdown [nzTrigger]="'click'" [nzPlacement]="'bottomLeft'">
      <button nz-button nz-dropdown><span>{{layerSelected.name}}</span> <i class="anticon anticon-down"></i>
      </button>
      <ul nz-menu>
        <li nz-menu-item (click)="changeLayer(item)" *ngFor="let item of layerList">
          <a title="{{item.name}}">{{item.name}}</a>
        </li>
      </ul>
    </nz-dropdown>

    <span>
        <i class="icon">
            <img src="assets/images/service-type.png"alt="">
        </i>
        {{"i18nTextDefine_CCVPNService" | translate}} :
    </span>
    <nz-dropdown [nzTrigger]="'click'" [nzPlacement]="'bottomLeft'">
      <button nz-button nz-dropdown><span>{{serviceSelected}}</span> <i class="anticon anticon-down"></i>
      </button>
      <ul nz-menu>
        <li nz-menu-item (click)="chooseService(svcInstId)" *ngFor="let svcInstId of getKeys(servicesMap)">
          <a title="{{svcInstId}}">{{svcInstId}}</a>
        </li>
      </ul>
    </nz-dropdown>
<!--    <button class="create" nz-button [nzType]="'primary'" (click)="createModal()">
      <i *ngIf="width>1200" class="anticon anticon-plus"></i>
      <span> {{"i18nTextDefine_Create" | translate}} </span>
    </button>-->
  </div>

  <!-- <h2 *ngIf="!nonetwork" [ngClass]="{'title-modelshow':isVisible == true}">
    Please configure network links for registered devices and partner system.
  </h2> -->
  <h3  [ngClass]="{'title-modelshow':isVisible == true}">
    Network Topology:
  </h3>
  <div #tpContainer id="tpContainer" style="overflow: hidden;">
    <div *ngIf="nonetwork" style="padding: 20px">
      <h2>
        There is not any terminal device can be used for configuration
      </h2>
      <br>
      <h2>
        please register external network into ONAP.
      </h2>
    </div>
    <div class="no-network" *ngIf="nonetwork">
      <img src="assets/images/no-network-available.png" alt="No network available">
      <p>No network available</p>
    </div>
  </div>
  <div class="slicing-resource-table">
    <div class="slicing-resource-table-list">
      <nz-table
              #basicTable
              [nzData]="getValues(servicesMap)"
              [nzFrontPagination]="false"
              nzShowSizeChanger
              [nzPageSizeOptions]="[6,8,10]"
      >
        <thead>
        <tr>
          <th>Service Instance Id</th>
          <th>Service Type</th>
          <th>VLAN</th>
          <th>Bandwidth</th>
          <th>Status</th>
        </tr>
        </thead>
        <tbody>
        <ng-template ngFor let-data [ngForOf]="basicTable.data" let-i="index">
          <tr>
            <td>{{ data.id }}</td>
            <td>Cloud Lease Line</td>
            <td>{{ data.vlan }}</td>
            <td>{{ data.bw }}</td>
            <td>
              Activated
            </td>
          </tr>
        </ng-template>
        </tbody>
      </nz-table>
    </div>
  </div>
  <!--<div #tableContainer id="tableContainer" style="overflow: hidden;">
    <div *ngIf="nonetwork" style="padding: 20px">
      <h2>
        There is not any terminal device can be used for configuration
      </h2>
      <br>
      <h2>
        please register external network into ONAP.
      </h2>
    </div>
    <div class="no-network" *ngIf="nonetwork">
      <img src="assets/images/no-network-available.png" alt="No network available">
      <p>No network available</p>
    </div>
  </div> -->
  <!--Popup-->
  <div class="creation" id="d3_form" *ngIf="isVisible==true">
    <span class="v_color"></span>
    <h3 class="w_font4"> {{"i18nTextDefine_SetAttribtes" | translate}} </h3>
    <ul class="choose">
      <li>
        <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_LinkName" | translate}} </span>
        <input nz-input [(ngModel)]="linkName" maxlength="20">
      </li>
    </ul>
    <h4> {{"i18nTextDefine_LeftPort" | translate}} </h4>
    <ul class="choose">
      <li>
        <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_Network" | translate}} </span>
        <nz-select [(ngModel)]="networkVal1" nzShowSearch nzAllowClear (ngModelChange)="network1Change($event)">
          <nz-option *ngFor="let option of networkOption" [nzLabel]="option.network" [nzValue]="option.network"></nz-option>
        </nz-select>
      </li>
      <li>
       <span class="title-span"> <span class="red-span">*</span> {{"i18nTextDefine_Node" | translate}} </span>
        <nz-select  [(ngModel)]="selectedNode1" nzShowSearch nzAllowClear (ngModelChange)="node1Change($event)">
          <nz-option *ngFor="let node of nodeOption1[networkVal1]" [nzValue]="node" [nzLabel]="node"></nz-option>
        </nz-select>
      </li>
      <li>
        <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_TerminalPoint" | translate}} </span>
        <!-- <input  nz-input id="city-one" value=""> -->
        <nz-select [(ngModel)]="selecteTpName1" nzShowSearch nzAllowClear>
          <nz-option *ngFor="let tp of tpOption1" [nzValue]="tp" [nzLabel]="tp"></nz-option>
        </nz-select>
      </li>
    </ul>
    <h4> {{"i18nTextDefine_RightPort" | translate}} </h4>
    <label nz-checkbox [(ngModel)]="inputshow"> {{"i18nTextDefine_PartnerNetwork" | translate}} </label>
    <ul class="choose">
      <li>
        <span class="title-span"><span *ngIf="inputshow" class="red-span">*</span> {{"i18nTextDefine_HostUrl" | translate}} </span>
        <input nz-input [(ngModel)]="cloudUrl" [disabled]='!inputshow' [attr.disabled] ='!inputshow?true:undefined'>
      </li>
      <li>
        <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_Network" | translate}} </span>
        <input  nz-input *ngIf="inputshow" [(ngModel)]="cloudNetwork">
        <nz-select *ngIf="!inputshow" [(ngModel)]="networkVal2" nzShowSearch nzAllowClear (ngModelChange)="network2Change($event)">
          <nz-option *ngFor="let option of networkOption" [nzLabel]="option.network" [nzValue]="option.network"> </nz-option>
        </nz-select>
      </li>
      <li>
        <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_Node" | translate}} </span>
        <input  nz-input *ngIf="inputshow" [(ngModel)]="cloudNode">
        <nz-select *ngIf="!inputshow" [(ngModel)]="selectedNode2" nzShowSearch nzAllowClear (ngModelChange)="node2Change($event)">
          <nz-option *ngFor="let node of nodeOption1[networkVal2]" [nzValue]="node" [nzLabel]="node"></nz-option>
        </nz-select>
      </li>
      <li>
        <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_TerminalPoint" | translate}} </span>
        <input  nz-input *ngIf="inputshow" [(ngModel)]="cloudTp">
        <nz-select *ngIf="!inputshow" [(ngModel)]="selecteTpName2" nzShowSearch nzAllowClear>
          <nz-option *ngFor="let tp of tpOption2" [nzValue]="tp" [nzLabel]="tp"></nz-option>
        </nz-select>
      </li>
    </ul>
    <button nz-button nzType="primary" nzSize="small" style="width: 60px;" (click)="submitForm()"> {{"i18nTextDefine_modelOk" | translate}} </button>
    <button nz-button nzType="default" nzSize="small" style="width: 60px;" (click)="hideForm()"> {{"i18nTextDefine_Cancel" | translate}} </button>
  </div>
  <div class="creation" id="delbox" *ngIf="delBoxisVisible==true">
    <span class="v_color"></span>
    <ul class="choose">
      <li>
        <span class="title-span"> {{"i18nTextDefine_LinkName" | translate}} </span>
        <input nz-input [(ngModel)]="delLinkname" disabled="disabled">
      </li>
    </ul>
    <h4> {{"i18nTextDefine_LeftPort" | translate}} </h4>
    <ul class="choose">
      <li>
        <span class="title-span"> {{"i18nTextDefine_Network" | translate}} </span>
        <input nz-input [(ngModel)]="delNetwork1" disabled="disabled">
      </li>
      <li>
        <span class="title-span"> {{"i18nTextDefine_Node" | translate}} </span>
        <input nz-input [(ngModel)]="delNode1" disabled="disabled">
      </li>
      <li>
        <span class="title-span"> {{"i18nTextDefine_TerminalPoint" | translate}} </span>
        <input nz-input [(ngModel)]="delTp1" disabled="disabled">
      </li>
    </ul>
    <h4> {{"i18nTextDefine_RightPort" | translate}} </h4>
    <ul class="choose">
      <li *ngIf="delcloud">
        <span class="title-span"> {{"i18nTextDefine_HostUrl" | translate}} </span>
        <input nz-input [(ngModel)]="delcloudUrl" disabled="disabled">
      </li>
      <li>
        <span class="title-span"> {{"i18nTextDefine_Network" | translate}} </span>
        <input nz-input [(ngModel)]="delNetwork2" disabled="disabled">
      </li>
      <li>
      <span class="title-span"> {{"i18nTextDefine_Node" | translate}} </span>
      <input nz-input [(ngModel)]="delNode2" disabled="disabled">
      </li>
      <li>
        <span class="title-span"> {{"i18nTextDefine_TerminalPoint" | translate}} </span>
        <input nz-input [(ngModel)]="delTp2" disabled="disabled">
      </li>
    </ul>
    <button nz-button nzType="primary" nzSize="small" class="del-button" style="width: 90px;" (click)="delLink()" *ngIf="!delcloud"> {{"i18nTextDefine_DeleteLink" | translate}} </button>
    <button nz-button nzType="primary" nzSize="small" class="del-button" style="width: 90px;" (click)="delCloudLink()" *ngIf="delcloud"> {{"i18nTextDefine_DeleteLink" | translate}} </button>
    <button nz-button nzType="default" nzSize="small" class="del-button" style="width: 60px;" (click)="hideForm()"> {{"i18nTextDefine_Cancel" | translate}} </button>
  </div>
</div>
</nz-spin>