summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r--usecaseui-portal/src/app/views/alarm/alarm.component.ts7
-rw-r--r--usecaseui-portal/src/app/views/home/home.component.ts11
2 files changed, 13 insertions, 5 deletions
diff --git a/usecaseui-portal/src/app/views/alarm/alarm.component.ts b/usecaseui-portal/src/app/views/alarm/alarm.component.ts
index c2a567bd..c3223236 100644
--- a/usecaseui-portal/src/app/views/alarm/alarm.component.ts
+++ b/usecaseui-portal/src/app/views/alarm/alarm.component.ts
@@ -16,6 +16,7 @@
import { Component, OnInit, Input, Output, EventEmitter, HostBinding, Pipe, PipeTransform } from '@angular/core';
import { HomesService } from '../../core/services/homes.service';
import { showHideAnimate, slideToRight } from '../../shared/utils/animates';
+import { Util } from '../../shared/utils/utils';
import { DatePipe } from '@angular/common';
@Component({
selector: 'app-alarm',
@@ -33,7 +34,7 @@ export class AlarmComponent implements OnInit {
public pageSize: number = 10;
public sourceName: string = '';
public priority: string = '';
- public startTime: string = this.myhttp.dateformater(Date.now() - 30 * 24 * 60 * 60 * 1000);
+ public startTime: string = this.Util.dateformater(Date.now() - 30 * 24 * 60 * 60 * 1000);
public endTime: string = this.datePipe.transform(new Date(), 'yyyy-MM-dd HH:mm:ss');
public vfStatus: string = '';
public sourceNameList: Array<any> = ['---auto---'];
@@ -41,7 +42,9 @@ export class AlarmComponent implements OnInit {
sourcenames: any;
constructor(
private datePipe: DatePipe,
- private myhttp: HomesService) { }
+ private myhttp: HomesService,
+ private Util: Util
+ ) { }
ngOnInit() {
this.getAlarmFormData();
this.getSourceNames();
diff --git a/usecaseui-portal/src/app/views/home/home.component.ts b/usecaseui-portal/src/app/views/home/home.component.ts
index 681e272f..153e2219 100644
--- a/usecaseui-portal/src/app/views/home/home.component.ts
+++ b/usecaseui-portal/src/app/views/home/home.component.ts
@@ -16,6 +16,7 @@
import { Component, OnInit, Input, Output, EventEmitter, HostBinding } from '@angular/core';
import { HomesService } from '../../core/services/homes.service';
import { slideToRight } from '../../shared/utils/animates';
+import { Util } from '../../shared/utils/utils';
import { TranslateService } from "@ngx-translate/core";
import { Router } from '@angular/router';
@@ -28,7 +29,11 @@ import { Router } from '@angular/router';
export class HomeComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState;
- constructor(private myhttp: HomesService, private router: Router) { }
+ constructor(
+ private myhttp: HomesService,
+ private router: Router,
+ private Util: Util
+ ) { }
ngOnInit() {
this.getListSortMasters();
@@ -495,8 +500,8 @@ export class HomeComponent implements OnInit {
}
}
getHomeAlarmChartData() {
- let nowTime = this.myhttp.dateformater(Date.now());
- let startTime = this.myhttp.dateformater(Date.now() - 30 * 24 * 60 * 60 * 1000);
+ let nowTime = this.Util.dateformater(Date.now());
+ let startTime = this.Util.dateformater(Date.now() - 30 * 24 * 60 * 60 * 1000);
let obj = {
sourceName: this.sourceNameSelected,
startTime: startTime,