-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add webinterfaces and shared vms to step component, refactor dashboar…
…d shared vm access
- Loading branch information
Philip Prinz
authored and
Philip Prinz
committed
Oct 25, 2024
1 parent
11fea82
commit b8ef131
Showing
27 changed files
with
770 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ export class Session { | |
keep_course_vm: boolean; | ||
user: string; | ||
vm_claim: string[]; | ||
access_code: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { HttpErrorResponse } from '@angular/common/http'; | ||
import { catchError, switchMap } from 'rxjs/operators'; | ||
import { ServerResponse } from './serverresponse'; | ||
import { of, throwError } from 'rxjs'; | ||
import { atou } from '../unicode'; | ||
import { ResourceClient, GargantuaClientFactory } from './gargantua.service'; | ||
import { VirtualMachine } from './virtualmachine'; | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class AdminVmService extends ResourceClient<VirtualMachine> { | ||
constructor(gcf: GargantuaClientFactory) { | ||
super(gcf.scopedClient('/a/vm')); | ||
} | ||
|
||
public list() { | ||
return this.garg.get('/list').pipe( | ||
catchError((e: HttpErrorResponse) => { | ||
return throwError(() => e.error); | ||
}), | ||
switchMap((s: ServerResponse) => { | ||
return of(JSON.parse(atou(s.content))); | ||
}) | ||
); | ||
} | ||
public listByScheduledEvent(id: String) { | ||
return this.garg | ||
.get('/scheduledevent/' + id) | ||
.pipe( | ||
catchError((e: HttpErrorResponse) => { | ||
return throwError(() => e.error); | ||
}), | ||
switchMap((s: ServerResponse) => { | ||
return of(JSON.parse(atou(s.content))); | ||
}) | ||
); | ||
} | ||
|
||
public count() { | ||
return this.garg.get('/count').pipe( | ||
catchError((e: HttpErrorResponse) => { | ||
return throwError(() => e.error); | ||
}), | ||
switchMap((s: ServerResponse) => { | ||
return of(JSON.parse(atou(s.content))); | ||
}) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export interface SharedVirtualMachine { | ||
vmId: string; | ||
vm_id: string; | ||
name: string; | ||
environment: string; | ||
vmTemplate: string; | ||
vm_template: string; | ||
} |
Oops, something went wrong.