From e5373722e30a8d33070a8ea9c304836673893d93 Mon Sep 17 00:00:00 2001 From: guochuyicmri Date: Wed, 3 Apr 2019 18:13:54 +0800 Subject: Modify the overall code lincence and comments Change-Id: I821814d97f9e8b8b683d0a2850ea73a104118fd9 Issue-ID: USECASEUI-212 Signed-off-by: guochuyicmri --- .../.settings/org.eclipse.m2e.core.prefs | 4 ++ usecaseui-portal/karma.conf.js | 2 +- usecaseui-portal/pom.xml | 2 +- usecaseui-portal/src/app/alarm/alarm.component.ts | 8 ++-- usecaseui-portal/src/app/animates.ts | 31 +++++++++---- usecaseui-portal/src/app/app-routing.module.ts | 17 ++++++- usecaseui-portal/src/app/app.component.css | 2 +- usecaseui-portal/src/app/app.component.ts | 17 ++++++- usecaseui-portal/src/app/app.module.ts | 15 +++++++ .../app/components/charts/bar/bar.component.html | 2 +- .../src/app/components/charts/bar/bar.component.ts | 29 +++++++++--- .../app/components/charts/line/line.component.html | 2 +- .../app/components/charts/line/line.component.ts | 29 +++++++++--- .../app/components/charts/pie/pie.component.html | 2 +- .../src/app/components/charts/pie/pie.component.ts | 33 ++++++++++---- .../components/customer/customer.component.html | 15 +++++++ .../components/customer/customer.component.less | 15 +++++++ .../app/components/customer/customer.component.ts | 15 +++++++ .../app/components/details/details.component.css | 2 +- .../app/components/details/details.component.html | 2 +- .../app/components/details/details.component.less | 15 +++++++ .../app/components/details/details.component.ts | 17 ++++++- .../graphiclist/graphiclist.component.css | 15 +++++++ .../graphiclist/graphiclist.component.html | 2 +- .../graphiclist/graphiclist.component.less | 15 +++++++ .../graphiclist/graphiclist.component.ts | 2 +- .../performance-details.component.css | 15 +++++++ .../performance-details.component.html | 14 ++++++ .../performance-details.component.less | 14 ++++++ .../performance-details.component.ts | 15 +++++++ usecaseui-portal/src/app/home/home.component.css | 2 +- usecaseui-portal/src/app/home/home.component.less | 15 +++++++ usecaseui-portal/src/app/home/home.component.ts | 22 ++++----- usecaseui-portal/src/app/homes.service.ts | 2 +- .../src/app/management/management.component.html | 15 +++++++ .../src/app/management/management.component.less | 15 +++++++ .../src/app/management/management.component.ts | 15 +++++++ usecaseui-portal/src/app/onboard.service.ts | 25 ++++++++--- .../performance-vm/performance-vm.component.css | 2 +- .../performance-vm/performance-vm.component.html | 2 +- .../performance-vm/performance-vm.component.less | 15 +++++++ .../performance-vm/performance-vm.component.ts | 10 ++--- .../performance-vnf/performance-vnf.component.css | 15 +++++++ .../performance-vnf/performance-vnf.component.less | 15 +++++++ .../src/app/performance/performance.component.css | 2 +- .../src/app/performance/performance.component.html | 2 +- .../onboard-vnf-vm/onboard-vnf-vm.component.css | 2 +- .../onboard-vnf-vm/onboard-vnf-vm.component.ts | 52 +++++++++++----------- .../src/app/services/services.component.html | 2 +- usecaseui-portal/src/my-theme.css | 2 +- usecaseui-portal/src/styles.css | 2 +- usecaseui-portal/src/styles.less | 22 ++++----- 52 files changed, 508 insertions(+), 116 deletions(-) create mode 100644 usecaseui-portal/.settings/org.eclipse.m2e.core.prefs diff --git a/usecaseui-portal/.settings/org.eclipse.m2e.core.prefs b/usecaseui-portal/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000..f897a7f1 --- /dev/null +++ b/usecaseui-portal/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/usecaseui-portal/karma.conf.js b/usecaseui-portal/karma.conf.js index bd8cc9b1..bbfd57cf 100644 --- a/usecaseui-portal/karma.conf.js +++ b/usecaseui-portal/karma.conf.js @@ -1,7 +1,7 @@ /* ============LICENSE_START========================================== =================================================================== -Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +Copyright (C) 2019 IBM Intellectual Property. All rights reserved. =================================================================== Unless otherwise specified, all software contained herein is licensed diff --git a/usecaseui-portal/pom.xml b/usecaseui-portal/pom.xml index 9f16c135..11ed216f 100644 --- a/usecaseui-portal/pom.xml +++ b/usecaseui-portal/pom.xml @@ -1,6 +1,6 @@
diff --git a/usecaseui-portal/src/app/components/customer/customer.component.less b/usecaseui-portal/src/app/components/customer/customer.component.less index b7b4bc24..f591cc4b 100644 --- a/usecaseui-portal/src/app/components/customer/customer.component.less +++ b/usecaseui-portal/src/app/components/customer/customer.component.less @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ .content { width: 100%; height: 100vh; diff --git a/usecaseui-portal/src/app/components/customer/customer.component.ts b/usecaseui-portal/src/app/components/customer/customer.component.ts index bd27d36c..3008ae02 100644 --- a/usecaseui-portal/src/app/components/customer/customer.component.ts +++ b/usecaseui-portal/src/app/components/customer/customer.component.ts @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ import { Component, OnInit } from '@angular/core'; @Component({ diff --git a/usecaseui-portal/src/app/components/details/details.component.css b/usecaseui-portal/src/app/components/details/details.component.css index 0d450d28..0b5493d7 100644 --- a/usecaseui-portal/src/app/components/details/details.component.css +++ b/usecaseui-portal/src/app/components/details/details.component.css @@ -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. diff --git a/usecaseui-portal/src/app/components/details/details.component.html b/usecaseui-portal/src/app/components/details/details.component.html index 1f431760..62770b60 100644 --- a/usecaseui-portal/src/app/components/details/details.component.html +++ b/usecaseui-portal/src/app/components/details/details.component.html @@ -1,5 +1,5 @@

HEADER INFORMATION

diff --git a/usecaseui-portal/src/app/components/performance-details/performance-details.component.less b/usecaseui-portal/src/app/components/performance-details/performance-details.component.less index ad81d8a6..c1ca74f5 100644 --- a/usecaseui-portal/src/app/components/performance-details/performance-details.component.less +++ b/usecaseui-portal/src/app/components/performance-details/performance-details.component.less @@ -1,4 +1,18 @@ +/* + 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. + 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. +*/ .content { .header { background-color: #fff; diff --git a/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts b/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts index 2b5cded5..b8835739 100644 --- a/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts +++ b/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ import { Component, OnInit, Input } from '@angular/core'; import { slideUpDown } from '../../animates'; import { HomesService } from '../../homes.service'; diff --git a/usecaseui-portal/src/app/home/home.component.css b/usecaseui-portal/src/app/home/home.component.css index d2e51e40..03cc8f94 100644 --- a/usecaseui-portal/src/app/home/home.component.css +++ b/usecaseui-portal/src/app/home/home.component.css @@ -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. diff --git a/usecaseui-portal/src/app/home/home.component.less b/usecaseui-portal/src/app/home/home.component.less index 750f5a32..9684fec7 100644 --- a/usecaseui-portal/src/app/home/home.component.less +++ b/usecaseui-portal/src/app/home/home.component.less @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ // .title { // font: 700 18px/18px "思源黑体"; // color: #4c5e70; diff --git a/usecaseui-portal/src/app/home/home.component.ts b/usecaseui-portal/src/app/home/home.component.ts index 9d81684d..bd4c5176 100644 --- a/usecaseui-portal/src/app/home/home.component.ts +++ b/usecaseui-portal/src/app/home/home.component.ts @@ -119,7 +119,7 @@ export class HomeComponent implements OnInit { }) } - // alarm饼图 + // alarm bar alarmChartData:Object; alarmChartInit:Object = { height: 180, @@ -143,11 +143,11 @@ export class HomeComponent implements OnInit { x2: 0, y2: 1, colorStops: [{ - offset: 0, color: '#FB93C2' // 0% 处的颜色 + offset: 0, color: '#FB93C2' }, { - offset: 1, color: '#FB7788' // 100% 处的颜色 + offset: 1, color: '#FB7788' }], - globalCoord: false // 缺省为 false + globalCoord: false }, { type: 'linear', x: 0, @@ -155,14 +155,14 @@ export class HomeComponent implements OnInit { x2: 0, y2: 1, colorStops: [{ - offset: 0, color: '#A6BFE4' // 0% 处的颜色 + offset: 0, color: '#A6BFE4' }, { - offset: 1, color: '#7A8BAE' // 100% 处的颜色 + offset: 1, color: '#7A8BAE' }], - globalCoord: false // 缺省为 false + globalCoord: false }], series: [{ - name: "告警信息", + name: " ", radius: '55%', center:['50%', '45%'], label: { @@ -189,7 +189,7 @@ export class HomeComponent implements OnInit { }) } - // alarm线图 + // alarm lin alarmLineChartData:Object; alarmLineChartInit:Object = { height:320, @@ -232,7 +232,7 @@ export class HomeComponent implements OnInit { } }; - // services进度条 + // services servicesBarChartData: Object; serviceBarChartInit: Object = { option: { @@ -318,7 +318,7 @@ export class HomeComponent implements OnInit { console.log(err); }) } - // sourceName筛选框 + // sourceName sourceNameList = ['performanceNameOne']; sourceNameSelected = null; diff --git a/usecaseui-portal/src/app/homes.service.ts b/usecaseui-portal/src/app/homes.service.ts index e6d13366..254408dd 100644 --- a/usecaseui-portal/src/app/homes.service.ts +++ b/usecaseui-portal/src/app/homes.service.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. diff --git a/usecaseui-portal/src/app/management/management.component.html b/usecaseui-portal/src/app/management/management.component.html index a695b003..ef8c8435 100644 --- a/usecaseui-portal/src/app/management/management.component.html +++ b/usecaseui-portal/src/app/management/management.component.html @@ -1,3 +1,18 @@ +
diff --git a/usecaseui-portal/src/app/management/management.component.less b/usecaseui-portal/src/app/management/management.component.less index cc50e3c2..4b4a0ab5 100644 --- a/usecaseui-portal/src/app/management/management.component.less +++ b/usecaseui-portal/src/app/management/management.component.less @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ .content { .management { width: 100%; diff --git a/usecaseui-portal/src/app/management/management.component.ts b/usecaseui-portal/src/app/management/management.component.ts index 7345e7a3..5cc6be7b 100644 --- a/usecaseui-portal/src/app/management/management.component.ts +++ b/usecaseui-portal/src/app/management/management.component.ts @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ import { Component, OnInit , HostBinding} from '@angular/core'; import { showHideAnimate, slideToRight } from '../animates'; diff --git a/usecaseui-portal/src/app/onboard.service.ts b/usecaseui-portal/src/app/onboard.service.ts index a248f531..1c3778a4 100644 --- a/usecaseui-portal/src/app/onboard.service.ts +++ b/usecaseui-portal/src/app/onboard.service.ts @@ -1,3 +1,18 @@ +/* + 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. + 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. +*/ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; @@ -9,7 +24,7 @@ export class onboardService { /* location */ // baseUrl = "./assets/json"; // url = { - // // 数据列表 + // // list data // onboardTableData: this.baseUrl + "/onboard-vnf-mf/onboardTableData.json", // onboardDataVNF: this.baseUrl + "/onboard-vnf-mf/onboardDataVNF.json", // onboardDataPNF: this.baseUrl + "/onboard-vnf-mf/onboardDataPNF.json", @@ -19,7 +34,7 @@ export class onboardService { // sdc_vnfListData: this.baseUrl + "/onboard-vnf-mf/listData/SDC_VNF.json", - // //创建nspackages + // //create nspackages // creatensData: this.baseUrl + "/onboard-vnf-mf/_jsonData.json", // //onboard ns sdc data @@ -48,10 +63,10 @@ export class onboardService { // } //--------------------------------------------------------------------------------------- - /* line up 线上*/ + /* line up*/ baseUrl = baseUrl.baseUrl + "/uui-lcm/"; url = { - // 数据列表Data + // list Data onboardTableData: this.baseUrl + "ns-packages", onboardDataVNF: this.baseUrl + "vnf-packages", onboardDataPNF: this.baseUrl + "pnf-packages", @@ -75,7 +90,7 @@ export class onboardService { // Delete Pnf package deletePnfPack: this.baseUrl + "deletePnfPackage?pnfdInfoId=", - //进度接口 + //Progress interface progress: this.baseUrl + "jobs/" + "_jobId" + "?responseId=" diff --git a/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.css b/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.css index 079a409c..e9631957 100644 --- a/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.css +++ b/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.css @@ -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. diff --git a/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.html b/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.html index 76d2485e..06d84353 100644 --- a/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.html +++ b/usecaseui-portal/src/app/performance/performance-vm/performance-vm.component.html @@ -1,5 +1,5 @@ '+ JSON.stringify(req)); console.log('formData--->'+ JSON.stringify(formData)); - //上传前置空数组 + //Upload pre-empty array this.fileList = []; this.fileListNS = []; this.fileListVNF = []; @@ -289,7 +289,7 @@ export class OnboardVnfVmComponent implements OnInit { ); } -// 控制uploading的状态 +// Control the status of uploading changeUploadingSta(tab) { switch(tab) { case "NS": @@ -305,7 +305,7 @@ changeUploadingSta(tab) { //---------------------------------------------------------------------------------------------- - // 获取NS列表 + // Get the NS list getTableData() { this.isSpinning = true; //ns vfc lists @@ -348,7 +348,7 @@ changeUploadingSta(tab) { } - // 获取vnf列表 + // Get the vnf list getTableVnfData() { this.isSpinning = true; //vnf vfc lists @@ -388,7 +388,7 @@ changeUploadingSta(tab) { }) } - // 获取pnf列表 + // Get pnf list getTablePnfData() { this.isSpinning = true; this.myhttp.getOnboardTablePnfData() @@ -402,7 +402,7 @@ changeUploadingSta(tab) { }) } - //合并并去重 + //Merge and de-emphasize // MergeArray(arr1, arr2) { // var _arr = new Array(); // for (var i = 0; i < arr1.length; i++) { @@ -413,7 +413,7 @@ changeUploadingSta(tab) { // for (var i = 0; i < arr2.length; i++) { // var flag = true; // for (var j = 0; j < arr1.length; j++) { - // // 根据vfc列表arr1的id和sdc列表arr2的uuid去重 + // // According to the id of the vfc list arr1 and the uuid of the sdc list arr2 // if (arr2[i].uuid == arr1[j].id) { // flag = false; // break; @@ -428,7 +428,7 @@ changeUploadingSta(tab) { //----------------------------------------------------------------------------------- /* onboard */ - //成功弹框 + //Successful frame success(tab): void { const modal = this.modalService.success({ nzTitle: 'This is an success message', @@ -447,7 +447,7 @@ changeUploadingSta(tab) { // window.setTimeout(() => modal.destroy(), 5000); } - //失败弹框 + //Failure frame error(): void { this.modalService.error({ nzTitle: 'This is an error message', @@ -461,10 +461,10 @@ changeUploadingSta(tab) { progress: 0, } currentIndex = 0; - // ns onboard 上传按钮 + // ns onboard Upload button updataNsService(id,index) { this.currentIndex = index; - this.onboardData.status = "onboarding"; //置灰 + this.onboardData.status = "onboarding"; //Disabled this.onboardData.progress = 0; console.log("NS-onboard-id-->" + id); let requestBody = { @@ -487,10 +487,10 @@ changeUploadingSta(tab) { }) } - // vnf onboard 上传按钮 + // vnf onboard Upload button updataVnfService(id,index) { this.currentIndex = index; - this.onboardData.status = "onboarding"; //按钮置灰 + this.onboardData.status = "onboarding"; //Disabled button this.onboardData.progress = 0; console.log("VNF-onboard-id-->" + id) @@ -502,18 +502,18 @@ changeUploadingSta(tab) { console.log('onboard vnf sdc-->', data); this.jobId = data.jobId; console.log('onboard vnf sdc jobId-->'+ data.jobId); - this.queryProgress(this.jobId,0); //vnf需要查询进度接口 + this.queryProgress(this.jobId,0); //vnf Need to query progress interface }, (err) => { console.log(err); }) } - // pnf onboard //暂时没有上传功能 + // pnf onboard //Temporarily no upload function // updataPnfService(id) { // console.log('pnf',id); // } - //Progress 进度查询 + //Progress Progress inquiry queryProgress(jobId,responseId){ let mypromise = new Promise((res)=>{ this.myhttp.getProgress(jobId,responseId) @@ -555,7 +555,7 @@ changeUploadingSta(tab) { } //-------------------------------------------------------------------------------- - /* delete 删除按钮 */ + /* delete button */ showConfirm(index,pkgid,tab): void { this.confirmModal = this.modal.confirm({ nzTitle: 'Do you Want to delete these items?', @@ -624,7 +624,7 @@ changeUploadingSta(tab) { } //------------------------------------------------------------------------------------ - //下载download + //download // downloadNsService(id) { // console.log('download') // console.log(id) diff --git a/usecaseui-portal/src/app/services/services.component.html b/usecaseui-portal/src/app/services/services.component.html index c4fddfc0..10142833 100644 --- a/usecaseui-portal/src/app/services/services.component.html +++ b/usecaseui-portal/src/app/services/services.component.html @@ -1,5 +1,5 @@