Skip to content

Commit

Permalink
fix: disable start button once pressed
Browse files Browse the repository at this point in the history
So we do not spin up a lot of sessions.
  • Loading branch information
amolenaar committed Nov 23, 2023
1 parent b1c8a3c commit 6ee1351
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 id="title">Provision workspace</h2>
mat-flat-button
color="primary"
type="submit"
[disabled]="!projectSlug || !models"
[disabled]="!projectSlug || !models || sessionsRequested"
>
Start this training
<mat-icon>keyboard_arrow_right</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export class ProvisionWorkspaceComponent implements OnInit {
persistentWorkspace: this.fb.control(false),
});

public sessionsRequested = false;

constructor(
private userSessionService: UserSessionService,
private projectService: ProjectService,
Expand All @@ -56,6 +58,7 @@ export class ProvisionWorkspaceComponent implements OnInit {

requestSessions(): void {
if (this.projectSlug && this.models) {
this.sessionsRequested = true;
this.sessionService
.provisionWorkspace(
this.projectSlug,
Expand Down

0 comments on commit 6ee1351

Please sign in to comment.