probe error fix
This commit is contained in:
parent
3ac55a528e
commit
e357030fe8
|
@ -5,9 +5,9 @@
|
|||
|
||||
export const environment = {
|
||||
production: false,
|
||||
restBaseURL: 'http://192.168.1.50:19080/webapp',
|
||||
restBaseURL: 'http://192.168.1.103:19080/webapp',
|
||||
webappRPCConfig: {
|
||||
url: 'ws://192.168.1.50:19090/webapp',
|
||||
url: 'ws://192.168.1.103:19090/webapp',
|
||||
reconnectInterval: 5000,
|
||||
reconnectRetry: 10,
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div *ngIf="host">
|
||||
<b>{{ host.ip }}</b>
|
||||
<b>{{ host.mac }}</b>
|
||||
<b>{{ host.os.vendor.name }}</b>
|
||||
<of-key-value [key]="'IP'" [value]="host.ipv4"></of-key-value>
|
||||
<of-key-value [key]="'Mac'" [value]="host.mac"></of-key-value>
|
||||
<of-key-value [key]="'OS'" [value]="host.os.vendor.name"></of-key-value>
|
||||
</div>
|
|
@ -61,7 +61,7 @@
|
|||
<p-contextMenu #cmService [model]="contextMenuService"></p-contextMenu>
|
||||
<p-contextMenu #cmSensor [model]="contextMenuSensor"></p-contextMenu>
|
||||
|
||||
<p-sidebar [(visible)]="visibleSidebar" position="bottom" [baseZIndex]="10000" *ngIf="selectedNode">
|
||||
<p-sidebar [(visible)]="visibleSidebar" position="bottom" [baseZIndex]="10000" *ngIf="selectedNode" styleClass="ui-sidebar-md">
|
||||
<div *ngIf="selectedNode.type === 'probe'">
|
||||
<of-probe-summary [probe]="targetNodeForView" [visible]="visibleSidebar"></of-probe-summary>
|
||||
</div>
|
||||
|
@ -73,6 +73,10 @@
|
|||
</div>
|
||||
</p-sidebar>
|
||||
|
||||
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="true" [closeOnEscape]="false">
|
||||
<of-sensor-setting [visible]="sensorSettingDisplay" [preTarget]="targetNodeForView" (close)="onSensorSettingClose()"></of-sensor-setting>
|
||||
</p-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
selectedNode: TreeNode = null;
|
||||
targetNodeForView: Object = null;
|
||||
|
||||
sensorSettingDisplay = false;
|
||||
|
||||
constructor(private router: Router,
|
||||
private listStore: Store<ListStore.State>,
|
||||
private sensorListStore: Store<SensorListStore.State>
|
||||
|
@ -80,7 +82,7 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
|
||||
const pageParams: PageParams = {
|
||||
pageNo: '0',
|
||||
countPerPage: '10',
|
||||
countPerPage: '99999',
|
||||
sortCol: 'id',
|
||||
sortDirection: 'descending'
|
||||
};
|
||||
|
@ -91,8 +93,9 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
console.log(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.infras$.subscribe(
|
||||
(page: Page) => {
|
||||
console.log(page);
|
||||
|
@ -118,34 +121,34 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
console.log(error.response.message);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initContextMenu();
|
||||
}
|
||||
|
||||
initContextMenu() {
|
||||
this.contextMenuProbe = [
|
||||
{ label: 'Probe Menu', command: (event) => this.closeContextMenu() },
|
||||
{ label: 'View info', icon: 'fa-plus', command: (event) => this.viewInfo() }
|
||||
{ label: 'View this Probe', icon: 'fa-plus', command: (event) => this.viewInfo() },
|
||||
{ label: 'Discovery', icon: 'fa-plus', command: (event) => this.discovery() },
|
||||
{ label: 'Edit Alias', icon: 'fa-plus', command: (event) => this.editProbeAlias() },
|
||||
];
|
||||
this.contextMenuHost = [
|
||||
{ label: 'Host Menu', command: (event) => this.closeContextMenu() },
|
||||
{ label: 'View this Host', icon: 'fa-plus', command: (event) => this.viewInfo() },
|
||||
{ label: 'Add sensor', icon: 'fa-plus', command: (event) => this.addSensor() },
|
||||
{ label: 'Traceroute', icon: 'fa-plus' },
|
||||
{ label: 'ARP Test', icon: 'fa-plus' },
|
||||
{ label: 'Ping Test', icon: 'fa-plus' },
|
||||
{ label: 'Add sensor', icon: 'fa-plus', command: (event) => this.addSensorWithTarget() },
|
||||
{ label: 'Traceroute', icon: 'fa-plus', command: (event) => this.testTraceroute() },
|
||||
{ label: 'ARP Test', icon: 'fa-plus', command: (event) => this.testARP() },
|
||||
{ label: 'Ping Test', icon: 'fa-plus', command: (event) => this.testPing() },
|
||||
];
|
||||
this.contextMenuService = [
|
||||
{ label: 'Service Menu', command: (event) => this.closeContextMenu() },
|
||||
{ label: 'View this Service', icon: 'fa-plus', command: (event) => this.viewInfo() },
|
||||
{ label: 'Add sensor', icon: 'fa-plus', command: (event) => this.addSensor() },
|
||||
{ label: 'Add sensor', icon: 'fa-plus', command: (event) => this.addSensorWithTarget() },
|
||||
];
|
||||
this.contextMenuSensor = [
|
||||
{ label: 'Sensor Menu', command: (event) => this.closeContextMenu() },
|
||||
{ label: 'Edit', icon: 'fa-plus', command: (event) => this.viewInfo() },
|
||||
{ label: 'Remove', icon: 'fa-plus', command: (event) => this.addSensor() },
|
||||
{ label: 'View this Sensor', icon: 'fa-plus', command: (event) => this.viewInfo() },
|
||||
{ label: 'Edit', icon: 'fa-plus', command: (event) => this.editSensor() },
|
||||
{ label: 'Remove', icon: 'fa-plus', command: (event) => this.removeSensor() },
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -430,6 +433,7 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
if (nodeType === 'probe') {
|
||||
this.router.navigate(['probe', event.node.obj.id, 'info']);
|
||||
} else if (nodeType === 'host') {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -463,8 +467,33 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
return false;
|
||||
}
|
||||
|
||||
addSensor() {
|
||||
alert('으악 내일 할래');
|
||||
testTraceroute() {
|
||||
}
|
||||
|
||||
testARP() {
|
||||
}
|
||||
|
||||
testPing() {
|
||||
}
|
||||
|
||||
editProbeAlias() {
|
||||
}
|
||||
|
||||
editSensor() {
|
||||
}
|
||||
|
||||
removeSensor() {
|
||||
}
|
||||
|
||||
discovery() {
|
||||
}
|
||||
|
||||
addSensorWithTarget() {
|
||||
this.sensorSettingDisplay = true;
|
||||
}
|
||||
|
||||
onSensorSettingClose() {
|
||||
this.sensorSettingDisplay = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import { FormsModule } from '@angular/forms';
|
|||
import { PrimeNGModules } from '../commons/prime-ng/prime-ng.module';
|
||||
import { DiscoveryModule } from 'packages/discovery/discovery.module';
|
||||
import { SensorModule } from '../sensor/sensor.module';
|
||||
import { KeyValueModule } from 'app/commons/component/key-value/key-value.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
@ -16,7 +17,8 @@ import { SensorModule } from '../sensor/sensor.module';
|
|||
FormsModule,
|
||||
PrimeNGModules,
|
||||
DiscoveryModule,
|
||||
SensorModule
|
||||
SensorModule,
|
||||
KeyValueModule
|
||||
],
|
||||
declarations: [
|
||||
COMPONENTS,
|
||||
|
|
|
@ -4,7 +4,8 @@ import { Infra } from './Infra';
|
|||
export interface InfraHost extends Infra {
|
||||
// id?: number;
|
||||
os?: InfraOS;
|
||||
ip?: number;
|
||||
ipv4?: number;
|
||||
ipv6?: number;
|
||||
mac?: number;
|
||||
createDate?: Date;
|
||||
}
|
||||
|
|
|
@ -12,13 +12,12 @@
|
|||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="body" let-probeHost>
|
||||
<tr [pSelectableRow]="probe">
|
||||
<tr [pSelectableRow]="probeHost">
|
||||
<td>{{probeHost.probe.displayName}}</td>
|
||||
<!-- <td>{{probeHost.host.os.vendor.name}}</td> -->
|
||||
<td>?</td>
|
||||
<td>?</td>
|
||||
<td>{{probeHost.host.ipv4}}</td>
|
||||
<td>{{probeHost.host.os.vendor.name}}</td>
|
||||
<td>{{probeHost.probe.cidr}}</td>
|
||||
<td>??</td>
|
||||
<td>반정규화 필요</td>
|
||||
<td>{{probeHost.probe.authorizeDate | date: 'dd.MM.yyyy'}}</td>
|
||||
<td>{{probeHost.probe.authorizeMember.name}}</td>
|
||||
</tr>
|
||||
|
|
|
@ -50,6 +50,6 @@ export class ListComponent implements OnInit, AfterContentInit {
|
|||
}
|
||||
|
||||
onRowSelect(event) {
|
||||
this.router.navigate(['probe', event.data.id, 'info']);
|
||||
this.router.navigate(['probe', event.data.probe.id, 'info']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user