ing
This commit is contained in:
parent
e8ad7b6716
commit
b525f40063
|
@ -47,7 +47,11 @@
|
||||||
<b>HostID:</b> {{rowData.descriptions.host.hostID}}
|
<b>HostID:</b> {{rowData.descriptions.host.hostID}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private noAuthProbeService: NoAuthProbeService,
|
private noAuthProbeService: NoAuthProbeService,
|
||||||
) {
|
) {
|
||||||
|
this.noauthProbes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
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 { COMPONENTS } from './component';
|
||||||
import { DIRECTIVES } from './directive';
|
import { DIRECTIVES } from './directive';
|
||||||
|
import { PIPES } from './pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -14,10 +15,12 @@ import { DIRECTIVES } from './directive';
|
||||||
PRIME_NG_MODULES,
|
PRIME_NG_MODULES,
|
||||||
COMPONENTS,
|
COMPONENTS,
|
||||||
DIRECTIVES,
|
DIRECTIVES,
|
||||||
|
PIPES,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
COMPONENTS,
|
COMPONENTS,
|
||||||
DIRECTIVES,
|
DIRECTIVES,
|
||||||
|
PIPES,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class UIModule { }
|
export class UIModule { }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user