--- /dev/null
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
/*
============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
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
x2: 0,
y2: 1,
colorStops: [{
- offset: 0, color: '#FB7788' // 0% 处的颜色
+ offset: 0, color: '#FB7788'
}, {
- offset: 1, color: '#FB93C2' // 100% 处的颜色
+ offset: 1, color: '#FB93C2'
}],
},
opacity: 1,
x2: 0,
y2: 1,
colorStops: [{
- offset: 0, color: '#7A8BAE' // 0% 处的颜色
+ offset: 0, color: '#7A8BAE'
}, {
- offset: 1, color: '#A6BFE4' // 100% 处的颜色
+ offset: 1, color: '#A6BFE4'
}],
},
opacity: 1,
+/*
+ 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 { trigger, state, style, animate, transition } from '@angular/animations';
-// 路由动画
+// Routing animation
export const slideToRight = trigger('routerAnimate', [
- // 定义void表示空状态下
- state('void', style({ position:'fixed', zIndex:'-1' })), //不明白为啥要加定位出场动画才生效
- // * 表示任何状态
+ // Define void to indicate empty state
+ state('void', style({ position:'fixed', zIndex:'-1' })), //I don't understand why I want to add a positioning animation to take effect.
+ // * Indicates any state
state('*', style({ })),
- // 进场动画
+ // Admission animation
transition(':enter', [
style({transform: 'translateX(-100%)'}),
animate('.5s ease-in-out')
]),
- // 出场动画
+ // Opening animation
transition(':leave', [
animate('.5s ease-in-out', style({transform: 'translateX(100%)'}) )
])
]);
-// 详情页显示隐藏动画
+// Detail page shows hidden animation
export const showHideAnimate = trigger('showHideAnimate', [
state('show', style({
transform: 'scale(1)',
transition('show => hide', animate('300ms ease-in')),
transition('hide => show', animate('300ms ease-out'))
]);
-// 详情页显示隐藏动画
+// Detail page shows hidden animation
export const slideUpDown = trigger('slideUpDown', [
state('down', style({
height: "*"
+/*
+ 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 { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{ path: 'home', component: HomeComponent},
{ path: 'management', component: ManagementComponent},
- // { path: 'services', component: ServicesComponent, children:ServicesChildRoutes}, //暂时不是子路由结构
+ // { path: 'services', component: ServicesComponent, children:ServicesChildRoutes}, //Temporarily not a sub-routing structure
{ path: 'services/services-list', component: ServicesListComponent},
{ path: 'services/onboard-vnf-vm', component: OnboardVnfVmComponent},
{ path: 'alarm', component: AlarmComponent},
/*
- 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.
+/*
+ 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 } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
// translate.use('en');
}
- // 多语言
+
Language:String[] = ["zh","en"];
selectLanguage = "en";
+/*
+ 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 { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
<!--
- 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.
+/*
+ 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 { SimpleChanges } from '@angular/core/src/metadata/lifecycle_hooks';
})
export class BarComponent implements OnInit {
- // 图形数据
+ // chart Data
@Input() chartData;
- // 初始化数据
+ // init Data
@Input() initData;
constructor() { }
}
ngOnChanges(changes: SimpleChanges) {
- // 当有实例的时候再执行,相当于第一次不执行下面方法
+ // Execute when there is an instance, which is equivalent to not executing the following method for the first time.
if (this.chartIntance) {
this.chartDataChange()
}
}
- // 初始化图形高度
+ // Initialize the height of the graphic
initOpts: any;
- // 折线图配置
+ // Line chart configuration
barOption: any;
- // 实例对象
+ // Instance object
chartIntance: any;
- // 数据变化
+ // Data change
updateOption: any;
chartDataChange() {
this.updateOption = this.chartData;
<!--
- 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.
+/*
+ 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 { SimpleChanges } from '@angular/core/src/metadata/lifecycle_hooks';
styleUrls: ['./line.component.less']
})
export class LineComponent implements OnInit {
- // 图形数据
+ // chart Data
@Input() chartData;
- // 初始化数据
+ // init Data
@Input() initData;
constructor() { }
}
ngOnChanges(changes:SimpleChanges){
- // 当有实例的时候再执行,相当于第一次不执行下面方法
+ // Execute when there is an instance, which is equivalent to not executing the following method for the first time.
if(this.chartIntance){
this.chartDataChange()
}
}
- // 初始化图形高度
+ // Initialize the height of the graphic
initOpts:any;
- // 折线图配置
+ // Line chart configuration
lineOption:any;
- // 实例对象
+ // Instance object
chartIntance:any;
- // 数据变化
+ // Data change
updateOption:any;
chartDataChange(){
this.updateOption = this.chartData;
<!--
- 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.
+/*
+ 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 { SimpleChanges } from '@angular/core/src/metadata/lifecycle_hooks';
styleUrls: ['./pie.component.less']
})
export class PieComponent implements OnInit {
- // 图形数据
+ // chart Data
@Input() chartData;
- // 初始化数据
+ // init Data
@Input() initData;
constructor() { }
ngOnChanges(changes:SimpleChanges){
- // 当有实例的时候再执行,相当于第一次不执行下面方法
+ // Execute when there is an instance, which is equivalent to not executing the following method for the first time.
if(this.chartIntance){
this.chartDataChange()
}
}
- // 初始化图形高度
+ // Initialize the height of the graphic
initOpts:any;
- // alarm饼图
+ // Alarm pie chart
pieOption:any;
- // 实例对象
+ // Instance object
chartIntance:any;
- // 数据变化
+ // Data change
updateOption:any;
chartDataChange(){
this.updateOption = this.chartData;
- // 要等到updateOption渲染完再执行
+ // Wait until the updateOption is finished and then execute
this.chartIntance.on('finished',()=>{
this.chartIntance.dispatchAction({
type:'highlight',
seriesIndex: 0,
dataIndex:0
})
- // 由于所有视图变化渲染都会执行,更新完注销此事件
+ //Since all view changes are rendered, this event is logged out after the update
this.chartIntance.off('finished')
})
}
+<!--
+ 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.
+-->
<div class="content">
<div class="customer">
<div class="customer_title">
+/*
+ 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;
+/*
+ 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({
/*
- 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.
<!--
- 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.
+/*
+ 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;
+/*
+ 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';
}
}
- // 详情显示
+ // detail Show
moredetailShow = false;
@Input() detailId;
+/*
+ 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 .title {
border-radius: 5px 5px 0 0;
background-color: #fff;
<!--
- 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.
+/*
+ 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 {
.title {
border-radius: 5px 5px 0 0;
/*
- 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.
+/*
+ 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;
border-radius: 5px;
+<!--
+ 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.
+-->
<div class="content">
<div class="header">
<h2>HEADER INFORMATION</h2>
+/*
+ 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;
+/*
+ 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';
/*
- 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.
+/*
+ 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;
})
}
- // alarm饼图
+ // alarm bar
alarmChartData:Object;
alarmChartInit:Object = {
height: 180,
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,
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: {
})
}
- // alarm线图
+ // alarm lin
alarmLineChartData:Object;
alarmLineChartInit:Object = {
height:320,
}
};
- // services进度条
+ // services
servicesBarChartData: Object;
serviceBarChartInit: Object = {
option: {
console.log(err);
})
}
- // sourceName筛选框
+ // sourceName
sourceNameList = ['performanceNameOne'];
sourceNameSelected = null;
/*
- 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.
+<!--
+ 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.
+-->
<div class="content" style="padding: 20px 20px;">
<div class="management" [@showHideAnimate]="show" >
<div class="title">
+/*
+ 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%;
+/*
+ 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';
+/*
+ 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';
/* 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",
// 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
// }
//---------------------------------------------------------------------------------------
- /* 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",
// Delete Pnf package
deletePnfPack: this.baseUrl + "deletePnfPackage?pnfdInfoId=",
- //进度接口
+ //Progress interface
progress: this.baseUrl + "jobs/" + "_jobId" + "?responseId="
/*
- 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.
<!--
- 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.
+/*
+ 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;
ngOnInit() {
}
- // 筛选框(下拉框)
+ // Filter box (drop-down box)
sourceNameList = ['aaaa','bbbb','cccc','dddddDDDDDDDDDDDDDDD'];
sourceNameSelected = this.sourceNameList[0];
ReportingEntityNameList = ['aaaa','bbbb','cccc','ddddd'];
this.ReportingEntityNameSelected = item;
}
- //表格数据
+ //Tabular data
dataSet = [
{
name : 'John Brown',
}
];
- //详情页标题显示
+ //Detail page title display
graphicshow = false;
detailshow = false;
- // 显示隐藏动画
+ // Show hidden animation
state = "show";
state2 = "hide";
state3 = "hide";
this.graphicshow = true;
this.detailshow = false;
}
- // 选中id
+ // Selected id
detailId:number;
detailShow(prems) {
this.state = 'hide';
+/*
+ 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;
+/*
+ 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: 500 14px/18px "ArialMT";
color: #3C4F8C;
/*
- 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.
<!--
- 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.
/*
- 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.
};
constructor(private myhttp: onboardService, private http: HttpClient, private msg: NzMessageService,private titleService: Title,private modal: NzModalService, private modalService: NzModalService) { }
- //default 默认调用ns数据
+ //default Call ns data by default
ngOnInit() {
this.getTableData();
}
- //表格数据
+ //Tabular data
nstableData:any;
vnftableData:any;
pnftableData:any;
tabs = ['NS', 'VNF', 'PNF'];
isSpinning = false;
- // 处理tab切换 请求数据
+ // Handling tab switching request data
handleTabChange(tab) {
this.tabTitle = tab;
console.log(tab);
case 'NS':
this.nstableData = [];
this.getTableData();
- this.fileList = []; //切换时清空上传的文件
+ this.fileList = []; //Empty uploaded files when switching
break
case 'VNF':
this.vnftableData = [];
}
}
- //NS/VNF列表添加文件
+ //NS/VNF List add file
beforeUpload = (file: UploadFile): boolean => {
this.fileList.push(file);
console.log('fileList' + this.fileList)
return false;
}
- //获取列表单条id
+ //Get list list id
onClickId(id,tab){
switch (tab) {
case 'NS':
}
}
- //拖拽后点击上传按钮
+ //Drag and drop and click the upload button
onClick (tab) {
switch (tab) {
case 'NS':
}
}
- //put Upload 上传
+ //put Upload Upload
handleUpload(url,tab): void {
console.log('startUpload')
const formData = new FormData();
});
console.log('req--->'+ JSON.stringify(req));
console.log('formData--->'+ JSON.stringify(formData));
- //上传前置空数组
+ //Upload pre-empty array
this.fileList = [];
this.fileListNS = [];
this.fileListVNF = [];
);
}
-// 控制uploading的状态
+// Control the status of uploading
changeUploadingSta(tab) {
switch(tab) {
case "NS":
//----------------------------------------------------------------------------------------------
- // 获取NS列表
+ // Get the NS list
getTableData() {
this.isSpinning = true;
//ns vfc lists
}
- // 获取vnf列表
+ // Get the vnf list
getTableVnfData() {
this.isSpinning = true;
//vnf vfc lists
})
}
- // 获取pnf列表
+ // Get pnf list
getTablePnfData() {
this.isSpinning = true;
this.myhttp.getOnboardTablePnfData()
})
}
- //合并并去重
+ //Merge and de-emphasize
// MergeArray(arr1, arr2) {
// var _arr = new Array();
// for (var i = 0; i < arr1.length; i++) {
// 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;
//-----------------------------------------------------------------------------------
/* onboard */
- //成功弹框
+ //Successful frame
success(tab): void {
const modal = this.modalService.success({
nzTitle: 'This is an success message',
// window.setTimeout(() => modal.destroy(), 5000);
}
- //失败弹框
+ //Failure frame
error(): void {
this.modalService.error({
nzTitle: 'This is an error message',
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 = {
})
}
- // 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)
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)
}
//--------------------------------------------------------------------------------
- /* delete 删除按钮 */
+ /* delete button */
showConfirm(index,pkgid,tab): void {
this.confirmModal = this.modal.confirm({
nzTitle: 'Do you Want to delete these items?',
}
//------------------------------------------------------------------------------------
- //下载download
+ //download
// downloadNsService(id) {
// console.log('download')
// console.log(id)
<!--
- 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.
/*
- 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.
/*
- 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.
/* You can add global styles to this file, and also import other style files */
-// 下拉框背景hover状态颜色
+// Drop-down box background hover status color
.ant-dropdown-menu {
.ant-dropdown-menu-item:hover, .ant-dropdown-menu-submenu-title:hover {
background-color: #3fa8eb;
}
}
}
-// 表格每页条数选项单位置
+// Table per page number of menu positions
nz-table {
.ant-table-thead > tr > th {
- color: rgba(60, 79, 140, 0.5); //标题字体颜色
+ color: rgba(60, 79, 140, 0.5); //Title font color
background-color: #F7F8FC;
border-bottom: 0px solid #e8e8e8;
}
}
}
-// 详情页迷你表格样式
+// Detail page mini table style
.detailInformatioin {
nz-table {
.ant-table-small {
}
}
-// 日期选择插件背景颜色
+// Date selection plugin background color
.ant-calendar-picker {
.ant-input {
background-color: #eceff4;
border-color: #9fa9ab;
}
}
-// 分页每页条数选项单位置
+// Pages per page number of menu positions
nz-pagination {
ul {
.ant-pagination-options {
}
}
-// D版本更改背景颜色修改
+// D Version change background color modification
nz-layout {
.ant-layout {
background:#F7F8FC;
padding: 0px !important;
}
}
-// onboard-vnf-vm页面调整
-// 头部导航
+// onboard-vnf-vm Page adjustment
+// Head navigation
.ant-tabs-bar {
box-shadow: 0 2px 23px 0 rgba(0, 0, 0, 0.1), 0 2px 49px 0 rgba(0, 0, 0, 0.06);
border-bottom:none !important;
.ant-tabs.ant-tabs-card > .ant-tabs-bar .ant-tabs-nav-container {
height: 55px !important;
}
-// 头部导航按钮
+// Head navigation button
.ant-tabs.ant-tabs-card > .ant-tabs-bar .ant-tabs-tab {
background-color: #fff !important;
border: 1px solid #fff !important;
//2019.01.21 add services-list.component.html
-//creat框
+//creat
nz-modal {
.ant-modal {
height: 628px;