mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-02 23:40:43 +00:00
Merge branch 'master' into Export/import-project
This commit is contained in:
commit
12f31987d4
@ -62,6 +62,10 @@
|
|||||||
<mat-icon>call_received</mat-icon>
|
<mat-icon>call_received</mat-icon>
|
||||||
<span>Import portable project</span>
|
<span>Import portable project</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button mat-menu-item (click)="deleteProject()">
|
||||||
|
<mat-icon>delete</mat-icon>
|
||||||
|
<span>Delete project</span>
|
||||||
|
</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
|
@ -122,11 +122,11 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
private nodeCreatedLabelStylesFixer: NodeCreatedLabelStylesFixer,
|
private nodeCreatedLabelStylesFixer: NodeCreatedLabelStylesFixer,
|
||||||
private toasterService: ToasterService,
|
private toasterService: ToasterService,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
|
private router: Router,
|
||||||
private mapNodesDataSource: MapNodesDataSource,
|
private mapNodesDataSource: MapNodesDataSource,
|
||||||
private mapLinksDataSource: MapLinksDataSource,
|
private mapLinksDataSource: MapLinksDataSource,
|
||||||
private mapDrawingsDataSource: MapDrawingsDataSource,
|
private mapDrawingsDataSource: MapDrawingsDataSource,
|
||||||
private mapSymbolsDataSource: MapSymbolsDataSource,
|
private mapSymbolsDataSource: MapSymbolsDataSource
|
||||||
private router: Router
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -492,6 +492,12 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
imageToUpload.src = window.URL.createObjectURL(file);
|
imageToUpload.src = window.URL.createObjectURL(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public deleteProject() {
|
||||||
|
this.projectService.delete(this.server, this.project.project_id).subscribe(() => {
|
||||||
|
this.router.navigate(['/server', this.server.id, 'projects']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.drawingsDataSource.clear();
|
this.drawingsDataSource.clear();
|
||||||
this.nodesDataSource.clear();
|
this.nodesDataSource.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user