This commit is contained in:
crusader 2018-05-29 20:53:04 +09:00
parent ac08c59512
commit 288c9c78c6
6 changed files with 74 additions and 3 deletions

View File

@ -0,0 +1,2 @@
export const COMPONENTS = [
];

View File

@ -0,0 +1,5 @@
import { MetaCrawlerContainerComponent } from './meta-crawler-container.component';
export const CONTAINER_COMPONENTS = [
MetaCrawlerContainerComponent,
];

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MetaCrawlerContainerComponent } from './meta-crawler-container.component';
describe('MetaCrawlerContainerComponent', () => {
let component: MetaCrawlerContainerComponent;
let fixture: ComponentFixture<MetaCrawlerContainerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MetaCrawlerContainerComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MetaCrawlerContainerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,34 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Store, select } from '@ngrx/store';
import { Observable, Subscription } from 'rxjs';
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
import { AuthContainerSelector } from '@overflow/shared/auth/store';
import { Domain, DomainMember } from '@overflow/commons-typescript/model/domain';
import { ConfirmationService } from 'primeng/primeng';
import { MessageService } from 'primeng/components/common/messageservice';
import { RPCClientError } from '@loafer/ng-rpc';
import { MetaCrawler } from '@overflow/commons-typescript/model/meta';
import { MetaCrawlerEntitySelector } from '../store';
@Component({
selector: 'of-meta-crawler-container',
templateUrl: './meta-crawler-container.component.html'
})
export class MetaCrawlerContainerComponent implements OnInit, OnDestroy {
metaCrawlers$: Observable<MetaCrawler[]>;
constructor(
private store: Store<any>,
) {
}
ngOnInit() {
this.metaCrawlers$ = this.store.pipe(select(MetaCrawlerEntitySelector.selectAll));
}
ngOnDestroy(): void {
}
}

View File

@ -1,9 +1,10 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { } from './crawler.module';
import { COMPONENTS } from './component';
import { CONTAINER_COMPONENTS } from './container';
import { SERVICES } from './service';
import { MetaStoreModule } from './meta-store.module';
@NgModule({
@ -12,11 +13,15 @@ import { MetaStoreModule } from './meta-store.module';
MetaStoreModule,
],
declarations: [
COMPONENTS,
CONTAINER_COMPONENTS
],
exports: [
COMPONENTS,
CONTAINER_COMPONENTS
],
providers: [
SERVICES,
]
],
})
export class MetaModule { }