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

@ -11,6 +11,29 @@
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
<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-header>
<mat-card-content>
<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>
</div>
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="center">
<mat-card class="example-card"> <mat-card class="example-card">
<mat-card-header> <mat-card-header>
<mat-card-title>Step 2</mat-card-title> <mat-card-title>Step 2</mat-card-title>
@ -26,20 +49,6 @@
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div>
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="center">
<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-header>
<mat-card-content>
인증정보 입력 창
</mat-card-content>
</mat-card>
<mat-card class="example-card"> <mat-card class="example-card">
<mat-card-header> <mat-card-header>
<mat-card-title>Step 4</mat-card-title> <mat-card-title>Step 4</mat-card-title>

View File

@ -19,3 +19,13 @@
.example-selected-value { .example-selected-value {
margin: 15px 0; 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 { MaterialModule } from 'app/commons/ui/material/material.module';
import { SettingComponent } from 'app/packages/sensor/component/setting/setting.component'; import { SettingComponent } from 'app/packages/sensor/component/setting/setting.component';
import { SettingResultComponent } from 'app/packages/sensor/component/setting-result/setting-result.component';
@NgModule({ @NgModule({
@ -10,9 +11,13 @@ import { SettingComponent } from 'app/packages/sensor/component/setting/setting.
CommonModule, CommonModule,
MaterialModule MaterialModule
], ],
declarations: [SettingComponent], declarations: [
SettingComponent,
SettingResultComponent,
],
exports: [ exports: [
SettingComponent SettingComponent,
SettingResultComponent
] ]
}) })
export class SensorModule { } export class SensorModule { }

View File

@ -1 +1,17 @@
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="center">
<div *ngIf="step == 1">
<of-sensor-setting></of-sensor-setting> <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() { } constructor() { }
step = 1;
ngOnInit() { ngOnInit() {
} }
onNext() {
this.step = 2;
// this.router.navigate(['step2']);
}
onCloseCancel() {
// this.dialogRef.close('Cancel');
}
} }