diff --git a/src/app/components/project-map/project-map.component.html b/src/app/components/project-map/project-map.component.html index b0f64d5e..241abc4b 100644 --- a/src/app/components/project-map/project-map.component.html +++ b/src/app/components/project-map/project-map.component.html @@ -49,7 +49,7 @@ - + @@ -57,6 +57,9 @@ Show interface labels + + Show topology summary + @@ -120,4 +123,6 @@ - +
+ +
diff --git a/src/app/components/project-map/project-map.component.scss b/src/app/components/project-map/project-map.component.scss index 49f1556a..553b5a13 100644 --- a/src/app/components/project-map/project-map.component.scss +++ b/src/app/components/project-map/project-map.component.scss @@ -230,3 +230,7 @@ g.node text, .context-menu-items .mat-menu-item:focus { background: none; } + +.visible { + display: none; +} diff --git a/src/app/components/project-map/project-map.component.ts b/src/app/components/project-map/project-map.component.ts index 002d167b..20f6f1f3 100644 --- a/src/app/components/project-map/project-map.component.ts +++ b/src/app/components/project-map/project-map.component.ts @@ -68,6 +68,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy { public server: Server; public ws: WebSocket; public isProjectMapMenuVisible: boolean = false; + public isTopologySummaryVisible: boolean = false; tools = { selection: true, @@ -362,6 +363,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy { this.project.show_interface_labels = enabled; } + public toggleShowTopologySummary(visible: boolean) { + this.isTopologySummaryVisible = visible; + } + public hideMenu() { this.projectMapMenuComponent.resetDrawToolChoice() this.isProjectMapMenuVisible = false; diff --git a/src/app/components/topology-summary/topology-summary.component.html b/src/app/components/topology-summary/topology-summary.component.html index f4ee0470..f08c0dd6 100644 --- a/src/app/components/topology-summary/topology-summary.component.html +++ b/src/app/components/topology-summary/topology-summary.component.html @@ -1,7 +1,7 @@
Topology summary ({{projectsStatistics.snapshots}} snapshots) - close + close
diff --git a/src/app/components/topology-summary/topology-summary.component.scss b/src/app/components/topology-summary/topology-summary.component.scss index 9840d4bc..63e25338 100644 --- a/src/app/components/topology-summary/topology-summary.component.scss +++ b/src/app/components/topology-summary/topology-summary.component.scss @@ -65,3 +65,7 @@ mat-icon { .radio-group { margin-top: 5px; } + +.closeButton { + cursor: pointer; +} diff --git a/src/app/components/topology-summary/topology-summary.component.ts b/src/app/components/topology-summary/topology-summary.component.ts index bec42d2c..f758af53 100644 --- a/src/app/components/topology-summary/topology-summary.component.ts +++ b/src/app/components/topology-summary/topology-summary.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, OnDestroy, Input, AfterViewInit } from '@angular/core'; +import { Component, OnInit, OnDestroy, Input, AfterViewInit, Output, EventEmitter } from '@angular/core'; import { Project } from '../../models/project'; import { Server } from '../../models/server'; import { NodesDataSource } from '../../cartography/datasources/nodes-datasource'; @@ -18,6 +18,8 @@ export class TopologySummaryComponent implements OnInit, OnDestroy { @Input() server: Server; @Input() project: Project; + @Output() closeTopologySummary = new EventEmitter(); + private subscriptions: Subscription[] = []; projectsStatistics: ProjectStatistics; nodes: Node[] = []; @@ -91,4 +93,8 @@ export class TopologySummaryComponent implements OnInit, OnDestroy { this.filteredNodes = nodes.sort(this.compareDesc); } } + + close() { + this.closeTopologySummary.emit(false); + } }