-
+
diff --git a/src/packages/sensor/component/setting/setting.component.ts b/src/packages/sensor/component/setting/setting.component.ts
index cd9960c..892f516 100644
--- a/src/packages/sensor/component/setting/setting.component.ts
+++ b/src/packages/sensor/component/setting/setting.component.ts
@@ -18,19 +18,20 @@ import { TreeNode } from 'primeng/primeng';
})
export class SettingComponent implements OnInit, DoCheck, OnChanges {
- @Input() visible: boolean;
-
- @Input() isAllTarget: boolean;
- @Input() selectedTarget: Target;
+ @Input() preTarget: Target;
@Output() close = new EventEmitter();
+
nextable = false;
- sensorItemKeys$ = this.keyListStore.pipe(select(ReadSensorItemKeySelector.select('list')));
+ selectedTarget: Target;
selectedCrawler: MetaCrawler;
credentialPassed: boolean;
selectedSensorDisplayItems: MetaSensorDisplayItem[];
itemNodes: TreeNode[];
step = 1;
+ sensorItemKeys$ = this.keyListStore.pipe(select(ReadSensorItemKeySelector.select('list')));
+
+
constructor(
private keyListStore: Store,
) {
@@ -49,7 +50,8 @@ export class SettingComponent implements OnInit, DoCheck, OnChanges {
// );
}
- ngOnChanges() {
+ ngOnChanges(changes) {
+
}
ngDoCheck() {
@@ -71,6 +73,10 @@ export class SettingComponent implements OnInit, DoCheck, OnChanges {
}
onCancel() {
+ this.selectedTarget = null;
+ this.selectedCrawler = null;
+ this.credentialPassed = false;
+ this.selectedSensorDisplayItems = null;
this.close.emit();
}
diff --git a/src/packages/sensor/component/setting/target-selector/target-selector.component.ts b/src/packages/sensor/component/setting/target-selector/target-selector.component.ts
index cbc34a8..1e3560b 100644
--- a/src/packages/sensor/component/setting/target-selector/target-selector.component.ts
+++ b/src/packages/sensor/component/setting/target-selector/target-selector.component.ts
@@ -18,9 +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;
+ @Input() preTarget: Target = null;
@Output() targetSelected = new EventEmitter();
targets: Target[] = null;
@@ -30,13 +28,6 @@ export class TargetSelectorComponent implements OnInit, OnChanges {
) { }
ngOnInit() {
- this.targets = new Array();
- if (this.target === null) {
- this.getTargetList();
- } else {
- this.targets.push(this.target);
- }
-
// this.targets$.subscribe(
// (page: Page) => {
// if (page !== null) {
@@ -50,12 +41,12 @@ export class TargetSelectorComponent implements OnInit, OnChanges {
}
ngOnChanges(changes) {
- // this.targets = new Array();
- // if (this.isAllTarget) {
- // this.getTargetList();
- // } else {
- // this.targets.push(this.target);
- // }
+ this.targets = [];
+ if (this.preTarget === null) {
+ this.getTargetList();
+ } else {
+ this.targets.push(this.preTarget);
+ }
}
convertInfraToTarget(page: Page) {