probe menu
This commit is contained in:
parent
abd35226bd
commit
ef3e6a2e27
|
@ -4,12 +4,15 @@ import { SidebarComponent } from './sidebar/sidebar.component';
|
||||||
import { HeaderComponent } from './header/header.component';
|
import { HeaderComponent } from './header/header.component';
|
||||||
import { FooterComponent } from './footer/footer.component';
|
import { FooterComponent } from './footer/footer.component';
|
||||||
import { MenuItemComponent } from './menu-item/menu-item.component';
|
import { MenuItemComponent } from './menu-item/menu-item.component';
|
||||||
|
import { SubMenubarComponent } from './sub-menubar/sub-menubar.component';
|
||||||
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule
|
CommonModule,
|
||||||
|
FlexLayoutModule,
|
||||||
],
|
],
|
||||||
declarations: [SidebarComponent, HeaderComponent, FooterComponent, MenuItemComponent]
|
declarations: [SidebarComponent, HeaderComponent, FooterComponent, MenuItemComponent, SubMenubarComponent]
|
||||||
})
|
})
|
||||||
export class LayoutsModule { }
|
export class LayoutsModule { }
|
||||||
|
|
|
@ -51,7 +51,7 @@ export const menus = [
|
||||||
'name': 'Dashboards',
|
'name': 'Dashboards',
|
||||||
'link': '',
|
'link': '',
|
||||||
'icon': 'indeterminate_check_box',
|
'icon': 'indeterminate_check_box',
|
||||||
'chip': false,
|
'chip': { 'value': 3, 'color': 'accent'},
|
||||||
'open': false,
|
'open': false,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<nav mat-tab-nav-bar>
|
||||||
|
<a mat-tab-link *ngFor="let tab of tabs" [routerLink]="tab.path" routerLinkActive #rla="routerLinkActive" [routerLinkActiveOptions]="{exact: true}"
|
||||||
|
[active]="rla.isActive">
|
||||||
|
{{ tab.label }}
|
||||||
|
</a>
|
||||||
|
</nav>
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { SubMenubarComponent } from './sub-menubar.component';
|
||||||
|
|
||||||
|
describe('SubMenubarComponent', () => {
|
||||||
|
let component: SubMenubarComponent;
|
||||||
|
let fixture: ComponentFixture<SubMenubarComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ SubMenubarComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(SubMenubarComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
23
src/app/commons/layouts/sub-menubar/sub-menubar.component.ts
Normal file
23
src/app/commons/layouts/sub-menubar/sub-menubar.component.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'of-sub-menubar',
|
||||||
|
templateUrl: './sub-menubar.component.html',
|
||||||
|
styleUrls: ['./sub-menubar.component.scss']
|
||||||
|
})
|
||||||
|
export class SubMenubarComponent implements OnInit {
|
||||||
|
|
||||||
|
tabs = [
|
||||||
|
{label: 'Probe', path: '/probes'},
|
||||||
|
{label: 'Unauthorized', path: '/probes/noauth'},
|
||||||
|
{label: 'Download', path: '/probes/download'},
|
||||||
|
];
|
||||||
|
|
||||||
|
constructor(public router: Router) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
<p>
|
||||||
|
list works!
|
||||||
|
</p>
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ListComponent } from './list.component';
|
||||||
|
|
||||||
|
describe('ListComponent', () => {
|
||||||
|
let component: ListComponent;
|
||||||
|
let fixture: ComponentFixture<ListComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ListComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ListComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/packages/noauth/components/list/list.component.ts
Normal file
15
src/app/packages/noauth/components/list/list.component.ts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'of-noauth-list',
|
||||||
|
templateUrl: './list.component.html',
|
||||||
|
styleUrls: ['./list.component.scss']
|
||||||
|
})
|
||||||
|
export class ListComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
13
src/app/packages/noauth/noauth.module.ts
Normal file
13
src/app/packages/noauth/noauth.module.ts
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { ListComponent } from 'app/packages/noauth/components/list/list.component';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
ListComponent
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class NoauthModule { }
|
|
@ -0,0 +1,3 @@
|
||||||
|
<p>
|
||||||
|
download works!
|
||||||
|
</p>
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { DownloadComponent } from './download.component';
|
||||||
|
|
||||||
|
describe('DownloadComponent', () => {
|
||||||
|
let component: DownloadComponent;
|
||||||
|
let fixture: ComponentFixture<DownloadComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ DownloadComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(DownloadComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'of-download',
|
||||||
|
templateUrl: './download.component.html',
|
||||||
|
styleUrls: ['./download.component.scss']
|
||||||
|
})
|
||||||
|
export class DownloadComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
<p>
|
||||||
|
list works!
|
||||||
|
</p>
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ListComponent } from './list.component';
|
||||||
|
|
||||||
|
describe('ListComponent', () => {
|
||||||
|
let component: ListComponent;
|
||||||
|
let fixture: ComponentFixture<ListComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ListComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ListComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/packages/probe/components/list/list.component.ts
Normal file
15
src/app/packages/probe/components/list/list.component.ts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'of-probe-list',
|
||||||
|
templateUrl: './list.component.html',
|
||||||
|
styleUrls: ['./list.component.scss']
|
||||||
|
})
|
||||||
|
export class ListComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
15
src/app/packages/probe/probe.module.ts
Normal file
15
src/app/packages/probe/probe.module.ts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { ListComponent } from 'app/packages/probe/components/list/list.component';
|
||||||
|
import { DownloadComponent } from 'app/packages/probe/components/download/download.component';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
ListComponent,
|
||||||
|
DownloadComponent
|
||||||
|
],
|
||||||
|
})
|
||||||
|
export class ProbeModule { }
|
|
@ -1,11 +1,19 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
import { ProbesPageComponent } from './probes-page.component';
|
import { ProbesPageComponent } from './probes-page.component';
|
||||||
|
import { ListComponent as ProbeListComponent } from 'app/packages/probe/components/list/list.component';
|
||||||
|
import { ListComponent as NoauthListComponent } from 'app/packages/noauth/components/list/list.component';
|
||||||
|
import { DownloadComponent } from 'app/packages/probe/components/download/download.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: ProbesPageComponent,
|
component: ProbesPageComponent,
|
||||||
|
children: [
|
||||||
|
{ path: '', component: ProbeListComponent },
|
||||||
|
{ path: 'noauth', component: NoauthListComponent },
|
||||||
|
{ path: 'download', component: DownloadComponent },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
<p>
|
<div>
|
||||||
probes works!
|
<of-sub-menubar></of-sub-menubar>
|
||||||
</p>
|
<router-outlet></router-outlet>
|
||||||
|
</div>
|
|
@ -2,12 +2,22 @@ import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ProbesPageComponent } from './probes-page.component';
|
import { ProbesPageComponent } from './probes-page.component';
|
||||||
import { ProbesPageRoutingModule } from './probes-page-routing.module';
|
import { ProbesPageRoutingModule } from './probes-page-routing.module';
|
||||||
|
import { SubMenubarComponent } from 'app/commons/layouts/sub-menubar/sub-menubar.component';
|
||||||
|
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||||
|
import { ProbeModule } from 'app/packages/probe/probe.module';
|
||||||
|
import { NoauthModule } from 'app/packages/noauth/noauth.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
ProbesPageRoutingModule,
|
ProbesPageRoutingModule,
|
||||||
|
MaterialModule,
|
||||||
|
ProbeModule,
|
||||||
|
NoauthModule,
|
||||||
],
|
],
|
||||||
declarations: [ProbesPageComponent]
|
declarations: [
|
||||||
|
ProbesPageComponent,
|
||||||
|
SubMenubarComponent
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class ProbesPageModule {}
|
export class ProbesPageModule { }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user