mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-19 03:06:31 +00:00
Merge pull request #547 from GNS3/Usage-instructions-should-be-available-from-context-menu
Usage instructions for nodes
This commit is contained in:
commit
0bffe1b0b0
@ -31,6 +31,7 @@ export class MapNodeToNodeConverter implements Converter<MapNode, Node> {
|
|||||||
node.status = mapNode.status;
|
node.status = mapNode.status;
|
||||||
node.symbol = mapNode.symbol;
|
node.symbol = mapNode.symbol;
|
||||||
node.symbol_url = mapNode.symbolUrl;
|
node.symbol_url = mapNode.symbolUrl;
|
||||||
|
node.usage = mapNode.usage;
|
||||||
node.width = mapNode.width;
|
node.width = mapNode.width;
|
||||||
node.x = mapNode.x;
|
node.x = mapNode.x;
|
||||||
node.y = mapNode.y;
|
node.y = mapNode.y;
|
||||||
|
@ -40,6 +40,7 @@ export class NodeToMapNodeConverter implements Converter<Node, MapNode> {
|
|||||||
mapNode.status = node.status;
|
mapNode.status = node.status;
|
||||||
mapNode.symbol = node.symbol;
|
mapNode.symbol = node.symbol;
|
||||||
mapNode.symbolUrl = node.symbol_url;
|
mapNode.symbolUrl = node.symbol_url;
|
||||||
|
mapNode.usage = node.usage;
|
||||||
mapNode.width = node.width;
|
mapNode.width = node.width;
|
||||||
mapNode.x = node.x;
|
mapNode.x = node.x;
|
||||||
mapNode.y = node.y;
|
mapNode.y = node.y;
|
||||||
|
@ -23,6 +23,7 @@ export class MapNode implements Indexed {
|
|||||||
status: string;
|
status: string;
|
||||||
symbol: string;
|
symbol: string;
|
||||||
symbolUrl: string;
|
symbolUrl: string;
|
||||||
|
usage?: string;
|
||||||
width: number;
|
width: number;
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
|
@ -82,6 +82,7 @@ export class Node {
|
|||||||
status: string;
|
status: string;
|
||||||
symbol: string;
|
symbol: string;
|
||||||
symbol_url: string; // @TODO: full URL to symbol, move to MapNode once converters are moved to app module
|
symbol_url: string; // @TODO: full URL to symbol, move to MapNode once converters are moved to app module
|
||||||
|
usage?: string;
|
||||||
width: number;
|
width: number;
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
<mat-tab label="Usage instructions">
|
||||||
|
<div class="textBox">
|
||||||
|
{{usage}}
|
||||||
|
</div>
|
||||||
|
</mat-tab>
|
||||||
<mat-tab label="Command line">
|
<mat-tab label="Command line">
|
||||||
<div class="textBox">
|
<div class="textBox">
|
||||||
{{commandLine}}
|
{{commandLine}}
|
||||||
|
@ -13,6 +13,7 @@ export class InfoDialogComponent implements OnInit {
|
|||||||
@Input() server: Server;
|
@Input() server: Server;
|
||||||
@Input() node: Node;
|
@Input() node: Node;
|
||||||
infoList: string[] = [];
|
infoList: string[] = [];
|
||||||
|
usage: string = '';
|
||||||
commandLine: string = '';
|
commandLine: string = '';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -23,6 +24,7 @@ export class InfoDialogComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.infoList = this.infoService.getInfoAboutNode(this.node, this.server);
|
this.infoList = this.infoService.getInfoAboutNode(this.node, this.server);
|
||||||
this.commandLine = this.infoService.getCommandLine(this.node);
|
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() {
|
onCloseClick() {
|
||||||
|
Loading…
Reference in New Issue
Block a user