member_webapp/@overflow/probe/component/probe-host.component.ts

39 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2018-06-04 08:25:29 +00:00
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { InfraHost } from '@overflow/commons-typescript/model/infra';
@Component({
selector: 'of-probe-host',
templateUrl: './probe-host.component.html',
})
export class ProbeHostComponent implements OnInit {
@Input() infraHost: InfraHost;
@Input() infraHostID: number;
error$: Observable<any>;
pending$: Observable<boolean>;
constructor(
) {
}
ngOnInit() {
if (undefined === this.infraHost && undefined === this.infraHostID) {
// Create
} else if (undefined !== this.infraHost && undefined === this.infraHostID) {
// use infraHost
} else if (undefined === this.infraHost && undefined !== this.infraHostID) {
// get infraHost
} else {
// error
}
}
}