ing
This commit is contained in:
parent
b5b874afe1
commit
a415181e26
|
@ -61,9 +61,9 @@ export class DiscoveryComponent implements OnDestroy {
|
|||
// TODO: fix
|
||||
const zone: Zone = {
|
||||
network: '192.168.1.0/24',
|
||||
ipv4: '192.168.1.101',
|
||||
ipv4: '192.168.1.103',
|
||||
iface: 'enp3s0',
|
||||
mac: '44:8a:5b:f1:f1:f3',
|
||||
mac: '44:8a:5b:44:8c:e8',
|
||||
hosts: null,
|
||||
};
|
||||
this.discoveryService.discoverHost(this.selectedProbe.probe.probeKey, zone, dz.discoverHost);
|
||||
|
|
|
@ -6,7 +6,7 @@ const routes: Routes = [
|
|||
{ path: '', loadChildren: './pages/pages.module#PagesModule', canActivate: [AuthGuard] },
|
||||
{ path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' },
|
||||
{ path: 'error', loadChildren: './pages/error/error-page.module#ErrorPageModule' },
|
||||
{ path: '**', redirectTo: 'error' },
|
||||
// { path: '**', redirectTo: 'error' },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -13,6 +13,7 @@ const routes: Routes = [
|
|||
{ path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' },
|
||||
{ path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' },
|
||||
{ path: 'sensor', loadChildren: './sensors/sensor-tab-page.module#SensorTabPageModule' },
|
||||
{ path: 'target', loadChildren: './target/target-page.module#TargetPageModule'},
|
||||
// { path: 'target', loadChildren: './target/target-page.module#TargetPageModule' },
|
||||
// { path: 'overview', loadChildren: './overview/overview-page.module#OverviewPageModule' },
|
||||
// { path: 'dashboard', loadChildren: './dashboard/dashboard-page.module#DashboardPageModule' },
|
||||
|
|
|
@ -16,7 +16,6 @@ const routes: Routes = [
|
|||
{ path: 'download', component: ProbeDownloadPageComponent },
|
||||
{ path: 'download/:idx', component: ProbeDownloadPageComponent },
|
||||
{ path: ':id/info', component: ProbeDetailPageComponent },
|
||||
// { path: ':id/targets', loadChildren: 'app/pages/targets/targets-page.module#TargetsPageModule'},
|
||||
{ path: ':id/history', component: null },
|
||||
]
|
||||
},
|
||||
|
|
|
@ -41,7 +41,8 @@ export class ProbeTabPageComponent implements OnDestroy {
|
|||
default:
|
||||
this.tabs = [
|
||||
{ label: 'INFO', routerLink: ['/probe/', parsedUrl, 'info'] },
|
||||
{ label: 'TARGETS', path: ['/probe/', parsedUrl, 'targets'], disabled: true },
|
||||
// { label: 'TARGETS', path: ['/probe/', parsedUrl, 'target'] },
|
||||
{ label: 'TARGETS', routerLink: ['/target/list'], queryParams: {probe: parsedUrl}},
|
||||
{ label: 'HISTORY', path: ['/probe/', parsedUrl, 'history'], disabled: true },
|
||||
];
|
||||
break;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
|
||||
import { Target } from '@overflow/commons-typescript/model/target';
|
||||
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { Component } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
|
||||
import { Target } from '@overflow/commons-typescript/model/target';
|
||||
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';
|
||||
|
||||
@Component({
|
||||
|
|
9
src/app/pages/target/target-detail-page.component.html
Normal file
9
src/app/pages/target/target-detail-page.component.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div class="ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<div class="card no-margin">
|
||||
<of-discovery [probeHostID]="probeHostID"></of-discovery>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
src/app/pages/target/target-detail-page.component.ts
Normal file
18
src/app/pages/target/target-detail-page.component.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'of-target-detail-page',
|
||||
templateUrl: './target-detail-page.component.html',
|
||||
})
|
||||
export class TargetDetailPageComponent implements OnInit {
|
||||
|
||||
probeHostID: number;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
9
src/app/pages/target/target-list-page.component.html
Normal file
9
src/app/pages/target/target-list-page.component.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div class="ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<div class="card no-margin">
|
||||
sdjklfhjsklfjhlksdjfklsdhfjoliwejiolf
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
19
src/app/pages/target/target-list-page.component.ts
Normal file
19
src/app/pages/target/target-list-page.component.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'of-target-list-page',
|
||||
templateUrl: './target-list-page.component.html',
|
||||
})
|
||||
export class TargetListPageComponent implements OnInit {
|
||||
|
||||
probeHostID: number;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,14 +1,17 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { TargetPageComponent } from './target-page.component';
|
||||
import { DetailComponent as TargetDetailComponent } from '@overflow/target/component/detail/detail.component';
|
||||
import { TargetListPageComponent } from './target-list-page.component';
|
||||
import { TargetDetailPageComponent } from './target-detail-page.component';
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TargetPageComponent,
|
||||
children: [
|
||||
{ path: ':id/info', component: TargetDetailComponent }
|
||||
{ path: 'list', component: TargetListPageComponent },
|
||||
{ path: 'detail', component: TargetDetailPageComponent }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<!--<div class="card no-margin">-->
|
||||
<!--<of-tabbar [tabs]="tabs"></of-tabbar>-->
|
||||
<!--</div>-->
|
||||
<div class="card no-margin">
|
||||
<of-tabbar [tabs]="tabs"></of-tabbar>
|
||||
</div>
|
||||
<div class="card no-margin">
|
||||
sdfsdf
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,19 +7,19 @@ import { Router } from '@angular/router';
|
|||
})
|
||||
export class TargetPageComponent implements OnInit {
|
||||
|
||||
tabs = undefined;
|
||||
// tabs = undefined;
|
||||
|
||||
constructor(private router: Router) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const id = this.router.url.split('target/')[1].split('/')[0];
|
||||
|
||||
this.tabs = [
|
||||
{ label: 'INFO', routerLink: ['/target/', id, 'info'] },
|
||||
{ label: 'HISTORY', path: ['/target/', id, 'history'], disabled: true },
|
||||
];
|
||||
// const id = this.router.url.split('target/')[1].split('/')[0];
|
||||
//
|
||||
// this.tabs = [
|
||||
// { label: 'INFO', routerLink: ['/target/', id, 'info'] },
|
||||
// { label: 'HISTORY', path: ['/target/', id, 'history'], disabled: true },
|
||||
// ];
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ import { CommonModule } from '@angular/common';
|
|||
import { UIModule } from '@overflow/shared/ui/ui.module';
|
||||
import { TargetModule } from '@overflow/target/target.module';
|
||||
|
||||
import { TargetListPageComponent } from './target-list-page.component';
|
||||
import { TargetDetailPageComponent } from './target-detail-page.component';
|
||||
import { TargetPageRoutingModule } from './target-page-routing.module';
|
||||
import { TargetPageComponent } from './target-page.component';
|
||||
import { TabbarModule } from '../../commons/component/layout/tabbar/app.tabbar.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -14,10 +14,11 @@ import { TabbarModule } from '../../commons/component/layout/tabbar/app.tabbar.m
|
|||
UIModule,
|
||||
TargetPageRoutingModule,
|
||||
TargetModule,
|
||||
TabbarModule
|
||||
// TabbarModule
|
||||
],
|
||||
declarations: [
|
||||
TargetPageComponent
|
||||
TargetListPageComponent,
|
||||
TargetDetailPageComponent,
|
||||
]
|
||||
})
|
||||
export class TargetPageModule { }
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { TargetsPageComponent } from './targets-page.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TargetsPageComponent,
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class TargetsPageRoutingModule { }
|
|
@ -1,7 +0,0 @@
|
|||
<div class="ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<of-target-list></of-target-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,25 +0,0 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TargetsPageComponent } from './targets-page.component';
|
||||
|
||||
describe('TargetsComponent', () => {
|
||||
let component: TargetsPageComponent;
|
||||
let fixture: ComponentFixture<TargetsPageComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TargetsPageComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TargetsPageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,14 +0,0 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-pages-targets',
|
||||
templateUrl: './targets-page.component.html',
|
||||
})
|
||||
export class TargetsPageComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { UIModule } from '@overflow/shared/ui/ui.module';
|
||||
import { TargetModule } from '@overflow/target/target.module';
|
||||
|
||||
import { TargetsPageRoutingModule } from './targets-page-routing.module';
|
||||
import { TargetsPageComponent } from './targets-page.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
UIModule,
|
||||
TargetsPageRoutingModule,
|
||||
TargetModule,
|
||||
],
|
||||
declarations: [
|
||||
TargetsPageComponent
|
||||
]
|
||||
})
|
||||
export class TargetsPageModule { }
|
Loading…
Reference in New Issue
Block a user