This commit is contained in:
geek 2018-06-07 15:30:15 +09:00
parent 1a4cb7e513
commit 10d529e0f7
2 changed files with 6 additions and 42 deletions

View File

@ -5,7 +5,7 @@
<tr> <tr>
<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: 15em">Type</th>
<th>Name</th> <th>Name</th>
<th style="width: 15em">Sensors</th> <th style="width: 15em">Sensors</th>
<th style="width: 8em">Created at</th> <th style="width: 8em">Created at</th>
@ -15,11 +15,11 @@
<ng-template pTemplate="body" let-target let-rowIndex="rowIndex"> <ng-template pTemplate="body" let-target let-rowIndex="rowIndex">
<tr [pSelectableRow]="target"> <tr [pSelectableRow]="target">
<td>{{rowIndex + 1}}</td> <td>{{rowIndex + 1}}</td>
<td>??</td> <td></td>
<td>{{target.infra.id}}</td> <td>{{target.infra.metaInfraType.name}}</td>
<td>{{target.displayName}}</td> <td>{{target.displayName}}</td>
<td>{{target.sensorCount}}</td> <td>{{target.sensorCount}}</td>
<td>{{target.createDate | date: 'dd.MM.yyyy'}}</td> <td>{{target.createDate | date: 'yyyy-MM-dd'}}</td>
<td> <td>
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-s-button" (click)="onAddSensor(target)"></button> <button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-s-button" (click)="onAddSensor(target)"></button>
</td> </td>

View File

@ -17,25 +17,12 @@ import { Page } from '@overflow/commons-typescript/model/commons/Page';
selector: 'of-target-list', selector: 'of-target-list',
templateUrl: './list.component.html', templateUrl: './list.component.html',
}) })
export class ListComponent implements OnInit, AfterContentInit, OnDestroy { export class ListComponent implements OnInit {
// infrasSubscription$: Subscription;
// infras$: Observable<Infra[]>;
// infras: Infra[];
// probe: Probe;
// target: Target = null;
// sensorSettingDisplay = false;
// pageSize = '10';
// totalLength = 0;
// currPage = 0;
page: Page<Target>; page: Page<Target>;
pending$: Observable<boolean>; pending$: Observable<boolean>;
error$: Observable<any>; error$: Observable<any>;
totalLength: number;
targets: Object;
constructor( constructor(
private store: Store<any>, private store: Store<any>,
private targetService: TargetService, private targetService: TargetService,
@ -45,7 +32,7 @@ export class ListComponent implements OnInit, AfterContentInit, OnDestroy {
ngOnInit() { ngOnInit() {
const pageParams: PageParams = { const pageParams: PageParams = {
pageNo: 0, pageNo: 0,
countPerPage: 2, countPerPage: 5,
sortCol: 'id', sortCol: 'id',
sortDirection: 'descending', sortDirection: 'descending',
}; };
@ -69,21 +56,6 @@ export class ListComponent implements OnInit, AfterContentInit, OnDestroy {
).subscribe(); ).subscribe();
} }
ngAfterContentInit() {
// this.route.params.subscribe((params: any) => {
// this.probe = {
// id: params['id'],
// };
// this.getInfras(0);
// });
}
ngOnDestroy() {
// if (this.infrasSubscription$) {
// this.infrasSubscription$.unsubscribe();
// }
}
getInfras(pageNo) { getInfras(pageNo) {
// const pageParams: PageParams = { // const pageParams: PageParams = {
// pageNo: pageNo + '', // pageNo: pageNo + '',
@ -108,14 +80,6 @@ export class ListComponent implements OnInit, AfterContentInit, OnDestroy {
// this.sensorSettingDisplay = true; // this.sensorSettingDisplay = true;
} }
onSensorSettingClose() {
// this.sensorSettingDisplay = false;
}
onPaging(e) {
// this.getInfras(e.page);
}
onPaginate(event) { onPaginate(event) {
} }