Merge pull request #1364 from GNS3/use-themed-symbols

Let the controller allocate symbols
This commit is contained in:
Jeremy Grossmann 2022-07-25 20:46:05 +02:00 committed by GitHub
commit 3024f62d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 26 deletions

View File

@ -179,7 +179,7 @@ export class AddIosTemplateComponent implements OnInit, OnDestroy {
this.iosTemplate.ram = this.iosMemoryForm.get('memory').value;
if (this.isEtherSwitchRouter) {
this.iosTemplate.symbol = ':/symbols/multilayer_switch.svg';
this.iosTemplate.symbol = 'multilayer_switch';
this.iosTemplate.category = 'switch';
}

View File

@ -97,7 +97,7 @@ describe('AddVirtualBoxTemplateComponent', () => {
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
ram: 0,
symbol: ':/symbols/vbox_guest.svg',
symbol: 'vbox_guest',
template_id: '',
template_type: 'virtualbox',
usage: '',

View File

@ -45,7 +45,7 @@ describe('BuiltInTemplatesService', () => {
name: '',
ports_mapping: [],
remote_console_type: 'none',
symbol: ':/symbols/cloud.svg',
symbol: 'cloud',
template_id: '1',
template_type: 'cloud',
} as CloudTemplate;
@ -65,7 +65,7 @@ describe('BuiltInTemplatesService', () => {
default_name_format: 'Hub{0}',
name: '',
ports_mapping: [],
symbol: ':/symbols/hub.svg',
symbol: 'hub',
template_id: '2',
template_type: 'ethernet_hub',
};
@ -85,7 +85,7 @@ describe('BuiltInTemplatesService', () => {
default_name_format: 'Hub{0}',
name: '',
ports_mapping: [],
symbol: ':/symbols/hub.svg',
symbol: 'hub',
template_id: '3',
template_type: 'ethernet_hub',
};
@ -106,7 +106,7 @@ describe('BuiltInTemplatesService', () => {
name: '',
ports_mapping: [],
remote_console_type: 'none',
symbol: ':/symbols/cloud.svg',
symbol: 'cloud',
template_id: '1',
template_type: 'cloud',
} as CloudTemplate;
@ -126,7 +126,7 @@ describe('BuiltInTemplatesService', () => {
default_name_format: 'Hub{0}',
name: '',
ports_mapping: [],
symbol: ':/symbols/hub.svg',
symbol: 'hub',
template_id: '2',
template_type: 'ethernet_hub',
};
@ -146,7 +146,7 @@ describe('BuiltInTemplatesService', () => {
default_name_format: 'Hub{0}',
name: '',
ports_mapping: [],
symbol: ':/symbols/hub.svg',
symbol: 'hub',
template_id: '3',
template_type: 'ethernet_hub',
};

View File

@ -74,7 +74,7 @@ describe('QemuService', () => {
process_priority: 'normal',
qemu_path: '',
ram: 256,
symbol: ':/symbols/qemu_guest.svg',
symbol: 'qemu_guest',
template_id: '1',
template_type: 'qemu',
usage: '',
@ -126,7 +126,7 @@ describe('QemuService', () => {
process_priority: 'normal',
qemu_path: '',
ram: 256,
symbol: ':/symbols/qemu_guest.svg',
symbol: 'qemu_guest',
template_id: '',
template_type: 'qemu',
usage: '',

View File

@ -54,7 +54,7 @@ export class TemplateMocksService {
process_priority: 'normal',
qemu_path: '',
ram: 256,
symbol: ':/symbols/qemu_guest.svg',
symbol: 'qemu_guest',
template_id: '',
template_type: 'qemu',
usage: '',
@ -73,7 +73,7 @@ export class TemplateMocksService {
console_type: 'telnet',
default_name_format: 'PC{0}',
name: '',
symbol: ':/symbols/vpcs_guest.svg',
symbol: 'vpcs_guest',
template_id: '',
template_type: 'vpcs',
};
@ -100,7 +100,7 @@ export class TemplateMocksService {
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
ram: 0,
symbol: ':/symbols/vbox_guest.svg',
symbol: 'vbox_guest',
template_id: '',
template_type: 'virtualbox',
usage: '',
@ -120,7 +120,7 @@ export class TemplateMocksService {
name: '',
ports_mapping: [],
remote_console_type: 'none',
symbol: ':/symbols/cloud.svg',
symbol: 'cloud',
template_id: '',
template_type: 'cloud',
} as CloudTemplate;
@ -136,7 +136,7 @@ export class TemplateMocksService {
default_name_format: 'Hub{0}',
name: '',
ports_mapping: [],
symbol: ':/symbols/hub.svg',
symbol: 'hub',
template_id: '',
template_type: 'ethernet_hub',
};
@ -153,7 +153,7 @@ export class TemplateMocksService {
default_name_format: 'Switch{0}',
name: '',
ports_mapping: [],
symbol: ':/symbols/ethernet_switch.svg',
symbol: 'ethernet_switch',
template_id: '',
template_type: 'ethernet_switch',
};
@ -186,7 +186,7 @@ export class TemplateMocksService {
ram: 128,
sparsemem: true,
startup_config: '',
symbol: ':/symbols/router.svg',
symbol: 'router',
system_id: 'FTX0945W0MY',
template_id: '',
template_type: 'dynamips',
@ -214,7 +214,7 @@ export class TemplateMocksService {
on_close: 'power_off',
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
symbol: ':/symbols/vmware_guest.svg',
symbol: 'vmware_guest',
template_id: '',
template_type: 'vmware',
usage: '',
@ -243,7 +243,7 @@ export class TemplateMocksService {
image: '',
name: '',
start_command: '',
symbol: ':/symbols/docker_guest.svg',
symbol: 'docker_guest',
template_id: '',
template_type: 'docker',
usage: '',
@ -269,7 +269,7 @@ export class TemplateMocksService {
ram: 256,
serial_adapters: 0,
startup_config: 'iou_l2_base_startup-config.txt',
symbol: ':/symbols/multilayer_switch.svg',
symbol: 'multilayer_switch',
template_id: '',
template_type: 'iou',
usage: '',

View File

@ -54,7 +54,7 @@ describe('VirtualBoxService', () => {
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
ram: 0,
symbol: ':/symbols/vbox_guest.svg',
symbol: 'vbox_guest',
template_id: '1',
template_type: 'virtualbox',
usage: '',
@ -88,7 +88,7 @@ describe('VirtualBoxService', () => {
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
ram: 0,
symbol: ':/symbols/vbox_guest.svg',
symbol: 'vbox_guest',
template_id: '',
template_type: 'virtualbox',
usage: '',

View File

@ -53,7 +53,7 @@ describe('VmwareService', () => {
on_close: 'power-off',
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
symbol: ':/symbols/vmware_guest.svg',
symbol: 'vmware_guest',
template_id: '1',
template_type: 'vmware',
usage: '',
@ -86,7 +86,7 @@ describe('VmwareService', () => {
on_close: 'power-off',
port_name_format: 'Ethernet{0}',
port_segment_size: 0,
symbol: ':/symbols/vmware_guest.svg',
symbol: 'vmware_guest',
template_id: '1',
template_type: 'vmware',
usage: '',

View File

@ -45,7 +45,7 @@ describe('VpcsService', () => {
console_type: 'telnet',
default_name_format: 'PC{0}',
name: '',
symbol: ':/symbols/vpcs_guest.svg',
symbol: 'vpcs_guest',
template_id: '1',
template_type: 'vpcs',
};
@ -67,7 +67,7 @@ describe('VpcsService', () => {
console_type: 'telnet',
default_name_format: 'PC{0}',
name: '',
symbol: ':/symbols/vpcs_guest.svg',
symbol: 'vpcs_guest',
template_id: '',
template_type: 'vpcs',
};