git pul
This commit is contained in:
parent
11b4fcfaf2
commit
c39e7ed1ab
|
@ -31,33 +31,36 @@ 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.select(AuthSelector.select('domain')).subscribe(
|
||||
(domain: Domain) => {
|
||||
this.store.dispatch(new ListStore.ReadAllByDomain(domain));
|
||||
}
|
||||
);
|
||||
|
||||
// this.noAuthProbes$.subscribe(
|
||||
// (noAuthProbes: NoAuthProbe[]) => {
|
||||
// },
|
||||
// (error: RPCClientError) => {
|
||||
// console.log(error.response.message);
|
||||
// }
|
||||
// );
|
||||
this.noAuthProbes$.subscribe(
|
||||
(result: NoAuthProbe[]) => {
|
||||
if (result) {
|
||||
this.noauthProbes = result;
|
||||
}
|
||||
},
|
||||
(error: RPCClientError) => {
|
||||
console.log(error.response.message);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// Temporary Data
|
||||
this.noauthProbes = new Array();
|
||||
for (let i = 0; i < 10; i++) {
|
||||
const p: NoAuthProbe = {
|
||||
id: i,
|
||||
tempProbeKey: 'TempKey' + i,
|
||||
createDate: new Date(),
|
||||
description: 'Description' + i,
|
||||
};
|
||||
this.noauthProbes.push(p);
|
||||
}
|
||||
// this.noauthProbes = new Array();
|
||||
// for (let i = 0; i < 10; i++) {
|
||||
// const p: NoAuthProbe = {
|
||||
// id: i,
|
||||
// tempProbeKey: 'TempKey' + i,
|
||||
// createDate: new Date(),
|
||||
// description: 'Description' + i,
|
||||
// };
|
||||
// this.noauthProbes.push(p);
|
||||
// }
|
||||
}
|
||||
|
||||
handleSelect(selected: NoAuthProbe) {
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
<div>
|
||||
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay">
|
||||
<of-sensor-setting></of-sensor-setting>
|
||||
</p-dialog>
|
||||
|
||||
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton (click)="onAddSensor()"></button>
|
||||
</div>
|
||||
|
||||
<div>sensor list</div>
|
|
@ -22,32 +22,29 @@ import { Page, PageParams } from 'app/commons/model';
|
|||
export class ListComponent implements OnInit, AfterContentInit {
|
||||
|
||||
sensorList$ = this.store.pipe(select(sensorListSelector.select('page')));
|
||||
|
||||
displayedColumns = ['target', 'crawler', 'itemCount', 'status'];
|
||||
PAGE_SIZE = '10';
|
||||
totalLength = 0;
|
||||
sensorSettingDisplay = false;
|
||||
|
||||
constructor(private router: Router,
|
||||
private store: Store<ListStore.State>,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.sensorList$.subscribe(
|
||||
(page: Page) => {
|
||||
if (page != null) {
|
||||
this.totalLength = page.totalElements;
|
||||
// this.dataSource = new MatTableDataSource(page.content);
|
||||
// this.dataSource.sort = this.sort;
|
||||
}
|
||||
},
|
||||
(error: RPCClientError) => {
|
||||
console.log(error.response.message);
|
||||
}
|
||||
);
|
||||
// this.sensorList$.subscribe(
|
||||
// (page: Page) => {
|
||||
// if (page != null) {
|
||||
// this.totalLength = page.totalElements;
|
||||
// }
|
||||
// },
|
||||
// (error: RPCClientError) => {
|
||||
// console.log(error.response.message);
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
ngAfterContentInit() {
|
||||
this.getSensors(0);
|
||||
// this.getSensors(0);
|
||||
}
|
||||
|
||||
getSensors(pageIndex: number) {
|
||||
|
@ -72,14 +69,8 @@ export class ListComponent implements OnInit, AfterContentInit {
|
|||
this.router.navigate(['target', obj.id]);
|
||||
}
|
||||
|
||||
// addSensor() {
|
||||
// const dialogRef = this.dialog.open(SettingComponent, {
|
||||
// width: '80%',
|
||||
// });
|
||||
|
||||
// dialogRef.afterClosed().subscribe(result => {
|
||||
// console.log('The dialog was closed');
|
||||
|
||||
// });
|
||||
// }
|
||||
onAddSensor() {
|
||||
this.sensorSettingDisplay = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,95 +1,41 @@
|
|||
<div class="card no-margin" style="height: 250px; overflow: auto">
|
||||
<h1>3. Credential for </h1>
|
||||
|
||||
<div class="ui-g form-group">
|
||||
<div class="ui-g-12 ui-md-2">
|
||||
<label for="input">User</label>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-4">
|
||||
<p-panel header="3. Credential">
|
||||
<div class="ui-g" style="height: 180px; overflow: auto">
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input id="input" type="text" pInputText/>
|
||||
<label>Username</label>
|
||||
<input id="name" type="text" pInputText />
|
||||
<label for="name">User</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input id="age" type="text" pInputText />
|
||||
<label for="age">Password</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input id="name" type="text" pInputText />
|
||||
<label for="name">User</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input id="age" type="text" pInputText />
|
||||
<label for="age">Password</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input id="name" type="text" pInputText />
|
||||
<label for="name">User</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input id="age" type="text" pInputText />
|
||||
<label for="age">Password</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g form-group">
|
||||
<div class="ui-g-12 ui-md-2">
|
||||
<label for="input">User</label>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-4">
|
||||
<span class="md-inputfield">
|
||||
<input id="input" type="text" pInputText/>
|
||||
<label>Username</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g form-group">
|
||||
<div class="ui-g-12 ui-md-2">
|
||||
<label for="input">User</label>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-4">
|
||||
<span class="md-inputfield">
|
||||
<input id="input" type="text" pInputText/>
|
||||
<label>Username</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g form-group">
|
||||
<div class="ui-g-12 ui-md-2">
|
||||
<label for="input">User</label>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-4">
|
||||
<span class="md-inputfield">
|
||||
<input id="input" type="text" pInputText/>
|
||||
<label>Username</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g form-group">
|
||||
<div class="ui-g-12 ui-md-2">
|
||||
<label for="input">User</label>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-4">
|
||||
<span class="md-inputfield">
|
||||
<input id="input" type="text" pInputText/>
|
||||
<label>Username</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <div>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Step 3</mat-card-title>
|
||||
<mat-card-subtitle>Crawler 인증</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content *ngIf="inputItems">
|
||||
<perfect-scrollbar style="height: 150px">
|
||||
<div *ngFor="let inputItem of inputItems">
|
||||
<mat-form-field>
|
||||
<input *ngIf="inputItem.inputType.id == 1" matInput type="text" placeholder={{inputItem.name}} required={{inputItem.required}}>
|
||||
<input *ngIf="inputItem.inputType.id == 2" matInput type="password" placeholder={{inputItem.name}} required={{inputItem.required}}>
|
||||
<input *ngIf="inputItem.inputType.id == 3" matInput type="number" placeholder={{inputItem.name}} required={{inputItem.required}}>
|
||||
<mat-select *ngIf="inputItem.inputType.id == 4" placeholder={{inputItem.name}}>
|
||||
<mat-option value="true">Yes</mat-option>
|
||||
<mat-option value="true">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-select *ngIf="inputItem.inputType.id == 5" placeholder={{inputItem.name}}>
|
||||
<mat-option *ngFor="let option of inputItem.keyValue.split('|')" value="option">{{option}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayoutAlign="end" *ngIf="inputItems.length > 0">
|
||||
<button mat-raised-button (click)="testConnect()" color="primary">Test</button>
|
||||
</div>
|
||||
</perfect-scrollbar>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
</div> -->
|
||||
<button type="button" label="Test" icon="ui-icon-send" pButton></button>
|
||||
</p-panel>
|
|
@ -66,20 +66,20 @@ export class TargetSelectorComponent implements OnInit {
|
|||
}
|
||||
|
||||
getTargetList() {
|
||||
this.store.select(AuthSelector.select('domain')).subscribe(
|
||||
(domain: Domain) => {
|
||||
const pageParams: PageParams = {
|
||||
pageNo: '0',
|
||||
countPerPage: '9999',
|
||||
sortCol: 'id',
|
||||
sortDirection: 'descending'
|
||||
};
|
||||
this.store.dispatch(new ListStore.ReadAllByDomain({ domain, pageParams }));
|
||||
},
|
||||
(error) => {
|
||||
console.log(error);
|
||||
}
|
||||
);
|
||||
// this.store.select(AuthSelector.select('domain')).subscribe(
|
||||
// (domain: Domain) => {
|
||||
// const pageParams: PageParams = {
|
||||
// pageNo: '0',
|
||||
// countPerPage: '9999',
|
||||
// sortCol: 'id',
|
||||
// sortDirection: 'descending'
|
||||
// };
|
||||
// this.store.dispatch(new ListStore.ReadAllByDomain({ domain, pageParams }));
|
||||
// },
|
||||
// (error) => {
|
||||
// console.log(error);
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
targetSelected(t: Target) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user