1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 09:18:08 +00:00

New node information dialog to display general, usage and command line information.

Ref https://github.com/GNS3/gns3-gui/issues/2662 https://github.com/GNS3/gns3-gui/issues/2656
This commit is contained in:
grossmj 2018-12-30 19:35:24 +07:00
parent 40f8a33331
commit 9ed181151f
9 changed files with 23 additions and 4 deletions

View File

@ -109,6 +109,7 @@ class DockerVM(BaseNode):
def __json__(self): def __json__(self):
return { return {
"name": self._name, "name": self._name,
"usage": self.usage,
"node_id": self._id, "node_id": self._id,
"container_id": self._cid, "container_id": self._cid,
"project_id": self._project.id, "project_id": self._project.id,

View File

@ -143,6 +143,7 @@ class Router(BaseNode):
def __json__(self): def __json__(self):
router_info = {"name": self.name, router_info = {"name": self.name,
"usage": self.usage,
"node_id": self.id, "node_id": self.id,
"node_directory": os.path.join(self._working_directory), "node_directory": os.path.join(self._working_directory),
"project_id": self.project.id, "project_id": self.project.id,

View File

@ -215,6 +215,7 @@ class IOUVM(BaseNode):
def __json__(self): def __json__(self):
iou_vm_info = {"name": self.name, iou_vm_info = {"name": self.name,
"usage": self.usage,
"node_id": self.id, "node_id": self.id,
"node_directory": self.working_path, "node_directory": self.working_path,
"console": self._console, "console": self._console,

View File

@ -75,6 +75,7 @@ class VirtualBoxVM(BaseNode):
def __json__(self): def __json__(self):
json = {"name": self.name, json = {"name": self.name,
"usage": self.usage,
"node_id": self.id, "node_id": self.id,
"console": self.console, "console": self.console,
"console_type": self.console_type, "console_type": self.console_type,

View File

@ -74,6 +74,7 @@ class VMwareVM(BaseNode):
def __json__(self): def __json__(self):
json = {"name": self.name, json = {"name": self.name,
"usage": self.usage,
"node_id": self.id, "node_id": self.id,
"console": self.console, "console": self.console,
"console_type": self.console_type, "console_type": self.console_type,

View File

@ -25,6 +25,10 @@ IOU_TEMPLATE_PROPERTIES = {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
}, },
"usage": {
"description": "How to use the IOU VM",
"type": "string",
},
"ethernet_adapters": { "ethernet_adapters": {
"description": "Number of ethernet adapters", "description": "Number of ethernet adapters",
"type": "integer", "type": "integer",

View File

@ -22,13 +22,13 @@ from .qemu import QEMU_PLATFORMS
QEMU_TEMPLATE_PROPERTIES = { QEMU_TEMPLATE_PROPERTIES = {
"usage": { "qemu_path": {
"description": "How to use the Qemu VM", "description": "Path to QEMU",
"type": "string", "type": "string",
"default": "" "default": ""
}, },
"qemu_path": { "usage": {
"description": "Path to QEMU", "description": "How to use the Qemu VM",
"type": "string", "type": "string",
"default": "" "default": ""
}, },

View File

@ -26,6 +26,11 @@ VIRTUALBOX_TEMPLATE_PROPERTIES = {
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"usage": {
"description": "How to use the VirtualBox VM",
"type": "string",
"default": ""
},
"ram": { "ram": {
"description": "Amount of RAM", "description": "Amount of RAM",
"minimum": 0, "minimum": 0,

View File

@ -26,6 +26,11 @@ VMWARE_TEMPLATE_PROPERTIES = {
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"usage": {
"description": "How to use the VMware VM",
"type": "string",
"default": ""
},
"linked_clone": { "linked_clone": {
"description": "Whether the VM is a linked clone or not", "description": "Whether the VM is a linked clone or not",
"type": "boolean", "type": "boolean",