From a8ebb74702f07acead84edcdaf083d78a84d00a3 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Tue, 29 Oct 2019 17:54:54 +0200 Subject: Instantiation-Status: default on unexpected statuses Issue-ID: VID-692 Change-Id: I1a81a71d32aa36fb1f0dc3b349733db11d4e579d Signed-off-by: Ittay Stern --- .../instantiationStatus/instantiationStatus.component.service.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts') 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 0e4451ca8..6a85d9da1 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 {updateDrawingBoardStatus} from "../shared/storeUtil/utils/global/global. 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 @@ export class InstantiationStatusComponentService { 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}"`); } } -- cgit 1.2.3-korg