some pages added.

This commit is contained in:
insanity 2018-04-06 21:40:59 +09:00
parent 35f82466a0
commit d33dafbdd2
39 changed files with 490 additions and 30 deletions

View File

@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
import { trigger, state, style, transition, animate } from '@angular/animations';
import { MenuItem } from 'primeng/primeng';
import { AppComponent } from 'app/app.component';
import { PagesComponent } from '../../../../pages/pages.component';
import { PagesComponent } from 'app/pages/pages.component';
@Component({
/* tslint:disable:component-selector */

View File

@ -1,6 +1,6 @@
import {Component, trigger, state, transition, style, animate} from '@angular/core';
import {AppComponent} from 'app/app.component';
import { PagesComponent } from '../../../../pages/pages.component';
import { PagesComponent } from 'app/pages/pages.component';
@Component({
selector: 'of-inline-profile',

View File

@ -1,7 +1,7 @@
import {Component, ViewChild, AfterViewInit} from '@angular/core';
import {AppComponent} from 'app/app.component';
import {ScrollPanel} from 'primeng/primeng';
import { PagesComponent } from '../../../../pages/pages.component';
import { PagesComponent } from 'app/pages/pages.component';
@Component({
selector: 'of-rightpanel',

View File

@ -0,0 +1,4 @@
<p-tabView (onChange)="handleChange($event)">
<p-tabPanel [header]="tab.label" *ngFor="let tab of tabs; let i = index" [selected]="i == 0" [leftIcon]="tab.icon">
</p-tabPanel>
</p-tabView>

View File

@ -0,0 +1,22 @@
import { Component, AfterViewInit, Input } from '@angular/core';
import { Router } from '@angular/router';
import { Language } from 'angular-l10n';
@Component({
selector: 'of-tabbar',
templateUrl: './app.tabbar.component.html',
})
export class TabbarComponent implements AfterViewInit {
@Input() tabs: any;
constructor(public router: Router) { }
ngAfterViewInit() {
}
handleChange(event) {
const path: string = this.tabs[event.index].path;
if (path.length === 0) { return; }
this.router.navigate([path]);
}
}

View File

@ -3,7 +3,6 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-pages-auth-reset-password',
templateUrl: './reset-password-page.component.html',
styleUrls: ['./reset-password-page.component.scss']
})
export class ResetPasswordPageComponent implements OnInit {

View File

@ -1,9 +0,0 @@
.signin-form {
min-width: 150px;
max-width: 500px;
width: 100%;
}
.signin-full-width {
width: 100%;
}

View File

@ -6,7 +6,6 @@ import { Form, FormBuilder, FormGroup, FormGroupDirective, FormControl, NgForm,
@Component({
selector: 'of-pages-auth-signin',
templateUrl: './signin-page.component.html',
styleUrls: ['./signin-page.component.scss'],
})
export class SigninPageComponent implements OnInit {

View File

@ -1,9 +0,0 @@
.signup-form {
min-width: 150px;
max-width: 500px;
width: 100%;
}
.signup-full-width {
width: 100%;
}

View File

@ -5,7 +5,6 @@ import { Form, FormBuilder, FormGroup, FormGroupDirective, FormControl, NgForm,
@Component({
selector: 'of-pages-auth-signup',
templateUrl: './signup-page.component.html',
styleUrls: ['./signup-page.component.scss']
})
export class SignupPageComponent implements OnInit {

View File

@ -3,7 +3,6 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-pages-home',
templateUrl: './home-page.component.html',
styleUrls: ['./home-page.component.scss']
})
export class HomePageComponent implements OnInit {

View File

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { InfraPageComponent } from './infra-page.component';
const routes: Routes = [
{
path: '',
component: InfraPageComponent,
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class InfraPageRoutingModule { }

View File

@ -0,0 +1,2 @@
<!-- <of-infra-map></of-infra-map> -->
<div>infra page</div>

View File

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

View File

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-infra-page',
templateUrl: './infra-page.component.html',
})
export class InfraPageComponent implements OnInit {
constructor(
) { }
ngOnInit() {
}
}

View File

@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { InfraPageRoutingModule } from './infra-page-routing.module';
// import { InfraModule } from 'packages/infra/infra.module';
import { InfraPageComponent } from './infra-page.component';
// import { DiscoveryModule } from 'packages/discovery/discovery.module';
@NgModule({
imports: [
CommonModule,
InfraPageRoutingModule,
// InfraModule,
// DiscoveryModule
],
declarations: [
InfraPageComponent,
],
})
export class InfraPageModule { }

View File

@ -9,12 +9,12 @@ const routes: Routes = [
children: [
{ path: '', redirectTo: 'home' },
{ path: 'home', loadChildren: './home/home-page.module#HomePageModule' },
// { path: 'probes', loadChildren: './probes/probes-page.module#ProbesPageModule' },
// { path: 'probe', loadChildren: './probe/probe-page.module#ProbePageModule' },
// { path: 'sensors', loadChildren: './sensors/sensors-page.module#SensorsPageModule' },
// { path: 'sensor', loadChildren: './sensor/sensor-page.module#SensorPageModule' },
{ path: 'probes', loadChildren: './probes/probes-page.module#ProbesPageModule' },
{ path: 'probe', loadChildren: './probe/probe-page.module#ProbePageModule' },
{ path: 'sensors', loadChildren: './sensors/sensors-page.module#SensorsPageModule' },
{ path: 'sensor', loadChildren: './sensor/sensor-page.module#SensorPageModule' },
// { path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' },
// { path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' },
{ path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' },
// { path: 'sensor-setting', loadChildren: './sensor-setting/sensor-setting-page.module#SensorSettingPageModule' },
// { path: 'target', loadChildren: './target/target-page.module#TargetPageModule' },
// { path: 'overview', loadChildren: './overview/overview-page.module#OverviewPageModule' },

View File

@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ProbePageComponent } from './probe-page.component';
// import { DetailComponent as ProbeDetailComponent } from 'packages/probe/component/detail/detail.component';
// import { ListComponent as TargetListComponent } from 'packages/target/component/list/list.component';
const routes: Routes = [
{
path: '',
component: ProbePageComponent,
children: [
// { path: ':id', component: ProbeDetailComponent },
// { path: ':id/targets', loadChildren: 'app/pages/targets/targets-page.module#TargetsPageModule'},
// { path: ':id/history', component: null },
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ProbePageRoutingModule { }

View File

@ -0,0 +1,7 @@
<div>
<!-- <of-sub-menubar [tabs]="tabs"></of-sub-menubar> -->
<of-tabbar [tabs]="tabs"></of-tabbar>
<div style="padding: 15px">
<router-outlet></router-outlet>
</div>
</div>

View File

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

View File

@ -0,0 +1,26 @@
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
@Component({
selector: 'of-pages-probe',
templateUrl: './probe-page.component.html',
})
export class ProbePageComponent implements OnInit {
tabs = undefined;
constructor(private route: ActivatedRoute, private router: Router) {
}
ngOnInit() {
// const id = this.router.url.split('probe/')[1].split('/')[0];
const id = '1';
this.tabs = [
{ label: 'Info', path: '/probe/' + id, icon: 'fa-check' },
{ label: 'Targets', path: '/probe/' + id + '/targets', icon: 'fa-check' },
{ label: 'History', path: '/probe/' + id + '/history', icon: 'fa-check' },
];
}
}

View File

@ -0,0 +1,22 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { ProbeModule } from 'packages/probe/probe.module';
import { ProbePageComponent } from './probe-page.component';
import { ProbePageRoutingModule } from './probe-page-routing.module';
import { TabbarComponent } from 'app/commons/component/layout/tabbar/app.tabbar.component';
import { PrimeNGModules } from 'packages/commons/prime-ng/prime-ng.module';
@NgModule({
imports: [
CommonModule,
ProbePageRoutingModule,
PrimeNGModules
// ProbeModule,
],
declarations: [
ProbePageComponent,
TabbarComponent
]
})
export class ProbePageModule { }

View File

@ -0,0 +1,25 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ProbesPageComponent } from './probes-page.component';
// import { ListComponent as ProbeListComponent } from 'packages/probe/component/list/list.component';
// import { ListComponent as NoauthListComponent } from 'packages/noauth/component/list/list.component';
// import { DownloadComponent } from 'packages/probe/component/download/download.component';
// import { DetailComponent as ProbeDetailComponent } from 'packages/probe/component/detail/detail.component';
const routes: Routes = [
{
path: '',
component: ProbesPageComponent,
children: [
// { path: '', component: ProbeListComponent },
// { path: 'noauth', component: NoauthListComponent },
// { path: 'download', component: DownloadComponent },
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ProbesPageRoutingModule { }

View File

@ -0,0 +1,9 @@
<!-- <div>
<of-sub-menubar [tabs]="tabs"></of-sub-menubar>
<div style="padding: 15px">
</div>
</div>
-->
probe detail
<router-outlet></router-outlet>

View File

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

View File

@ -0,0 +1,17 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-pages-probes',
templateUrl: './probes-page.component.html',
})
export class ProbesPageComponent {
tabs = [
{ label: 'Probe', path: '/probes' },
{ label: 'Unauthorized', path: '/probes/noauth' },
{ label: 'Download', path: '/probes/download' },
];
constructor() { }
}

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { ProbeModule } from 'packages/probe/probe.module';
// import { NoauthModule } from 'packages/noauth/noauth.module';
import { ProbesPageComponent } from './probes-page.component';
import { ProbesPageRoutingModule } from './probes-page-routing.module';
@NgModule({
imports: [
CommonModule,
ProbesPageRoutingModule,
// ProbeModule,
// NoauthModule,
],
declarations: [
ProbesPageComponent,
]
})
export class ProbesPageModule { }

View File

@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SensorPageComponent } from './sensor-page.component';
// import { DetailComponent } from 'packages/sensor/component/detail/detail.component';
const routes: Routes = [
{
path: '',
component: SensorPageComponent,
children: [
// { path: ':id', component: DetailComponent },
// { path: ':id/history', component: null },
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SensorPageRoutingModule { }

View File

@ -0,0 +1,6 @@
<div>
<of-sub-menubar [tabs]="tabs"></of-sub-menubar>
<div style="padding: 15px">
<router-outlet></router-outlet>
</div>
</div>

View File

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

View File

@ -0,0 +1,24 @@
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
@Component({
selector: 'of-pages-sensor',
templateUrl: './sensor-page.component.html',
})
export class SensorPageComponent implements OnInit {
tabs = undefined;
constructor(private route: ActivatedRoute, private router: Router) {
}
ngOnInit() {
const id = this.router.url.split('sensor/')[1].split('/')[0];
this.tabs = [
{ label: 'Info', path: '/sensor/' + id },
{ label: 'History', path: '/sensor/' + id + '/history' },
];
}
}

View File

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { SensorModule } from 'packages/sensor/sensor.module';
import { SensorPageRoutingModule } from './sensor-page-routing.module';
import { SensorPageComponent } from './sensor-page.component';
@NgModule({
imports: [
CommonModule,
SensorPageRoutingModule,
// SensorModule,
],
declarations: [
SensorPageComponent,
]
})
export class SensorPageModule { }

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SensorsPageComponent } from './sensors-page.component';
const routes: Routes = [
{
path: '',
component: SensorsPageComponent,
children: [
// { path: '', component: SensorListComponent },
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SensorsPageRoutingModule { }

View File

@ -0,0 +1,3 @@
<div style="padding: 15px">
<of-sensor-list></of-sensor-list>
</div>

View File

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

View File

@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-pages-sensors',
templateUrl: './sensors-page.component.html',
})
export class SensorsPageComponent implements OnInit {
tabs = [
{ label: 'Overview', path: '/sensors' },
{ label: 'History', path: '/sensors/history' },
{ label: 'Settings', path: '/sensors/setting' },
];
constructor() { }
ngOnInit() {
}
}

View File

@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { SensorModule } from 'packages/sensor/sensor.module';
import { SensorsPageComponent } from './sensors-page.component';
import { SensorsPageRoutingModule } from './sensors-page-routing.module';
@NgModule({
imports: [
CommonModule,
SensorsPageRoutingModule,
// SensorModule
],
declarations: [
SensorsPageComponent
]
})
export class SensorsPageModule { }