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