mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-24 13:05:48 +00:00
Update export-config-action.component.ts
This commit is contained in:
parent
70f7c54de0
commit
864bb84270
@ -25,7 +25,11 @@ export class ExportConfigActionComponent {
|
||||
const element = document.createElement('a');
|
||||
const fileType = 'text/plain';
|
||||
element.setAttribute('href', `data:${fileType};charset=utf-8,${encodeURIComponent(config)}`);
|
||||
element.setAttribute('download', `${this.node.name}_startup.vpc`);
|
||||
if (this.node.node_type === 'vpcs') {
|
||||
element.setAttribute('download', `${this.node.name}_startup.vpc`);
|
||||
} else if (this.node.node_type === 'iou' || this.node.node_type === 'dynamips') {
|
||||
element.setAttribute('download', `${this.node.name}_startup.cfg`);
|
||||
}
|
||||
|
||||
var event = new MouseEvent("click");
|
||||
element.dispatchEvent(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user