ing
This commit is contained in:
parent
e8ad7b6716
commit
b525f40063
|
@ -47,7 +47,11 @@
|
|||
<b>HostID:</b> {{rowData.descriptions.host.hostID}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Connected:</b> {{rowData.connectDate | date: 'dd/MM/yyyy'}} ({{rowData.connectAddress}})
|
||||
<b>Connected:</b>
|
||||
<ng-container [ngSwitch]="rowData.connectDate">
|
||||
<ng-container *ngSwitchCase="undefined"> Not Connected</ng-container>
|
||||
<ng-container *ngSwitchDefault> {{rowData.connectDate | date: 'dd/MM/yyyy'}} ({{rowData.connectAddress}})</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
|
|||
private store: Store<any>,
|
||||
private noAuthProbeService: NoAuthProbeService,
|
||||
) {
|
||||
this.noauthProbes = [];
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
5
@overflow/shared/ui/pipe/index.ts
Normal file
5
@overflow/shared/ui/pipe/index.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { UPTimePipe } from './uptime.pipe';
|
||||
|
||||
export const PIPES = [
|
||||
UPTimePipe,
|
||||
];
|
14
@overflow/shared/ui/pipe/uptime.pipe.ts
Normal file
14
@overflow/shared/ui/pipe/uptime.pipe.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Pipe({
|
||||
name: 'ofUPTime'
|
||||
})
|
||||
export class UPTimePipe extends DatePipe implements PipeTransform {
|
||||
transform(value: any, nullString: string, format = 'mediumDate', timezone?: string, locale?: string): string | null {
|
||||
if (value == null || value === '' || value !== value) {
|
||||
return nullString;
|
||||
}
|
||||
return super.transform(value, format, timezone, locale);
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import { PRIME_NG_MODULES } from './ui-prime-ng.module';
|
|||
|
||||
import { COMPONENTS } from './component';
|
||||
import { DIRECTIVES } from './directive';
|
||||
import { PIPES } from './pipe';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -14,10 +15,12 @@ import { DIRECTIVES } from './directive';
|
|||
PRIME_NG_MODULES,
|
||||
COMPONENTS,
|
||||
DIRECTIVES,
|
||||
PIPES,
|
||||
],
|
||||
declarations: [
|
||||
COMPONENTS,
|
||||
DIRECTIVES,
|
||||
PIPES,
|
||||
],
|
||||
})
|
||||
export class UIModule { }
|
||||
|
|
Loading…
Reference in New Issue
Block a user