refactor: change the position of animates.ts to utils 69/94169/1
authorcyuamber <xuranyjy@chinamobile.com>
Fri, 23 Aug 2019 03:05:42 +0000 (11:05 +0800)
committercyuamber <xuranyjy@chinamobile.com>
Fri, 23 Aug 2019 03:05:53 +0000 (11:05 +0800)
Change-Id: I712d76b1b327e8803d55e90b7a153ad0e44a14c9
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
usecaseui-portal/src/app/shared/components/details/details.component.ts
usecaseui-portal/src/app/shared/components/performance-details/performance-details.component.ts
usecaseui-portal/src/app/shared/utils/animates.ts [moved from usecaseui-portal/src/app/animates.ts with 100% similarity]
usecaseui-portal/src/app/views/alarm/alarm.component.ts
usecaseui-portal/src/app/views/home/home.component.ts
usecaseui-portal/src/app/views/management/management.component.ts
usecaseui-portal/src/app/views/performance/performance-vm/performance-vm.component.ts
usecaseui-portal/src/app/views/performance/performance-vnf/performance-vnf.component.ts
usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts
usecaseui-portal/src/app/views/services/services-list/services-list.component.ts

index dea6caa..1de80a9 100644 (file)
     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';
   }
index 9a60148..2f482e9 100644 (file)
     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';
   }
index 32e3456..c2a567b 100644 (file)
@@ -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',
index 11a0f1a..681e272 100644 (file)
@@ -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';
 
index 8b3afea..8220a16 100644 (file)
     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;
     }
 }
index c179cdb..85150b6 100644 (file)
@@ -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';
index 96b5404..5f1d056 100644 (file)
@@ -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) => {
index 4899aed..33385e3 100644 (file)
@@ -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';
index c15e9f1..fb78aff 100644 (file)
@@ -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';