fixed sensor setting

This commit is contained in:
snoop 2018-02-07 19:42:34 +09:00
parent 0d510fca85
commit f0b7e19946
9 changed files with 117 additions and 14 deletions

View File

@ -0,0 +1,11 @@
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="center">
<mat-card class="example-card">
<mat-card-content>
</mat-card-content>
</mat-card>
</div>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SettingResultComponent } from './setting-result.component';
describe('SettingResultComponent', () => {
let component: SettingResultComponent;
let fixture: ComponentFixture<SettingResultComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SettingResultComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SettingResultComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-sensor-setting-result',
templateUrl: './setting-result.component.html',
styleUrls: ['./setting-result.component.scss']
})
export class SettingResultComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -13,16 +13,20 @@
<mat-card class="example-card">
<mat-card-header>
<mat-card-title>Step 2</mat-card-title>
<mat-card-subtitle>Select Crawler</mat-card-subtitle>
<mat-card-title>Step 3</mat-card-title>
<mat-card-subtitle>Crawler Auth</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<mat-radio-group class="example-radio-group" >
<mat-radio-button class="example-radio-button" *ngFor="let season of seasons" [value]="season">
{{season}}
</mat-radio-button>
</mat-radio-group>
<div class="example-selected-value">Your favorite season is: {{favoriteSeason}}</div>
<form class="example-form">
<mat-form-field class="example-full-width">
<input matInput placeholder="Account" value="Loafe">
</mat-form-field>
<mat-form-field class="example-full-width">
<input matInput type="password" placeholder="Password" value="">
</mat-form-field>
</form>
</mat-card-content>
</mat-card>
@ -32,11 +36,16 @@
<mat-card class="example-card">
<mat-card-header>
<mat-card-title>Step 3</mat-card-title>
<mat-card-subtitle>Crawler Auth</mat-card-subtitle>
<mat-card-title>Step 2</mat-card-title>
<mat-card-subtitle>Select Crawler</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
인증정보 입력 창
<mat-radio-group class="example-radio-group">
<mat-radio-button class="example-radio-button" *ngFor="let season of seasons" [value]="season">
{{season}}
</mat-radio-button>
</mat-radio-group>
<div class="example-selected-value">Your favorite season is: {{favoriteSeason}}</div>
</mat-card-content>
</mat-card>

View File

@ -18,4 +18,14 @@
.example-selected-value {
margin: 15px 0;
}
.example-form {
min-width: 150px;
max-width: 500px;
width: 100%;
}
.example-full-width {
width: 100%;
}

View File

@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
import { MaterialModule } from 'app/commons/ui/material/material.module';
import { SettingComponent } from 'app/packages/sensor/component/setting/setting.component';
import { SettingResultComponent } from 'app/packages/sensor/component/setting-result/setting-result.component';
@NgModule({
@ -10,9 +11,13 @@ import { SettingComponent } from 'app/packages/sensor/component/setting/setting.
CommonModule,
MaterialModule
],
declarations: [SettingComponent],
declarations: [
SettingComponent,
SettingResultComponent,
],
exports: [
SettingComponent
SettingComponent,
SettingResultComponent
]
})
export class SensorModule { }

View File

@ -1 +1,17 @@
<of-sensor-setting></of-sensor-setting>
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="center">
<div *ngIf="step == 1">
<of-sensor-setting></of-sensor-setting>
</div>
<div *ngIf="step == 2">
<of-sensor-setting-result></of-sensor-setting-result>
</div>
<div fxLayout="col" fxLayoutWrap fxLayoutAlign="center">
<button mat-button (click)="onCloseCancel()">Cancel</button>
<button mat-button (click)="onNext()">Next</button>
</div>
</div>

View File

@ -9,7 +9,19 @@ export class SensorSettingPageComponent implements OnInit {
constructor() { }
step = 1;
ngOnInit() {
}
onNext() {
this.step = 2;
// this.router.navigate(['step2']);
}
onCloseCancel() {
// this.dialogRef.close('Cancel');
}
}