diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-08-23 11:05:42 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2019-08-23 11:05:53 +0800 |
commit | 4e11ad92dbc929de190a6c211457bebc88636acd (patch) | |
tree | 8803e836f32d02032703b7a01c7fcd2b620a745c /usecaseui-portal/src/app | |
parent | beb1797fc10f12fcdab0147fca7223c80e41c5c6 (diff) |
refactor: change the position of animates.ts to utils
Change-Id: I712d76b1b327e8803d55e90b7a153ad0e44a14c9
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app')
10 files changed, 119 insertions, 119 deletions
diff --git a/usecaseui-portal/src/app/shared/components/details/details.component.ts b/usecaseui-portal/src/app/shared/components/details/details.component.ts index dea6caaa..1de80a94 100644 --- a/usecaseui-portal/src/app/shared/components/details/details.component.ts +++ b/usecaseui-portal/src/app/shared/components/details/details.component.ts @@ -14,23 +14,23 @@ limitations under the License. */ import { Component, OnInit, Input } from '@angular/core'; -import { slideUpDown } from '../../../animates'; +import { slideUpDown } from '../../utils/animates'; import { HomesService } from '../../../core/services/homes.service'; @Component({ selector: 'app-details', templateUrl: './details.component.html', styleUrls: ['./details.component.less'], - animations: [ slideUpDown ] + animations: [slideUpDown] }) export class DetailsComponent implements OnInit { - constructor(private myhttp:HomesService) { } + constructor(private myhttp: HomesService) { } ngOnInit() { } - ngOnChanges(changes){ + ngOnChanges(changes) { this.getAlarmDetailData(this.detailId); } @@ -38,9 +38,9 @@ export class DetailsComponent implements OnInit { }; dataillistdata: any = []; - getAlarmDetailData(id){ - if(id){ - this.myhttp.getAlarmDetailData(id).subscribe((data)=>{ + getAlarmDetailData(id) { + if (id) { + this.myhttp.getAlarmDetailData(id).subscribe((data) => { this.datailheaderdata = data.alarmsHeader; this.dataillistdata = data.list; }) @@ -50,9 +50,9 @@ export class DetailsComponent implements OnInit { // detail Show moredetailShow = false; @Input() detailId; - + state = 'up' - slideUpDown(){ + slideUpDown() { this.moredetailShow = !this.moredetailShow; this.state = this.state === 'up' ? 'down' : 'up'; } diff --git a/usecaseui-portal/src/app/shared/components/performance-details/performance-details.component.ts b/usecaseui-portal/src/app/shared/components/performance-details/performance-details.component.ts index 9a601485..2f482e96 100644 --- a/usecaseui-portal/src/app/shared/components/performance-details/performance-details.component.ts +++ b/usecaseui-portal/src/app/shared/components/performance-details/performance-details.component.ts @@ -14,33 +14,33 @@ limitations under the License. */ import { Component, OnInit, Input } from '@angular/core'; -import { slideUpDown } from '../../../animates'; +import { slideUpDown } from '../../utils/animates'; import { HomesService } from '../../../core/services/homes.service'; @Component({ selector: 'app-performance-details', templateUrl: './performance-details.component.html', styleUrls: ['./performance-details.component.less'], - animations: [ slideUpDown ] + animations: [slideUpDown] }) export class PerformanceDetailsComponent implements OnInit { - - constructor(private myhttp:HomesService) { } + + constructor(private myhttp: HomesService) { } ngOnInit() { - + } - ngOnChanges(changes){ + ngOnChanges(changes) { console.log(this.detailId) this.getPerformanceHeaderDetail(this.detailId); } datailheaderdata: any = {}; dataillistdata: any = []; - getPerformanceHeaderDetail(id){ - if(id){ - this.myhttp.getPerformanceHeaderDetail(id).subscribe((data)=>{ + getPerformanceHeaderDetail(id) { + if (id) { + this.myhttp.getPerformanceHeaderDetail(id).subscribe((data) => { console.log(data) this.datailheaderdata = data.performanceHeader; this.dataillistdata = data.list; @@ -50,7 +50,7 @@ export class PerformanceDetailsComponent implements OnInit { moredetailShow = false; @Input() detailId; state = 'up' - slideUpDown(){ + slideUpDown() { this.moredetailShow = !this.moredetailShow; this.state = this.state === 'up' ? 'down' : 'up'; } diff --git a/usecaseui-portal/src/app/animates.ts b/usecaseui-portal/src/app/shared/utils/animates.ts index d5c29b7e..d5c29b7e 100644 --- a/usecaseui-portal/src/app/animates.ts +++ b/usecaseui-portal/src/app/shared/utils/animates.ts diff --git a/usecaseui-portal/src/app/views/alarm/alarm.component.ts b/usecaseui-portal/src/app/views/alarm/alarm.component.ts index 32e3456f..c2a567bd 100644 --- a/usecaseui-portal/src/app/views/alarm/alarm.component.ts +++ b/usecaseui-portal/src/app/views/alarm/alarm.component.ts @@ -15,7 +15,7 @@ */ import { Component, OnInit, Input, Output, EventEmitter, HostBinding, Pipe, PipeTransform } from '@angular/core'; import { HomesService } from '../../core/services/homes.service'; -import { showHideAnimate, slideToRight } from '../../animates'; +import { showHideAnimate, slideToRight } from '../../shared/utils/animates'; import { DatePipe } from '@angular/common'; @Component({ selector: 'app-alarm', diff --git a/usecaseui-portal/src/app/views/home/home.component.ts b/usecaseui-portal/src/app/views/home/home.component.ts index 11a0f1a8..681e272f 100644 --- a/usecaseui-portal/src/app/views/home/home.component.ts +++ b/usecaseui-portal/src/app/views/home/home.component.ts @@ -15,7 +15,7 @@ */ import { Component, OnInit, Input, Output, EventEmitter, HostBinding } from '@angular/core'; import { HomesService } from '../../core/services/homes.service'; -import { slideToRight } from '../../animates'; +import { slideToRight } from '../../shared/utils/animates'; import { TranslateService } from "@ngx-translate/core"; import { Router } from '@angular/router'; diff --git a/usecaseui-portal/src/app/views/management/management.component.ts b/usecaseui-portal/src/app/views/management/management.component.ts index 8b3afea7..8220a166 100644 --- a/usecaseui-portal/src/app/views/management/management.component.ts +++ b/usecaseui-portal/src/app/views/management/management.component.ts @@ -13,26 +13,26 @@ 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'; +import { Component, OnInit, HostBinding } from '@angular/core'; +import { showHideAnimate, slideToRight } from '../../shared/utils/animates'; import { ManagemencsService } from '../../core/services/managemencs.service'; @Component({ - selector: 'app-management', - templateUrl: './management.component.html', - styleUrls: ['./management.component.less'], - animations: [ - showHideAnimate, slideToRight - ] + selector: 'app-management', + templateUrl: './management.component.html', + styleUrls: ['./management.component.less'], + animations: [ + showHideAnimate, slideToRight + ] }) export class ManagementComponent implements OnInit { - @HostBinding('@routerAnimate') routerAnimateState; //Routing animation + @HostBinding('@routerAnimate') routerAnimateState; //Routing animation - constructor(private managemencs: ManagemencsService) { } + constructor(private managemencs: ManagemencsService) { } - ngOnInit() { - this.getAllCustomers(); - } + ngOnInit() { + this.getAllCustomers(); + } nocuster = true; firstCustomer = null; @@ -62,7 +62,7 @@ export class ManagementComponent implements OnInit { } }) } - clearCustomerInput(){ - this.firstCustomer=null; + clearCustomerInput() { + this.firstCustomer = null; } } diff --git a/usecaseui-portal/src/app/views/performance/performance-vm/performance-vm.component.ts b/usecaseui-portal/src/app/views/performance/performance-vm/performance-vm.component.ts index c179cdbb..85150b69 100644 --- a/usecaseui-portal/src/app/views/performance/performance-vm/performance-vm.component.ts +++ b/usecaseui-portal/src/app/views/performance/performance-vm/performance-vm.component.ts @@ -1,11 +1,11 @@ import { Component, OnInit, HostBinding } from '@angular/core'; -import { slideToRight, showHideAnimate } from '../../../animates'; +import { slideToRight, showHideAnimate } from '../../../shared/utils/animates'; @Component({ selector: 'app-performance-vm', templateUrl: './performance-vm.component.html', styleUrls: ['./performance-vm.component.less'], - animations: [ slideToRight, showHideAnimate ] + animations: [slideToRight, showHideAnimate] }) export class PerformanceVmComponent implements OnInit { @HostBinding('@routerAnimate') routerAnimateState; @@ -15,15 +15,15 @@ export class PerformanceVmComponent implements OnInit { } // Filter box (drop-down box) - sourceNameList = ['aaaa','bbbb','cccc','dddddDDDDDDDDDDDDDDD']; + sourceNameList = ['aaaa', 'bbbb', 'cccc', 'dddddDDDDDDDDDDDDDDD']; sourceNameSelected = this.sourceNameList[0]; - ReportingEntityNameList = ['aaaa','bbbb','cccc','ddddd']; - ReportingEntityNameSelected = this.ReportingEntityNameList[0]; - choseSourceName(item){ + ReportingEntityNameList = ['aaaa', 'bbbb', 'cccc', 'ddddd']; + ReportingEntityNameSelected = this.ReportingEntityNameList[0]; + choseSourceName(item) { console.log(item); this.sourceNameSelected = item; } - choseReportingEntityName(item){ + choseReportingEntityName(item) { console.log(item); this.ReportingEntityNameSelected = item; } @@ -31,98 +31,98 @@ export class PerformanceVmComponent implements OnInit { //Tabular data dataSet = [ { - name : 'John Brown', - age : 32, - expand : false, - address : 'New York No. 1', + name: 'John Brown', + age: 32, + expand: false, + address: 'New York No. 1', description: 'My name is John Brown, I am 32 years old, living in New York No. 1 Lake Park.' }, { - name : 'Aim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Aim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Bim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Bim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Cim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Cim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Jim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Jim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Xim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Xim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Jim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Jim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Jim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Jim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Jim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Jim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'Jim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'Jim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'cim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'cim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'bim Green', - age : 42, - expand : false, - address : 'London No. 1', + name: 'bim Green', + age: 42, + expand: false, + address: 'London No. 1', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.' }, { - name : 'aoe Black', - age : 32, - expand : false, - address : 'Sidney No. 1', + name: 'aoe Black', + age: 32, + expand: false, + address: 'Sidney No. 1', description: 'My name is Joe Black, I am 32 years old, living in Sidney No. 1 Lake Park.' } ]; - + //Detail page title display graphicshow = false; detailshow = false; @@ -145,7 +145,7 @@ export class PerformanceVmComponent implements OnInit { this.detailshow = false; } // Selected id - detailId:number; + detailId: number; detailShow(prems) { this.state = 'hide'; this.state2 = 'hide'; diff --git a/usecaseui-portal/src/app/views/performance/performance-vnf/performance-vnf.component.ts b/usecaseui-portal/src/app/views/performance/performance-vnf/performance-vnf.component.ts index 96b5404c..5f1d056d 100644 --- a/usecaseui-portal/src/app/views/performance/performance-vnf/performance-vnf.component.ts +++ b/usecaseui-portal/src/app/views/performance/performance-vnf/performance-vnf.component.ts @@ -14,7 +14,7 @@ limitations under the License. */ import { Component, OnInit, HostBinding } from '@angular/core'; -import { slideToRight, showHideAnimate } from '../../../animates'; +import { slideToRight, showHideAnimate } from '../../../shared/utils/animates'; import { HomesService } from '../../../core/services/homes.service'; @Component({ @@ -41,27 +41,27 @@ export class PerformanceVnfComponent implements OnInit { this.getqueryAllSourceNames(); // this.getperformanceSsourceNames(); let _this = this; - setTimeout(function(){ - _this.totalRecords = [ - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"} + setTimeout(function () { + _this.totalRecords = [ + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" } ]; _this.totalpnfs = [ - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"}, - {name:"Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��",text:"oahgieango"} + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" }, + { name: "Mfvs_MMEManagedElem entdElementMfvs_MMEM anagedELement��", text: "oahgieango" } ] - _this.emptys = new Array(12-_this.totalRecords.length); - },300) + _this.emptys = new Array(12 - _this.totalRecords.length); + }, 300) } @@ -86,7 +86,7 @@ export class PerformanceVnfComponent implements OnInit { totalRecords = []; totalpnfs = []; //Fill the box - emptys = []; + emptys = []; // getperformanceSsourceNames() { // this.myhttp.getperformanceSourceNames(this.currentPage, this.pageSize, this.sourceName).subscribe((data) => { diff --git a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts index 4899aed8..33385e32 100644 --- a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts +++ b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts @@ -18,7 +18,7 @@ import { Component, OnInit, HostBinding, TemplateRef } from '@angular/core'; import { NzNotificationService } from 'ng-zorro-antd'; // import { MyhttpService } from '../../myhttp.service'; import { onboardService } from '../../../core/services/onboard.service'; -import { slideToRight } from '../../../animates'; +import { slideToRight } from '../../../shared/utils/animates'; import { NzMessageService, UploadFile, NzModalRef, NzModalService } from 'ng-zorro-antd'; import { filter } from 'rxjs/operators'; import { Title } from '@angular/platform-browser'; diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts index c15e9f11..fb78aff5 100644 --- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts @@ -15,7 +15,7 @@ */ import { Component, OnInit, HostBinding, TemplateRef } from '@angular/core'; import { MyhttpService } from '../../../core/services/myhttp.service'; -import { slideToRight } from '../../../animates'; +import { slideToRight } from '../../../shared/utils/animates'; import { NzModalService } from 'ng-zorro-antd'; import { NzNotificationService } from 'ng-zorro-antd'; |