This commit is contained in:
snoop 2018-04-26 21:33:58 +09:00
commit a2702a0216
3 changed files with 27 additions and 11 deletions

View File

@ -5,9 +5,9 @@
export const environment = {
production: false,
restBaseURL: 'http://192.168.1.103:19080/webapp',
restBaseURL: 'http://192.168.1.50:19080/webapp',
webappRPCConfig: {
url: 'ws://192.168.1.103:19090/webapp',
url: 'ws://192.168.1.50:19090/webapp',
reconnectInterval: 5000,
reconnectRetry: 10,
},

View File

@ -25,31 +25,47 @@
</div>
</div>
<div class="ui-g-12 ui-g-nopad">
<p-tree [value]="infraTree" selectionMode="single" [(selection)]="selectedTree" (onNodeSelect)="onNodeSelect($event)" [contextMenu]="cm">
<p-tree [value]="infraTree" selectionMode="single" [(selection)]="selectedTree" (onNodeSelect)="onNodeSelect($event)" [contextMenu]="cm"
[pTooltip]="desiredTooltip">
<ng-template let-node pTemplate="default">
<div>{{node.label}}</div>
</ng-template>
<ng-template let-node pTemplate="infra">
<div (contextmenu)="nodeMenu($event, node)">{{node.label}}</div>
<div (contextmenu)="nodeMenu($event, node)">
<div>{{node.label}}</div>
</div>
</ng-template>
<ng-template let-node pTemplate="probe">
<div (contextmenu)="nodeMenu($event, node)">{{node.label}}</div>
<div (contextmenu)="nodeMenu($event, node)">
<div>{{node.label}}</div>
</div>
</ng-template>
<ng-template let-node pTemplate="host">
<div (contextmenu)="nodeMenu($event, node)">{{node.label}}</div>
<div (contextmenu)="nodeMenu($event, node)">
<div>{{node.label}}</div>
<!-- <div>{{node.obj.infraType.name}}</div> -->
</div>
</ng-template>
<ng-template let-node pTemplate="service">
<div (contextmenu)="nodeMenu($event, node)">{{node.label}}</div>
<div (contextmenu)="nodeMenu($event, node)">
<div>{{node.label}}</div>
</div>
</ng-template>
<ng-template let-node pTemplate="sensor">
<div (contextmenu)="nodeMenu($event, node)">
<i class="fa ui-icon-stop ui-status-icon ui-status-success"></i>{{node.label}}</div>
<div>
<i class="fa ui-icon-stop ui-status-icon ui-status-success"></i>{{node.label}}
</div>
<div>
{{node.obj.itemCount}} SensorItems
</div>
</div>
</ng-template>
</p-tree>

View File

@ -437,10 +437,9 @@ export class MapComponent implements OnInit, AfterContentInit {
}
viewInfo() {
const temp = {
this.onNodeSelect({
node : this.selectedNode,
};
this.onNodeSelect(temp);
});
}
nodeMenu(event: MouseEvent, node: any) {
@ -483,6 +482,7 @@ export class MapComponent implements OnInit, AfterContentInit {
}
discovery() {
this.display = true;
}
addSensorWithTarget() {