summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/components
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-02-21 17:25:46 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-02-21 17:28:28 +0800
commit0d7de309f6ac0683525b7f1d77743275ceec3305 (patch)
treedf8c6667fb98b7e4915b62e9f274af45448b4eba /usecaseui-portal/src/app/components
parent8f1facfc42a7ab98cf39f624034dbd6e82b83386 (diff)
Fix instance instantiation for E2E
Change-Id: Ie95dc72d3a7929147923cddaf65cdec2e2c53168 Issue-ID: USECASEUI-220 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/components')
-rw-r--r--usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.html273
-rw-r--r--usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.less100
-rw-r--r--usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts6
3 files changed, 258 insertions, 121 deletions
diff --git a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.html b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.html
index 0ada7dd1..4a2f2f69 100644
--- a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.html
+++ b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.html
@@ -1,5 +1,5 @@
<!--
- Copyright (C) 2018 CMCC, Inc. and others. All rights reserved.
+ Copyright (C) 2019 CMCC, Inc. and others. 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.
@@ -13,111 +13,184 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<h3 class="title"> Services List </h3>
-<hr>
-<div class="model">
- <!-- 创建数据 -->
- <button class="back" nz-button (click)="goback()"><span><i class="anticon anticon-rollback"></i></span></button>
- <div class="creation fl">
- <div *ngIf="createParams.commonParams.templateType=='E2E Service'" class="baseparms clearfix">
- <h3>Base</h3>
- <ul>
- <li><span>Name*</span> <input nz-input [(ngModel)]="service.name"></li>
- <li><span>Description*</span> <input nz-input [(ngModel)]="service.description"></li>
- </ul>
- <br>
- <h3>Template Parameters</h3>
- <h4>template Inputs</h4>
- <ul>
- <li *ngFor="let parameter of templateParameters.inputs; let i = index;">
- <span *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'">{{parameter.name}}:</span>
- <input *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'" nz-input [(ngModel)]="parameter.value">
-
- <h5 *ngIf="parameter.type === 'vf_location'" style="padding-left:10px;">id: {{parameter.name}}</h5>
- <span *ngIf="parameter.type === 'vf_location'"> vf_location: </span>
- <nz-select *ngIf="parameter.type === 'vf_location'" style="width: 165px;" [(ngModel)]="parameter.value" nzAllowClear >
- <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
- </nz-select>
- <!-- <nz-select *ngIf="parameter.type === 'sdn_controller'" style="width: 165px;" [(ngModel)]="parameter.value" nzAllowClear >
- <nz-option *ngFor="let control of sdnControllers" [nzValue]="control" [nzLabel]="control.name"></nz-option>
- </nz-select> -->
- </li>
- </ul>
- <h4>nestedTemplate Inputs</h4>
- <div *ngFor="let template of templateParameters.nestedTemplates;">
- <h4 style="font:400 14px 'Arial';color:#aaa;">templateName: {{template.name}}</h4>
- <ul>
- <li *ngFor="let input of template.inputs; let i = index;">
- <span *ngIf="input.type !== 'vf_location' && input.type !== 'sdn_controller'" > {{input.name}}: </span>
- <input *ngIf="input.type !== 'vf_location' && input.type !== 'sdn_controller'" nz-input [(ngModel)]="input.value">
-
- <h5 *ngIf="input.type === 'vf_location'" style="padding-left:10px;">id: {{input.name}}</h5>
- <span *ngIf="input.type === 'vf_location'"> vf_location: </span>
- <nz-select *ngIf="input.type === 'vf_location'" style="width: 165px;" [(ngModel)]="input.value" nzAllowClear >
- <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
- </nz-select>
- <!-- <nz-select *ngIf="input.type === 'sdn_controller'" style="width: 165px;" [(ngModel)]="input.value" nzAllowClear >
- <nz-option *ngFor="let control of sdnControllers" [nzValue]="control" [nzLabel]="control.name"></nz-option>
- </nz-select> -->
- </li>
- </ul>
- </div>
-
+<!--<h3 class="title"> Services List </h3>-->
+<div class="model creation-model">
+
+ <div class="top-title">
+ <h3 class="title fl">{{createParams.commonParams.templateType}} Instance Creation</h3>
+ <div class="fl" style="width: 20%">
+ <button class="submit" nz-button (click)="submit()"><span>Create</span></button>
+ <button class="back" nz-button (click)="goback()">
+ <i class="anticon anticon-arrow-left" style="transform: scale(1.5)"></i>
+ </button>
+ </div>
+ </div>
+ <div class="creation fl">
+ <div *ngIf="createParams.commonParams.templateType=='E2E Service'" class="baseparms clearfix">
+ <!--2019.02.21 add-->
+ <div class="vnf-box">
+ <h3>Base</h3>
+ <ul class="clearfix">
+ <li><span>Name:</span> <input nz-input [(ngModel)]="service.name"></li>
+ <li><span>Description:</span> <input nz-input [(ngModel)]="service.description"></li>
+ <li><span>COS:</span> <input nz-input [(ngModel)]="service.COS"></li>
+ <li><span>EBS:</span> <input nz-input [(ngModel)]="service.EBS"></li>
+ <li>
+ <span style="vertical-align: top;margin-top: 3px;">checkbox</span>
+ <nz-checkbox-wrapper style="width: 100%;" (nzOnChange)="log($event)">
+ <div nz-row>
+ <div nz-col style="margin-bottom: 10px"><label nz-checkbox nzValue="A"
+ [nzDisabled]="true">Mauris rutrum quam p
+ </label></div>
+ <div nz-col><label nz-checkbox nzValue="B" [ngModel]="true">fince in felis nec e
+ </label></div>
+ </div>
+ </nz-checkbox-wrapper>
+ </li>
+ </ul>
+ </div>
+ <div class="vnf-box">
+ <h3>VNF1</h3>
+ <ul class="clearfix">
+ <li><span>Name:</span> <input nz-input></li>
+ <li><span>Description:</span> <input nz-input></li>
+ <li>
+ <span style="vertical-align: top;margin-top: 3px;">radio button</span>
+ <nz-radio-group [(ngModel)]="radioValue1" nzName="radiogroup">
+ <label nz-radio [ngStyle]="{'margin-bottom':'10px'}" nzValue="Selected" [ngModel]="true">Selected</label>
+ <br>
+ <label nz-radio [ngStyle]="style" nzValue="Disaled">Disaled</label>
+ </nz-radio-group>
+ </li>
+ <li>
+ <span>pull down:</span>
+ <nz-select nzAllowClear [(ngModel)]="selectedValue">
+ <nz-option nzValue="Heresanoption" nzLabel="Heresanoption"></nz-option>
+ <nz-option nzValue="Anotheroption" nzLabel="Anotheroption"></nz-option>
+ <nz-option nzValue="Thirdoption" nzLabel="Thirdoption"></nz-option>
+ <nz-option nzValue="Noneoftheabove" nzLabel="Noneoftheabove"></nz-option>
+ </nz-select>
+ </li>
+ </ul>
+ </div>
+ <div class="vnf-box">
+ <h3>VNF2</h3>
+ <ul class="clearfix">
+ <li><span>Name:</span> <input nz-input></li>
+ <li><span>Description:</span> <input nz-input></li>
+ <li>
+ <span style="vertical-align: top;margin-top: 3px;" nzName="radiogroup2">radio button</span>
+ <nz-radio-group [(ngModel)]="radioValue2">
+ <label nz-radio [ngStyle]="{'margin-bottom':'10px'}" nzValue="Selected2" [ngModel]="true">Selected2</label>
+ <br>
+ <label nz-radio [ngStyle]="style" nzValue="Disaled2">Disaled2</label>
+ </nz-radio-group>
+ </li>
+ </ul>
+ </div>
+ <div class="vnf-box">
+ <h3>template Inputs</h3>
+ <ul>
+ <li *ngFor="let parameter of templateParameters.inputs; let i = index;">
+ <span *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'">{{parameter.name}}:</span>
+ <input *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'" nz-input
+ [(ngModel)]="parameter.value">
+
+ <h5 *ngIf="parameter.type === 'vf_location'" style="padding-left:10px;">id:
+ {{parameter.name}}</h5>
+ <span *ngIf="parameter.type === 'vf_location'"> vf_location: </span>
+ <nz-select *ngIf="parameter.type === 'vf_location'" style="width: 165px;"
+ [(ngModel)]="parameter.value" nzAllowClear>
+ <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
+ </nz-select>
+ <!-- <nz-select *ngIf="parameter.type === 'sdn_controller'" style="width: 165px;" [(ngModel)]="parameter.value" nzAllowClear >
+ <nz-option *ngFor="let control of sdnControllers" [nzValue]="control" [nzLabel]="control.name"></nz-option>
+ </nz-select> -->
+ </li>
+ </ul>
+ <h4>nestedTemplate Inputs</h4>
+ <div *ngFor="let template of templateParameters.nestedTemplates;">
+ <h4 style="font:400 14px 'Arial';color:#aaa;">templateName: {{template.name}}</h4>
+ <ul>
+ <li *ngFor="let input of template.inputs; let i = index;">
+ <span *ngIf="input.type !== 'vf_location' && input.type !== 'sdn_controller'"> {{input.name}}: </span>
+ <input *ngIf="input.type !== 'vf_location' && input.type !== 'sdn_controller'" nz-input
+ [(ngModel)]="input.value">
+
+ <h5 *ngIf="input.type === 'vf_location'" style="padding-left:10px;">id: {{input.name}}</h5>
+ <span *ngIf="input.type === 'vf_location'"> vf_location: </span>
+ <nz-select *ngIf="input.type === 'vf_location'" style="width: 165px;"
+ [(ngModel)]="input.value"
+ nzAllowClear>
+ <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim"
+ [nzLabel]="vim.name"></nz-option>
+ </nz-select>
+ <!-- <nz-select *ngIf="input.type === 'sdn_controller'" style="width: 165px;" [(ngModel)]="input.value" nzAllowClear >
+ <nz-option *ngFor="let control of sdnControllers" [nzValue]="control" [nzLabel]="control.name"></nz-option>
+ </nz-select> -->
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div *ngIf="createParams.commonParams.templateType=='Network Service'" class="baseparms clearfix">
+ <div class="vnf-box">
+ <h3>Base</h3>
+ <ul class="clearfix">
+ <li><span>Name:</span> <input nz-input [(ngModel)]="ns_service.nsName"></li>
+ <li><span>Description:</span> <input nz-input [(ngModel)]="ns_service.description"></li>
+ </ul>
+ </div>
+ <div class="vnf-box">
+ <h3>Template Parameters</h3>
+ <h4>template Inputs</h4>
+ <ul>
+ <li *ngFor="let parameter of nsTemplateParameters.inputs2; let i = index;">
+ <span *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'">{{parameter.name}}:</span>
+ <input *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'" nz-input
+ [(ngModel)]="parameter.value">
+
+ <h5 *ngIf="parameter.type === 'vf_location'" style="padding-left:10px;">id:
+ {{parameter.name}}</h5>
+ <span *ngIf="parameter.type === 'vf_location'"> vf_location: </span>
+ <nz-select *ngIf="parameter.type === 'vf_location'" style="width: 165px;"
+ [(ngModel)]="parameter.value" nzAllowClear>
+ <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
+ </nz-select>
+ <!-- <nz-select *ngIf="parameter.type === 'sdn_controller'" style="width: 165px;" [(ngModel)]="parameter.value" nzAllowClear >
+ <nz-option *ngFor="let control of sdnControllers" [nzValue]="control" [nzLabel]="control.name"></nz-option>
+ </nz-select> -->
+ </li>
+ </ul>
+
+ <h4>vnfs Inputs</h4>
+
+ <ul>
+ <li *ngFor="let vnf of nsTemplateParameters.vnfs;">
+ <h5 style="padding-left:10px;">id: {{vnf.vnf_id}}</h5>
+ <span> vf_location: </span>
+ <nz-select style="width: 165px;" [(ngModel)]="vnf.value" nzAllowClear>
+ <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
+ </nz-select>
+ </li>
+ </ul>
+ </div>
+ </div>
</div>
- <div *ngIf="createParams.commonParams.templateType=='Network Service'" class="baseparms clearfix">
- <h3>Base</h3>
- <ul>
- <li><span>Name*</span> <input nz-input [(ngModel)]="ns_service.nsName"></li>
- <li><span>Description*</span> <input nz-input [(ngModel)]="ns_service.description"></li>
- </ul>
- <h3>Template Parameters</h3>
- <h4>template Inputs</h4>
- <ul>
- <li *ngFor="let parameter of nsTemplateParameters.inputs2; let i = index;">
- <span *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'">{{parameter.name}}:</span>
- <input *ngIf="parameter.type !== 'vf_location' && parameter.type !== 'sdn_controller'" nz-input [(ngModel)]="parameter.value">
-
- <h5 *ngIf="parameter.type === 'vf_location'" style="padding-left:10px;">id: {{parameter.name}}</h5>
- <span *ngIf="parameter.type === 'vf_location'"> vf_location: </span>
- <nz-select *ngIf="parameter.type === 'vf_location'" style="width: 165px;" [(ngModel)]="parameter.value" nzAllowClear >
- <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
- </nz-select>
- <!-- <nz-select *ngIf="parameter.type === 'sdn_controller'" style="width: 165px;" [(ngModel)]="parameter.value" nzAllowClear >
- <nz-option *ngFor="let control of sdnControllers" [nzValue]="control" [nzLabel]="control.name"></nz-option>
- </nz-select> -->
- </li>
- </ul>
+ <!-- chart -->
+ <div class="chart fr">
+ <div id="createChart">
+ <svg width="100%" height="100%">
- <h4>vnfs Inputs</h4>
+ <image xlink:href="./assets/images/cloud-site.png"
+ x="25%" y="30%" width="50%"/>
- <ul>
- <li *ngFor="let vnf of nsTemplateParameters.vnfs;">
- <h5 style="padding-left:10px;">id: {{vnf.vnf_id}}</h5>
- <span> vf_location: </span>
- <nz-select style="width: 165px;" [(ngModel)]="vnf.value" nzAllowClear >
- <nz-option *ngFor="let vim of vimInfos" [nzValue]="vim" [nzLabel]="vim.name"></nz-option>
- </nz-select>
- </li>
- </ul>
+ </svg>
+ </div>
</div>
- <button class="submit" nz-button [nzType]="'primary'" (click)="submit()"><span>Create</span></button>
- </div>
-
- <!-- 图 -->
- <div class="chart fr">
- Create Service
- <div id="createChart">
- <svg width="100%" height="100%">
-
- <image xlink:href="./assets/images/cloud-site.png"
- x="25%" y="30%" width="50%"/>
-
- </svg>
-
- </div>
- </div>
</div>
diff --git a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.less b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.less
index b8c41877..ea7c5bac 100644
--- a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.less
+++ b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.less
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2018 CMCC, Inc. and others. All rights reserved.
+ Copyright (C) 2019 CMCC, Inc. and others. 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.
@@ -25,56 +25,118 @@ hr {
margin-bottom: 10px;
}
.model {
- background-color: #fff;
- height: 90%;
+ background-color: #F7F8FC;
+ height: 100%;
overflow-y: auto;
+ position: relative;
+ .top-title{ /*2019.01.22 add*/
+ width: 100%;
+ padding: 20px;
+ position: relative;
+ display: inline-block;
+ }
+ .submit{
+ position: absolute;
+ width:84px;
+ height: 35px;
+ top: 10px;
+ right: 85px;
+ color: #fff;
+ font-size: 18px;
+ background:linear-gradient(90deg,rgba(99,194,246,1) 0%,rgba(62,155,255,1) 100%) !important;
+ border-radius:4px;
+ border: none!important;
+ border-color:rgba(0,0,0,0)!important;
+ }
+ .submit:hover{
+ background:linear-gradient(90deg, rgb(103, 207, 246) 0%, rgb(69, 175, 255) 100%) !important;
+ border: none;
+ }
.back {
position: absolute;
top: 10px;
right: 20px;
+ display: inline-block;
+ width: 35px;
+ height: 35px;
+ background:#ffffff!important;
+ border-radius:4px;
+ color: #D7D7D7;
+ }
+ .back:hover{
+ background:#ffffff;
+ color: #3F9CFF;
+ border:1px solid #3F9CFF;
+ }
+ .top-title h3.title {
+ height: 35px;
+ width: 80%;
+ font-size:16px;
+ font-family:ArialMT;
+ color:#3C4F8C;
+ line-height:35px;
+ display: inline-block;
+ /*top:10px;*/
+
}
.creation{
position: relative;
- width: 60%;
+ width: 58%;
height: 100%;
overflow-y: auto;
border-radius: 5px;
padding: 20px;
+ background: #fff;
+ margin-left: 30px;
+ box-shadow:0px 10px 15px 2px rgba(222,222,222,0.5);
.baseparms {
h3 {
- color: #3fa8eb;
- font: 700 16px "Arial";
+ color: #06A7E2;
+ width: 96%;
+ height: 40px;
+ line-height: 35px;
+ font-size: 18px;
+ font-weight: 500;
+ margin: 10px auto;
+ border-bottom: 2px solid;
+ border-image: -webkit-linear-gradient(#07A9E1,#30D9C4) 100 100;
+ border-image: -moz-linear-gradient(#07A9E1,#30D9C4) 100 100;
+ border-image: linear-gradient(#07A9E1,#30D9C4) 100 100;
+ border-radius:2px;
}
h4 {
font: 700 16px "Arial";
+ margin-left: 25px;
+ }
+ ul{
+ margin-left: 30px;
}
ul li {
// display: inline-block;
- margin: 3px 0;
+ margin: 10px 0;
+ width: 40%;
+ float: left;
+ text-align: left;
span {
display: inline-block;
- width: 40%;
+ width: 25%;
font: 700 14px "Arial";
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
- text-align: right;
+ text-align: left;
}
- input {
- width: 165px;
+ input,nz-select{
+ width: 170px;
}
}
}
- .submit {
- position: absolute;
- top: 10px;
- right: 20px;
- }
}
.chart {
- width: 40%;
+ width: 35%;
padding: 10px;
- height: 100%;
- border-left: 10px solid #f3f3f3;
+ height: 95%;
+ box-shadow: 0px 10px 35px 10px rgba(222, 222, 222, 0.5);
+ margin-right: 40px;
}
}
diff --git a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts
index 8fc9fb60..261aa3f9 100644
--- a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts
+++ b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2018 CMCC, Inc. and others. All rights reserved.
+ Copyright (C) 2019 CMCC, Inc. and others. 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.
@@ -57,7 +57,7 @@ export class E2eCreationComponent implements OnInit {
inputs2:[],
vnfs:[]
}
- getTemParameters(){ //获取模板参数
+ getTemParameters(){ //Get template parameters
let type = this.createParams.commonParams.templateType == "E2E Service" ? "e2e" : "ns";
this.myhttp.getTemplateParameters(type,this.createParams.template)
.subscribe((data)=>{
@@ -104,6 +104,8 @@ export class E2eCreationComponent implements OnInit {
service = {
name: "",
description: "",
+ COS:"",
+ EBS:"",
serviceInvariantUuid: "",
serviceUuid: "", // uuid ??
globalSubscriberId: "", // "customer.id",