summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-05-13 00:18:56 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-05-13 00:19:02 +0800
commit875fc6eab813e28e3b4ccee01362ae751a2824c9 (patch)
tree41edb59f22ae73aeea21fdf224448dbb7b7f4089 /usecaseui-portal/src/app
parent3e7c63ee74ebf9f632e20c8eb5294afbdbe0d5a8 (diff)
Support OTN Domain Management
Change-Id: I4e431e642c1f0ec1d998614f861ee0909c1c5ffe Issue-ID: USECASEUI-226 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app')
-rw-r--r--usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.css29
-rw-r--r--usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.html79
-rw-r--r--usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.ts3
3 files changed, 81 insertions, 30 deletions
diff --git a/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.css b/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.css
index 0347ce72..2165364a 100644
--- a/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.css
+++ b/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.css
@@ -45,12 +45,41 @@
float: left;
background: #EEF9FF;
}
+#tpContainer .no-network{
+ width: 300px;
+ margin: 0 auto;
+ height: 280px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin-top: -140px;
+ margin-left: -150px;
+}
+.no-network img{
+ width: 100%;
+}
+.no-network p{
+ text-align: center;
+ color: #A0AACD;
+ font-size: 18px;
+ margin-top: 20px;
+}
.model {
position: relative;
padding: 15px;
height: 100vh;
width: 100%;
}
+.model h2{
+ display: inline-block;
+ margin: 0;
+ color: #3C4F8C;
+ margin-left: 10px;
+ display: inline-block;
+}
+.model .title-modelshow{
+ color: #A0AACD;
+}
.model .creation {
/*margin-top:-4%;*/
background-color: #fff;
diff --git a/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.html b/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.html
index 7e20c769..c7eae608 100644
--- a/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.html
+++ b/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.html
@@ -15,118 +15,137 @@
-->
<div class="model">
<!--chart-->
- <button nz-button nzType="primary" style="margin-top: 2px;display: block" (click)="showForm()">Add Link</button>
- <div id="tpContainer" style="overflow: hidden;"></div>
+ <button nz-button nzType="primary" *ngIf="!nonetwork" style="margin-top: 2px;display: inline-block" (click)="showForm()"
+ [disabled]='isVisible' [attr.disabled] ='isVisible?true:undefined'>
+ {{"i18nTextDefine_CreateLink" | translate}}
+ </button>
+ <h2 *ngIf="!nonetwork" [ngClass]="{'title-modelshow':isVisible == true}">
+ Please configure network links for registered devices and partner system.
+ </h2>
+ <div 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>
<!--Popup-->
<div class="creation" id="d3_form" *ngIf="isVisible==true">
<span class="v_color"></span>
- <h3 class="w_font4">Set Attribtes</h3>
+ <h3 class="w_font4"> {{"i18nTextDefine_SetAttribtes" | translate}} </h3>
<ul class="choose">
<li>
- <span class="title-span"><span class="red-span">*</span>Link Name </span>
+ <span class="title-span"><span class="red-span">*</span> {{"i18nTextDefine_LinkName" | translate}} </span>
<input nz-input [(ngModel)]="linkName" maxlength="20">
</li>
</ul>
- <h4>Left Port</h4>
+ <h4> {{"i18nTextDefine_LeftPort" | translate}} </h4>
<ul class="choose">
<li>
- <span class="title-span"><span class="red-span">*</span>Network </span>
+ <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>Node </span>
+ <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>Terminal Point </span>
+ <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>Right Port</h4>
- <label nz-checkbox [(ngModel)]="inputshow">Partner Network</label>
+ <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>Host Url</span>
+ <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>Network </span>
+ <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>Node </span>
+ <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>Terminal Point </span>
+ <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()">OK</button>
- <button nz-button nzType="default" nzSize="small" style="width: 60px;" (click)="hideForm()">Cancel</button>
+ <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>
- <h3 class="w_font4">Set Attribtes</h3>
<ul class="choose">
<li>
- <span class="title-span">Link Name </span>
+ <span class="title-span"> {{"i18nTextDefine_LinkName" | translate}} </span>
<input nz-input [(ngModel)]="delLinkname" disabled="disabled">
</li>
</ul>
- <h4>Left Port</h4>
+ <h4> {{"i18nTextDefine_LeftPort" | translate}} </h4>
<ul class="choose">
<li>
- <span class="title-span">Network </span>
+ <span class="title-span"> {{"i18nTextDefine_Network" | translate}} </span>
<input nz-input [(ngModel)]="delNetwork1" disabled="disabled">
</li>
<li>
- <span class="title-span">Node </span>
+ <span class="title-span"> {{"i18nTextDefine_Node" | translate}} </span>
<input nz-input [(ngModel)]="delNode1" disabled="disabled">
</li>
<li>
- <span class="title-span">Terminal Point </span>
+ <span class="title-span"> {{"i18nTextDefine_TerminalPoint" | translate}} </span>
<input nz-input [(ngModel)]="delTp1" disabled="disabled">
</li>
</ul>
- <h4>Right Port</h4>
+ <h4> {{"i18nTextDefine_RightPort" | translate}} </h4>
<ul class="choose">
<li *ngIf="delcloud">
- <span class="title-span">Host Url</span>
+ <span class="title-span"> {{"i18nTextDefine_HostUrl" | translate}} </span>
<input nz-input [(ngModel)]="delcloudUrl" disabled="disabled">
</li>
<li>
- <span class="title-span">Network </span>
+ <span class="title-span"> {{"i18nTextDefine_Network" | translate}} </span>
<input nz-input [(ngModel)]="delNetwork2" disabled="disabled">
</li>
<li>
- <span class="title-span">Node </span>
+ <span class="title-span"> {{"i18nTextDefine_Node" | translate}} </span>
<input nz-input [(ngModel)]="delNode2" disabled="disabled">
</li>
<li>
- <span class="title-span">Terminal Point </span>
+ <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">delete Link</button>
- <button nz-button nzType="primary" nzSize="small" class="del-button" style="width: 90px;" (click)="delCloudLink()" *ngIf="delcloud">delete Link</button>
- <button nz-button nzType="default" nzSize="small" class="del-button" style="width: 60px;" (click)="hideForm()">Cancel</button>
+ <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>
diff --git a/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.ts b/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.ts
index 3bf4aa70..cfd32f7c 100644
--- a/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.ts
+++ b/usecaseui-portal/src/app/ccvpn-network/ccvpn-network.component.ts
@@ -82,6 +82,7 @@ export class CcvpnNetworkComponent implements OnInit {
}
addLinkDisabled = true;
+ nonetwork = false;
isVisible = false;
outCloudShow = false;
inputshow = false;
@@ -169,8 +170,10 @@ export class CcvpnNetworkComponent implements OnInit {
.subscribe((data) => {
if (data.length == 0) {
this.addLinkDisabled = false;
+ this.nonetwork = true;
return;
}
+ this.nonetwork = false;
for (let ii = 0; ii < data.length; ii++) {//Determine if there is external cloud information in the data, and kick it out.
if (data[ii]['aaiId'] != null) {
this.dataCloud = data.splice(ii, 1);