Skip to content
This repository was archived by the owner on Aug 29, 2022. It is now read-only.

Commit 15e4437

Browse files
committed
Spinner Issue Fixed: Spinner was continuosly spinning in a loop even after error messages.
1 parent 4f5cb8a commit 15e4437

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui-trainer/src/app/manage-projects/manage-projects.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export class ManageProjectsComponent implements OnInit, OnDestroy {
152152
data: {errorMessage: response['message']}
153153
});
154154
dialogRef.afterClosed().subscribe(() => {});
155+
this.showSpinner[index] = false;
155156
}
156157
},
157158
err => console.error('Observer got an error: ' + err),
@@ -174,7 +175,6 @@ export class ManageProjectsComponent implements OnInit, OnDestroy {
174175
if (response['Status'] === 'Success') {
175176
sessionStorage.setItem(projectObjectId, response['Message']);
176177
this.notificationsService.showToast({status: response['Status'], message: 'Model Training Complete.'});
177-
this.showSpinner[index] = false;
178178
} else if (response['Status'] === 'Error') {
179179
const dialogRef = this.dialog.open(ShowTrainErrorComponent, {
180180
width: '700px',
@@ -189,6 +189,7 @@ export class ManageProjectsComponent implements OnInit, OnDestroy {
189189
}
190190

191191
finishTraining(index: number) {
192+
this.showSpinner[index] = false;
192193
this.apiService.forceModelTrainingCacheReload('finish');
193194
}
194195

0 commit comments

Comments
 (0)