mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-21 07:58:25 +00:00
server resolver for snapshots page
This commit is contained in:
@ -83,7 +83,11 @@ const routes: Routes = [
|
|||||||
{ path: 'server/:server_id/systemstatus', component: SystemStatusComponent },
|
{ path: 'server/:server_id/systemstatus', component: SystemStatusComponent },
|
||||||
|
|
||||||
{ path: 'server/:server_ip/:server_port/project/:project_id', component: DirectLinkComponent},
|
{ path: 'server/:server_ip/:server_port/project/:project_id', component: DirectLinkComponent},
|
||||||
{ path: 'server/:server_id/project/:project_id/snapshots', component: ListOfSnapshotsComponent },
|
{
|
||||||
|
path: 'server/:server_id/project/:project_id/snapshots',
|
||||||
|
component: ListOfSnapshotsComponent,
|
||||||
|
resolve: { server : ServerResolve }
|
||||||
|
},
|
||||||
{ path: 'server/:server_id/preferences', component: PreferencesComponent },
|
{ path: 'server/:server_id/preferences', component: PreferencesComponent },
|
||||||
{ path: 'server/:server_id/preferences/gns3vm', component: Gns3vmComponent },
|
{ path: 'server/:server_id/preferences/gns3vm', component: Gns3vmComponent },
|
||||||
// { path: 'server/:server_id/preferences/general', component: GeneralPreferencesComponent },
|
// { path: 'server/:server_id/preferences/general', component: GeneralPreferencesComponent },
|
||||||
|
@ -23,20 +23,16 @@ export class ListOfSnapshotsComponent implements OnInit {
|
|||||||
searchText: string;
|
searchText: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private snapshotService: SnapshotService,
|
|
||||||
private serverService: ServerService,
|
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
|
private snapshotService: SnapshotService,
|
||||||
private progressDialogService: ProgressDialogService,
|
private progressDialogService: ProgressDialogService,
|
||||||
private toaster: ToasterService
|
private toaster: ToasterService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
let serverId = this.route.snapshot.paramMap.get("server_id");
|
|
||||||
this.projectId = this.route.snapshot.paramMap.get("project_id");
|
this.projectId = this.route.snapshot.paramMap.get("project_id");
|
||||||
this.serverService.get(parseInt(serverId, 10)).then((server: Server) => {
|
this.server = this.route.snapshot.data['server'];
|
||||||
this.server = server;
|
this.getSnapshots();
|
||||||
this.getSnapshots();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getSnapshots() {
|
getSnapshots() {
|
||||||
|
Reference in New Issue
Block a user