Instantiation-Status: default on unexpected statuses
Issue-ID: VID-692
Change-Id: I1a81a71d32aa36fb1f0dc3b349733db11d4e579d
Signed-off-by: Ittay Stern <ittay.stern@att.com>
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
index 0e4451c..6a85d9d 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
@@ -12,13 +12,15 @@
import {Router, UrlTree} from "@angular/router";
import {of} from "rxjs";
import {MsoService} from "../shared/services/msoService/mso.service";
+
export let PENDING : string = "pending";
export let INPROGRESS : string = "in_progress";
export let PAUSE : string = "pause";
export let X_O : string = "x-circle-o";
export let SUCCESS_CIRCLE : string = "success-circle-o";
-export let STOPED : string = "stop";
+export let STOPPED : string = "stop";
export let COMPLETED_WITH_ERRORS : string = "success_with_warning";
+export let UNKNOWN : string = "question-mark-circle-o";
@Injectable()
@@ -148,9 +150,12 @@
case 'COMPLETED' :
return new ServiceStatus(SUCCESS_CIRCLE, 'success', 'Completed successfully: Service is successfully instantiated, updated or deleted.');
case 'STOPPED' :
- return new ServiceStatus(STOPED, 'error', 'Stopped: Due to previous failure, will not be instantiated.');
+ return new ServiceStatus(STOPPED, 'error', 'Stopped: Due to previous failure, will not be instantiated.');
case 'COMPLETED_WITH_ERRORS' :
return new ServiceStatus(COMPLETED_WITH_ERRORS, 'success', 'Completed with errors: some of the planned actions where successfully committed while other have not.\n Open the service to check it out.');
+
+ default:
+ return new ServiceStatus(UNKNOWN, 'primary', `Unexpected status: "${status}"`);
}
}