aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-05-08 18:20:13 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-05-08 18:20:17 +0800
commit2f59d78fd5e99ea90a513d06e626f9915f0b945c (patch)
treeb8738e1cdab52e727274701de263e0ae1c4ccfc6 /usecaseui-portal
parent1f7c49a6330d157c90579f5669e3faf863c81ad4 (diff)
Fix instance instantiation for CCVPN
Change-Id: I1b79ec5fd5ab16d93c254b3384c84e841083b05f Issue-ID: USECASEUI-220 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal')
-rw-r--r--usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css2
-rw-r--r--usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html31
-rw-r--r--usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts12
3 files changed, 27 insertions, 18 deletions
diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css
index 5d65e550..ce546cb8 100644
--- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css
+++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css
@@ -63,7 +63,7 @@ hr {
}
.model .submit{
position: absolute;
- width:116px;
+ width:90px;
height: 35px;
top: 10px;
right: 85px;
diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
index 3ae5af27..6fe6825e 100644
--- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
+++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
@@ -18,10 +18,10 @@
<div class="model creation-model">
<div class="top-title">
- <h3 class="title fl">{{createParams.commonParams.templateType}} Instance Creation</h3>
+ <h3 class="title fl">{{createParams.commonParams.templateType}} {{"i18nTextDefine_InstanceCreation" | translate}} </h3>
<div class="fl" style="width: 20%">
- <button class="submit" nz-button (click)="submit()"><i
- class="anticon anticon-plus" style="transform: scale(1.5);line-height: 15px;margin-right: 5px;"></i><span>Create</span></button>
+ <button class="submit" nz-button (click)="submit()"><span> {{"i18nTextDefine_Create" | translate}} </span>
+ </button>
<button class="back" nz-button (click)="goback()">
<i class="anticon anticon-arrow-left" style="transform: scale(1.5)"></i>
</button>
@@ -30,14 +30,13 @@
<!-- chart -->
<div class="chart">
<span style="padding: 25px;display: inline-block;">
- Instance Topology
+ {{"i18nTextDefine_InstanceTopology" | translate}}
</span>
<div id="createChart">
<svg width="100%" height="100%">
<image id="domain" xlink:href="../../assets/images/domain1.png" style="width: 15%"
x="40%" y="0"/>
</svg>
- <!-- <p class="siteNameP" [ngStyle]="siteNameStyle">{{ siteName }}</p> -->
</div>
</div>
<div class="creation">
@@ -56,7 +55,7 @@
<h3 style="float: left;color: #3C4F8C">sdwanVPN List</h3>
<button nz-button (click)="addSotnvpn()" class="addListBtn"
style="float: right;margin-right: 10px"><i class="anticon anticon-plus"
- style="transform: scale(1.2);font-weight: 700"></i>Add
+ style="transform: scale(1.2);font-weight: 700"></i> {{"i18nTextDefine_Add" | translate}}
</button>
</div>
<nz-table #sotnVpnTable [nzData]="sotnVpnTableData"
@@ -90,11 +89,11 @@
</nz-tab>
<nz-tab nzTitle="Sdwansiteresource List">
<div class="site">
- <div>
+ <div style="height: 10px">
<h3 style="float: left;color: #3C4F8C">Site List</h3>
<button nz-button (click)="addSite()" class="addListBtn"
style="float: right;margin-right: 10px"><i class="anticon anticon-plus"
- style="transform: scale(1.2);font-weight: 700"></i>Add
+ style="transform: scale(1.2);font-weight: 700"></i>{{"i18nTextDefine_Add" | translate}}
</button>
</div>
<nz-table #siteTable [nzData]="siteTableData"
@@ -136,7 +135,7 @@
</div>
<!-- sotnVpnmodel -->
<div class="sotnnpnmodel" *ngIf="sotnVpnModelShow">
- <h3>Base</h3>
+ <h3> {{"i18nTextDefine_Base" | translate}} </h3>
<div class="inputs">
<ul>
<li *ngFor="let item of this.templateParameters.sotnvpn.sdwanvpnresource_list">
@@ -150,7 +149,7 @@
<div>
<div style="width: 100%;text-align: right">
<button nz-button (click)="addSotnSdwansitelan()" class="addListBtn"><i class="anticon anticon-plus"
- style="transform: scale(1.2);font-weight: 700;"></i>Add
+ style="transform: scale(1.2);font-weight: 700;"></i>{{"i18nTextDefine_Add" | translate}}
</button>
</div>
<table class="siteWanTab">
@@ -187,13 +186,13 @@
</div>
<div class="action">
- <button nz-button nzType="primary" (click)="addSotnVpn_cancel()">Cancel</button>
- <button nz-button nzType="primary" (click)="addSotnVpn_OK()">Add</button>
+ <button nz-button nzType="primary" (click)="addSotnVpn_cancel()">{{"i18nTextDefine_Cancel" | translate}}</button>
+ <button nz-button nzType="primary" (click)="addSotnVpn_OK()">{{"i18nTextDefine_Add" | translate}}</button>
</div>
</div>
<!-- sitemodel -->
<div class="sitemodel" *ngIf="siteModelShow">
- <h3>Base</h3>
+ <h3> {{"i18nTextDefine_Base" | translate}} </h3>
<div class="inputs">
<ul>
<li *ngFor="let item of this.templateParameters.site.sdwansiteresource_list">
@@ -216,7 +215,7 @@
<div>
<div style="width: 100%;text-align: right">
<button nz-button (click)="addSiteWan()" class="addListBtn"><i class="anticon anticon-plus"
- style="transform: scale(1.2);font-weight: 700;"></i>Add
+ style="transform: scale(1.2);font-weight: 700;"></i>{{"i18nTextDefine_Add" | translate}}
</button>
</div>
<table class="siteWanTab">
@@ -253,8 +252,8 @@
</div>
<div class="action">
- <button nz-button nzType="primary" (click)="addsite_cancel()">Cancel</button>
- <button nz-button nzType="primary" (click)="addsite_OK()">Add</button>
+ <button nz-button nzType="primary" (click)="addsite_cancel()">{{"i18nTextDefine_Cancel" | translate}}</button>
+ <button nz-button nzType="primary" (click)="addsite_OK()">{{"i18nTextDefine_Add" | translate}}</button>
</div>
</div>
<div class="mask" *ngIf="siteModelShow || sotnVpnModelShow"></div>
diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts
index 0200de85..258e69d0 100644
--- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts
+++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts
@@ -17,6 +17,7 @@ import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
import * as d3 from 'd3';
import * as $ from 'jquery';
import { MyhttpService } from '../myhttp.service';
+import {el} from "@angular/platform-browser/testing/src/browser_util";
@Component({
selector: 'app-ccvpn-creation',
@@ -32,7 +33,6 @@ export class CcvpnCreationComponent implements OnInit {
}
@Input() createParams;
- @Input() namesTranslate; //Input parameter name conversion
@Output() closeCreate = new EventEmitter();
//tabBarStyle
@@ -244,6 +244,12 @@ export class CcvpnCreationComponent implements OnInit {
console.log(sotnSdwansitelanData);
}
deleteSotnSdwansitelan(num, item, sotnSdwansitelanData){
+ if(this.sotnSdwansitelanData.length <= 1){
+ console.log("num>=1","sotnSdwansitelanData");
+ return false;
+ }else {
+
+ }
this.sotnSdwansitelanData = this.sotnSdwansitelanData.filter((d, i) => i !== num - 1);
console.log(this.sotnSdwansitelanData)
}
@@ -275,6 +281,10 @@ export class CcvpnCreationComponent implements OnInit {
console.log(siteWanData);
}
deleteWanPort(num, item, siteWanData){
+ if(this.siteWanData.length <= 1){
+ console.log("num>=1","siteWanData");
+ return false;
+ }
this.siteWanData = this.siteWanData.filter((d, i) => i !== num - 1);
console.log(this.siteWanData)
}