taret
This commit is contained in:
parent
5adeb5e411
commit
c57f1193f3
|
@ -6,8 +6,6 @@
|
||||||
</p-dialog>
|
</p-dialog>
|
||||||
|
|
||||||
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-button-width-fit" (click)="onAddSensor()"></button>
|
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-button-width-fit" (click)="onAddSensor()"></button>
|
||||||
<button type="button" label="Add Sensor with Target(temp)" icon="ui-icon-add" pButton class="ui-button-width-fit" (click)="onAddSensorWithTarget()"></button>
|
|
||||||
<button type="button" label="Add Sensor with Target2(temp)" icon="ui-icon-add" pButton class="ui-button-width-fit" (click)="onAddSensorWithTarget2()"></button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui-g">
|
<div class="ui-g">
|
||||||
|
@ -17,7 +15,7 @@
|
||||||
<h3>Search</h3>
|
<h3>Search</h3>
|
||||||
<div class="ui-g-12 ui-inputgroup ui-bottom-space-10">
|
<div class="ui-g-12 ui-inputgroup ui-bottom-space-10">
|
||||||
<span class="md-inputfield">
|
<span class="md-inputfield">
|
||||||
<input type="text" pInputText>
|
<input type="text" pInputText [(ngModel)]="filteredName">
|
||||||
<label>IP or Application name</label>
|
<label>IP or Application name</label>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,10 +27,10 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="ui-g-6">
|
<div class="ui-g-6">
|
||||||
<p-checkbox name="cg" value="Active" label="Active" [(ngModel)]="checkboxValues"></p-checkbox>
|
<p-checkbox name="cg" value="Active" label="Active" [(ngModel)]="selectedStatus"></p-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-6">
|
<div class="ui-g-6">
|
||||||
<p-checkbox name="cg" value="Inactive" label="Inactive" [(ngModel)]="checkboxValues"></p-checkbox>
|
<p-checkbox name="cg" value="Inactive" label="Inactive" [(ngModel)]="selectedStatus"></p-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<button pButton type="button" label="Search" class="ui-button-secondary ui-top-space-10" (click)="onSearch()"></button>
|
<button pButton type="button" label="Search" class="ui-button-secondary ui-top-space-10" (click)="onSearch()"></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,7 +50,7 @@
|
||||||
<a href="javascript:void(0)" (click)="onSensorClick(sensor)">{{sensor.crawler.name}} | {{sensor.itemCount}} items | {{sensor.status.name}}</a>
|
<a href="javascript:void(0)" (click)="onSensorClick(sensor)">{{sensor.crawler.name}} | {{sensor.itemCount}} items | {{sensor.status.name}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <button type="button" pButton icon="ui-icon-search" style="margin:24px 24px 0 0;float:right"></button> -->
|
<button type="button" pButton icon="ui-icon-add" style="margin:24px 24px 0 0;float:right" (click)="onAddSensorWithTarget(item.target)"></button>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-dataList>
|
</p-dataList>
|
||||||
|
|
|
@ -36,7 +36,10 @@ export class ListComponent implements OnInit, AfterContentInit {
|
||||||
|
|
||||||
// filter
|
// filter
|
||||||
targetOptions: SelectItem[];
|
targetOptions: SelectItem[];
|
||||||
|
|
||||||
|
filteredName: string;
|
||||||
selectedTargets: string[] = [];
|
selectedTargets: string[] = [];
|
||||||
|
selectedStatus: string[] = [];
|
||||||
|
|
||||||
constructor(private router: Router,
|
constructor(private router: Router,
|
||||||
private store: Store<ListStore.State>,
|
private store: Store<ListStore.State>,
|
||||||
|
@ -127,6 +130,11 @@ export class ListComponent implements OnInit, AfterContentInit {
|
||||||
this.sensorSettingDisplay = true;
|
this.sensorSettingDisplay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onAddSensorWithTarget(target: Target) {
|
||||||
|
this.target = target;
|
||||||
|
this.sensorSettingDisplay = true;
|
||||||
|
}
|
||||||
|
|
||||||
onSensorSettingClose() {
|
onSensorSettingClose() {
|
||||||
this.sensorSettingDisplay = false;
|
this.sensorSettingDisplay = false;
|
||||||
}
|
}
|
||||||
|
@ -135,31 +143,11 @@ export class ListComponent implements OnInit, AfterContentInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onSearch() {
|
onSearch() {
|
||||||
|
console.log(this.filteredName);
|
||||||
|
console.log(this.selectedTargets);
|
||||||
|
console.log(this.selectedStatus);
|
||||||
|
alert('서버-검색 기능 구현 필요');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Test
|
|
||||||
onAddSensorWithTarget() {
|
|
||||||
this.target = {
|
|
||||||
id: 1,
|
|
||||||
createDate: new Date(),
|
|
||||||
displayName: 'Alredy selected target111',
|
|
||||||
description: 'Desc..',
|
|
||||||
};
|
|
||||||
this.sensorSettingDisplay = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
onAddSensorWithTarget2() {
|
|
||||||
this.target = {
|
|
||||||
id: 2,
|
|
||||||
createDate: new Date(),
|
|
||||||
displayName: 'Alredy selected target222',
|
|
||||||
description: 'Desc..',
|
|
||||||
};
|
|
||||||
this.sensorSettingDisplay = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<h1>Targets</h1>
|
<h1>Targets</h1>
|
||||||
|
|
||||||
<p-table [value]="infras" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true">
|
<p-table [value]="infras" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true" dataKey="id">
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header" let-columns>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="width: 3.5em"></th>
|
||||||
<th style="width: 4em">No.</th>
|
<th style="width: 4em">No.</th>
|
||||||
<th style="width: 8em">Status</th>
|
<th style="width: 8em">Status</th>
|
||||||
<th style="width: 8em">Type</th>
|
<th style="width: 8em">Type</th>
|
||||||
|
@ -12,8 +13,13 @@
|
||||||
<th style="width: 10em"></th>
|
<th style="width: 10em"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="body" let-infra let-rowIndex="rowIndex">
|
<ng-template pTemplate="body" let-infra let-rowIndex="rowIndex" let-expanded="expanded" let-columns="infras">
|
||||||
<tr [pSelectableRow]="infra">
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)" [pRowToggler]="infra">
|
||||||
|
<i [ngClass]="expanded ? 'fa fa-fw fa-chevron-circle-down' : 'fa fa-fw fa-chevron-circle-right'"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>{{rowIndex}}</td>
|
<td>{{rowIndex}}</td>
|
||||||
<td>??</td>
|
<td>??</td>
|
||||||
<td>{{infra.infraType.name}}</td>
|
<td>{{infra.infraType.name}}</td>
|
||||||
|
@ -25,6 +31,17 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template pTemplate="rowexpansion" let-rowData let-columns="infras">
|
||||||
|
<tr>
|
||||||
|
<td [attr.colspan]="8">
|
||||||
|
<div class="ui-g ui-fluid" style="font-size:16px;padding:20px">
|
||||||
|
<div>요기다가 센서 리스트와 상태 출력</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
</p-table>
|
</p-table>
|
||||||
|
|
||||||
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false" [closeOnEscape]="false">
|
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false" [closeOnEscape]="false">
|
||||||
|
|
|
@ -124,7 +124,8 @@ export class ListComponent implements OnInit, AfterContentInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onRowSelect(event) {
|
onRowSelect(event) {
|
||||||
console.log(event.data);
|
console.log(event.data.target);
|
||||||
|
// this.router.navigate(['notification']);
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddSensor(target: Target) {
|
onAddSensor(target: Target) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user