Update project-map-component

This commit is contained in:
Piotr Pekala 2019-08-20 06:52:13 -07:00
parent 6f62f4171d
commit 43e87307ba
2 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,7 @@
</button>
<button mat-menu-item (click)="addNewProject()">
<mat-icon>add</mat-icon>
<span>New blank project</span>
<span>Add new blank project</span>
</button>
<button mat-menu-item (click)="saveProject()">
<mat-icon>save</mat-icon>

View File

@ -466,6 +466,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
exportProject() {
if (this.nodes.filter(node => node.node_type === 'virtualbox').length > 0) {
this.toasterService.error('Map with VirtualBox machines cannot be exported.')
} else if (this.nodes.filter(node => node.status === 'started').length > 0) {
this.toasterService.error('Project with running nodes cannot be exported.')
} else {
window.location.href = `http://${this.server.host}:${this.server.port}/v2/projects/${this.project.project_id}/export`;
}