This commit is contained in:
geek 2018-05-25 20:17:42 +09:00
parent f7a09c209e
commit c58c5d98b1
5 changed files with 16 additions and 10 deletions

View File

@ -1 +1 @@
<of-discovery></of-discovery>

View File

@ -1,9 +1,8 @@
import {
AfterContentInit, Component,
AfterContentInit, Component, Input,
OnInit
} from '@angular/core';
import { select, StateObservable } from '@ngrx/store';
import { ListSelector } from '../../../probe/store';
import { ActivatedRoute } from '@angular/router';
@Component({
@ -17,13 +16,14 @@ export class DiscoveryContainerComponent implements OnInit, AfterContentInit {
// discovery start
// discovery stop
// get service list
probes$: StateObservable;
@Input() hostID;
constructor(
private activatedRoute: ActivatedRoute,
) {
// this.returnURL = this.activatedRoute.snapshot.queryParams['probe'] || null;
// this.probes$ = listStore.pipe(select(ListSelector.select('probes')));
if (this.hostID > 0 && this.hostID !== undefined ) {
console.log('ddddddddddddddddddddddddddddddddddddddd');
}
}
ngOnInit() {

View File

@ -10,6 +10,7 @@ import { COMPONENTS } from './component';
import { SERVICES } from './service';
import { PrimeNGModules } from '@overflow/commons/prime-ng/prime-ng.module';
import { KeyValueModule } from '@overflow/commons/component/key-value/key-value.module';
import { CONTAINER_COMPONENTS } from './container';
@NgModule({
imports: [
@ -23,10 +24,12 @@ import { KeyValueModule } from '@overflow/commons/component/key-value/key-value.
KeyValueModule
],
declarations: [
COMPONENTS
COMPONENTS,
CONTAINER_COMPONENTS
],
exports: [
COMPONENTS,
CONTAINER_COMPONENTS
],
providers: [
SERVICES,

View File

@ -2,7 +2,8 @@
<div class="ui-g">
<div class="ui-g-12">
<div class="card no-margin">
<of-discovery></of-discovery>
<!--<of-discovery></of-discovery>-->
<of-discovery-container (hostID)="hostId"></of-discovery-container>
</div>
</div>
</div>

View File

@ -7,14 +7,16 @@ import { ActivatedRoute } from '@angular/router';
})
export class DiscoveryPageComponent implements OnInit {
hostId: number;
constructor(
private route: ActivatedRoute
) { }
ngOnInit() {
this.route.params.subscribe((params: any) => {
const probeHostID = params['probeHostID'];
console.log('probeHostID : ' + probeHostID);
this.hostId = params['probeHostID'];
// console.log('probeHostID : ' + probeHostID);
});
}
}