sensor in progress
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { SensorListComponent } from './list/list.component';
|
||||
import { SensorDetailComponent } from './detail/detail.component';
|
||||
import { SensorSettingComponent } from './setting/setting.component';
|
||||
|
||||
export const COMPONENTS = [
|
||||
SensorListComponent,
|
||||
SensorDetailComponent,
|
||||
SensorSettingComponent,
|
||||
];
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="ui-g-12">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-5 ui-g-nopad">
|
||||
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-button-large ui-button-width-fit" (click)="onAddSensor()"></button>
|
||||
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-button-large ui-button-width-fit" (click)="addSensor.emit()"></button>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-7 ui-g-nopad">
|
||||
<div style="float: right; margin-top: 30px;">
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<div class="ui-g-2" style="text-align: center !important">
|
||||
<div style="width:14px; height:14px; margin: auto;">
|
||||
<button type="button" pButton icon="ui-icon-add" (click)="onAddSensorWithTarget(item.target)"></button>
|
||||
<button type="button" pButton icon="ui-icon-add" (click)="addSensor.emit(item.target)"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { Component, Input, OnInit, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core';
|
||||
import { Sensor } from '@overflow/commons-typescript/model/sensor';
|
||||
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
||||
import { Target } from '@overflow/commons-typescript/model/target';
|
||||
@@ -10,6 +10,7 @@ import { Target } from '@overflow/commons-typescript/model/target';
|
||||
export class SensorListComponent implements OnChanges {
|
||||
|
||||
@Input() page: Page<Sensor>;
|
||||
@Output() addSensor = new EventEmitter();
|
||||
|
||||
totalLength: number;
|
||||
targetSensors: Object;
|
||||
@@ -55,6 +56,7 @@ export class SensorListComponent implements OnChanges {
|
||||
return targetNode;
|
||||
}
|
||||
|
||||
|
||||
// generateTargetFilter() {
|
||||
// if (this.targetOptions) {
|
||||
// return;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||
selector: 'of-sensor-setting',
|
||||
templateUrl: './setting.component.html',
|
||||
})
|
||||
export class SettingComponent {
|
||||
export class SensorSettingComponent {
|
||||
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -1 +1 @@
|
||||
<of-sensor-list [page]="page$ | async"></of-sensor-list>
|
||||
<of-sensor-list [page]="page$ | async" (addSensor)="addSensor.emit($event)"></of-sensor-list>
|
||||
@@ -8,6 +8,7 @@ import { AuthSelector } from '../../member/store';
|
||||
import { Domain } from '@overflow/commons-typescript/model/domain';
|
||||
import { PageParams } from '@overflow/commons-typescript/model/commons/PageParams';
|
||||
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
||||
import { Target } from '@overflow/commons-typescript/model/target';
|
||||
|
||||
@Component({
|
||||
selector: 'of-sensor-list-container',
|
||||
@@ -17,6 +18,7 @@ export class SensorListContainerComponent implements OnInit {
|
||||
|
||||
page$: Observable<Page<Sensor>>;
|
||||
@Output() select = new EventEmitter<Sensor>();
|
||||
@Output() addSensor = new EventEmitter();
|
||||
|
||||
constructor(private store: Store<SensorEntityStore.State>) {
|
||||
this.page$ = store.pipe(select(SensorPageSelector));
|
||||
@@ -38,4 +40,5 @@ export class SensorListContainerComponent implements OnInit {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<div>SENSOR_ADD_CONTAINER</div>
|
||||
<of-sensor-setting></of-sensor-setting>
|
||||
Reference in New Issue
Block a user