Merge branch 'master' of https://git.loafle.net/overflow/member_webapp
This commit is contained in:
commit
a74b8379cd
|
@ -1,2 +1 @@
|
|||
<div *ngIf="error">An error has occurred.</div>
|
||||
<of-probe-detail [pending]="pending$ |async" [probeHost]="probeHost$ | async" (modify)="onModify($event)" (discovery)="onDiscovery($event)"></of-probe-detail>
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, OnInit, Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
|
||||
import { Component, OnInit, Input, AfterViewInit, Output, EventEmitter, AfterContentInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
|
@ -10,7 +10,7 @@ import { ActivatedRoute } from '@angular/router';
|
|||
selector: 'of-probe-detail-container',
|
||||
templateUrl: './probe-detail-container.html',
|
||||
})
|
||||
export class ProbeDetailContainerComponent implements OnInit {
|
||||
export class ProbeDetailContainerComponent implements OnInit, OnChanges {
|
||||
|
||||
@Input() probeHostID: number;
|
||||
@Output() discovery = new EventEmitter<number>();
|
||||
|
@ -28,6 +28,9 @@ export class ProbeDetailContainerComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.probeHost$ = this.store.pipe(select(ProbeSelector.selectOne(this.probeHostID)));
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.store.dispatch(new ProbeStore.Read(this.probeHostID));
|
||||
}
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@ import * as ProbeListContainerStore from './container/probe-list';
|
|||
import * as ProbeDetailContainerStore from './container/probe-detail';
|
||||
|
||||
export interface State {
|
||||
probes: ProbeEntityStore.State;
|
||||
probe: ProbeEntityStore.State;
|
||||
probe_list_container: ProbeListContainerStore.State;
|
||||
probe_detail_container: ProbeDetailContainerStore.State;
|
||||
}
|
||||
|
||||
export const REDUCERS = {
|
||||
probes: ProbeEntityStore.reducer,
|
||||
probe: ProbeEntityStore.reducer,
|
||||
probe_list_container: ProbeListContainerStore.reducer,
|
||||
probe_detail_container: ProbeDetailContainerStore.reducer
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ export const selectState = createFeatureSelector<State>(MODULE.name);
|
|||
|
||||
export const ProbeSelector = ProbeEntityStore.getSelectors(createSelector(
|
||||
selectState,
|
||||
(state: State) => state.probes
|
||||
(state: State) => state.probe
|
||||
));
|
||||
|
||||
export const ProbeListContainerSelector = ProbeListContainerStore.getSelectors(createSelector(
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
export const environment = {
|
||||
production: false,
|
||||
restBaseURL: 'http://192.168.1.50:19080/webapp',
|
||||
restBaseURL: 'http://192.168.1.101:19080/webapp',
|
||||
webappRPCConfig: {
|
||||
url: 'ws://192.168.1.101:19090/webapp',
|
||||
reconnectInterval: 5000,
|
||||
|
|
Loading…
Reference in New Issue
Block a user