This commit is contained in:
insanity 2018-04-13 16:27:47 +09:00
parent 209caaeca1
commit f1f95df754
6 changed files with 29 additions and 12 deletions

View File

@ -33,7 +33,7 @@ export class ListComponent implements OnInit, AfterContentInit {
ngAfterContentInit() {
this.store.select(AuthSelector.select('domain')).subscribe(
(domain: Domain) => {
// this.store.dispatch(new ListStore.ReadAllByDomain(domain));
this.store.dispatch(new ListStore.ReadAllByDomain(domain));
}
);

View File

@ -1,6 +1,6 @@
<div>
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false">
<of-sensor-setting [isAllTarget]="isAllTarget" [selectedTarget]="target" (close)="onSensorSettingClose()"></of-sensor-setting>
<of-sensor-setting [visible]="sensorSettingDisplay" [isAllTarget]="isAllTarget" [selectedTarget]="target" (close)="onSensorSettingClose()"></of-sensor-setting>
</p-dialog>
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton (click)="onAddSensor()"></button>

View File

@ -55,7 +55,21 @@ export class CrawlerAuthComponent implements OnInit, OnChanges {
this.title += ' for ' + this.crawler.name;
for (let i = 0; i < 10; i++) {
const item: MetaCrawlerInputItem = {
id: i,
// inputType: {
// id: i,
// name: '',
// description: '',
// },
crawler: null,
description: '',
name: '',
createDate: new Date(),
required: true,
defaultValue: '',
pattern: '',
keyName: '',
keyValue: '',
};
this.inputItems.push(item);
}

View File

@ -1,7 +1,7 @@
<div [hidden]="step !== 1">
<div class="ui-g">
<div class="ui-g-6">
<of-target-selector [target]="selectedTarget" (targetSelected)="onTargetSelect($event)" [isAllTarget]="isAllTarget"></of-target-selector>
<of-target-selector [visible]="visible" [target]="selectedTarget" (targetSelected)="onTargetSelect($event)" [isAllTarget]="isAllTarget"></of-target-selector>
</div>
<div class="ui-g-6">
<of-crawler-auth [crawler]="selectedCrawler" (credentialPassed)="onCredentialPass($event)"></of-crawler-auth>

View File

@ -1,4 +1,4 @@
import { Component, OnInit, Input, Inject, DoCheck, ViewEncapsulation, Output, EventEmitter, OnDestroy, OnChanges } from '@angular/core';
import { Component, OnInit, Input, Inject, DoCheck, ViewEncapsulation, Output, EventEmitter, OnChanges } from '@angular/core';
import { Target } from 'packages/target/model';
import { Infra } from 'packages/infra/model';
import { MetaCrawler } from 'packages/meta/crawler/model/MetaCrawler';
@ -18,6 +18,8 @@ import { TreeNode } from 'primeng/primeng';
})
export class SettingComponent implements OnInit, DoCheck, OnChanges {
@Input() visible: boolean;
@Input() isAllTarget: boolean;
@Input() selectedTarget: Target;
@Output() close = new EventEmitter();

View File

@ -18,6 +18,7 @@ export class TargetSelectorComponent implements OnInit, OnChanges {
targets$ = this.store.pipe(select(ListSelector.select('page')));
@Input() visible: boolean;
@Input() target: Target = null;
@Input() isAllTarget: boolean;
@Output() targetSelected = new EventEmitter<Target>();
@ -48,13 +49,13 @@ export class TargetSelectorComponent implements OnInit, OnChanges {
// );
}
ngOnChanges() {
this.targets = new Array();
if (this.isAllTarget) {
this.getTargetList();
} else {
this.targets.push(this.target);
}
ngOnChanges(changes) {
// this.targets = new Array();
// if (this.isAllTarget) {
// this.getTargetList();
// } else {
// this.targets.push(this.target);
// }
}
convertInfraToTarget(page: Page) {