meta crawler

This commit is contained in:
insanity 2018-03-20 17:03:42 +09:00
parent 4ae2106219
commit 928c09eb7f
2 changed files with 6 additions and 15 deletions

View File

@ -17,6 +17,6 @@ export class MetaCrawlerService {
} }
public readAll(): Observable<MetaCrawler[]> { public readAll(): Observable<MetaCrawler[]> {
return this.rpcClient.call('CrawlerService.readAll'); return this.rpcClient.call('MetaCrawlerService.readAll');
} }
} }

View File

@ -16,7 +16,7 @@ import { MetaCrawler } from 'packages/meta/crawler/model/MetaCrawler';
}) })
export class CrawlerSelectorComponent implements OnInit, OnChanges, AfterContentInit { export class CrawlerSelectorComponent implements OnInit, OnChanges, AfterContentInit {
crawlers$ = this.listStore.pipe(select(ReadAllCrawlerSelector.select('list'))); crawlers$ = this.listStore.pipe(select(ReadAllCrawlerSelector.select('metaCrawlerList')));
@Input() selectedTarget: Target; @Input() selectedTarget: Target;
crawlers: MetaCrawler[]; crawlers: MetaCrawler[];
@ -30,7 +30,7 @@ export class CrawlerSelectorComponent implements OnInit, OnChanges, AfterContent
this.crawlers$.subscribe( this.crawlers$.subscribe(
(list: MetaCrawler[]) => { (list: MetaCrawler[]) => {
if (list !== null) { if (list !== null) {
console.log(list); this.crawlers = list;
} }
}, },
(error: RPCError) => { (error: RPCError) => {
@ -44,18 +44,9 @@ export class CrawlerSelectorComponent implements OnInit, OnChanges, AfterContent
} }
ngOnChanges() { ngOnChanges() {
if (this.selectedTarget) { // if (this.selectedTarget) {
console.log('Getting valid crawlers for ' + this.selectedTarget.displayName); // console.log('Getting valid crawlers for ' + this.selectedTarget.displayName);
} // }
this.crawlers = new Array();
for (let i = 0; i < 3; i++) {
const c: MetaCrawler = {
id: i,
name: 'Crawler' + i,
};
this.crawlers.push(c);
}
} }
crawlerSelected(crawler: MetaCrawler) { crawlerSelected(crawler: MetaCrawler) {