From 97aa9d74131d91b94ec5956b60a6321ee5f23c41 Mon Sep 17 00:00:00 2001 From: Piotr Pekala Date: Wed, 23 Oct 2019 05:39:03 -0700 Subject: [PATCH] Usage instructions added --- .../cartography/converters/map/map-node-to-node-converter.ts | 1 + .../cartography/converters/map/node-to-map-node-converter.ts | 1 + src/app/cartography/models/map/map-node.ts | 1 + src/app/cartography/models/node.ts | 1 + .../project-map/info-dialog/info-dialog.component.html | 5 +++++ .../project-map/info-dialog/info-dialog.component.ts | 2 ++ 6 files changed, 11 insertions(+) diff --git a/src/app/cartography/converters/map/map-node-to-node-converter.ts b/src/app/cartography/converters/map/map-node-to-node-converter.ts index 6c5fbac1..206fdc07 100644 --- a/src/app/cartography/converters/map/map-node-to-node-converter.ts +++ b/src/app/cartography/converters/map/map-node-to-node-converter.ts @@ -31,6 +31,7 @@ export class MapNodeToNodeConverter implements Converter { node.status = mapNode.status; node.symbol = mapNode.symbol; node.symbol_url = mapNode.symbolUrl; + node.usage = mapNode.usage; node.width = mapNode.width; node.x = mapNode.x; node.y = mapNode.y; diff --git a/src/app/cartography/converters/map/node-to-map-node-converter.ts b/src/app/cartography/converters/map/node-to-map-node-converter.ts index b3e64b1d..b25c4111 100644 --- a/src/app/cartography/converters/map/node-to-map-node-converter.ts +++ b/src/app/cartography/converters/map/node-to-map-node-converter.ts @@ -40,6 +40,7 @@ export class NodeToMapNodeConverter implements Converter { mapNode.status = node.status; mapNode.symbol = node.symbol; mapNode.symbolUrl = node.symbol_url; + mapNode.usage = node.usage; mapNode.width = node.width; mapNode.x = node.x; mapNode.y = node.y; diff --git a/src/app/cartography/models/map/map-node.ts b/src/app/cartography/models/map/map-node.ts index fda84783..9f3e9749 100644 --- a/src/app/cartography/models/map/map-node.ts +++ b/src/app/cartography/models/map/map-node.ts @@ -23,6 +23,7 @@ export class MapNode implements Indexed { status: string; symbol: string; symbolUrl: string; + usage?: string; width: number; x: number; y: number; diff --git a/src/app/cartography/models/node.ts b/src/app/cartography/models/node.ts index c5960ae2..f9f41428 100644 --- a/src/app/cartography/models/node.ts +++ b/src/app/cartography/models/node.ts @@ -82,6 +82,7 @@ export class Node { status: string; symbol: string; symbol_url: string; // @TODO: full URL to symbol, move to MapNode once converters are moved to app module + usage?: string; width: number; x: number; y: number; diff --git a/src/app/components/project-map/info-dialog/info-dialog.component.html b/src/app/components/project-map/info-dialog/info-dialog.component.html index 529b00e4..517f5820 100644 --- a/src/app/components/project-map/info-dialog/info-dialog.component.html +++ b/src/app/components/project-map/info-dialog/info-dialog.component.html @@ -9,6 +9,11 @@ + +
+ {{usage}} +
+
{{commandLine}} diff --git a/src/app/components/project-map/info-dialog/info-dialog.component.ts b/src/app/components/project-map/info-dialog/info-dialog.component.ts index 11968f47..893919fe 100644 --- a/src/app/components/project-map/info-dialog/info-dialog.component.ts +++ b/src/app/components/project-map/info-dialog/info-dialog.component.ts @@ -13,6 +13,7 @@ export class InfoDialogComponent implements OnInit { @Input() server: Server; @Input() node: Node; infoList: string[] = []; + usage: string = ''; commandLine: string = ''; constructor( @@ -23,6 +24,7 @@ export class InfoDialogComponent implements OnInit { ngOnInit() { this.infoList = this.infoService.getInfoAboutNode(this.node, this.server); this.commandLine = this.infoService.getCommandLine(this.node); + this.usage = this.node.usage ? this.node.usage : `No usage information has been provided for this node.`; } onCloseClick() {