aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src')
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts5
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts3
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts10
-rw-r--r--vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts3
4 files changed, 15 insertions, 6 deletions
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts
index 5d7d89804..5652923cd 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts
@@ -1,6 +1,7 @@
import {getTestBed, TestBed} from '@angular/core/testing';
import {
COMPLETED_WITH_ERRORS,
+ FAILED_AND_PAUSED,
INPROGRESS,
InstantiationStatusComponentService,
PAUSE,
@@ -150,6 +151,7 @@ describe('Instantiation Status Service', () => {
'COMPLETED_WITH_ERRORS': 'Completed with errors: some of the planned actions where successfully committed while other have not.\n Open the service to check it out.',
'UNEXPECTED_RANDOM_STATUS': 'Unexpected status: "UNEXPECTED_RANDOM_STATUS"',
'COMPLETED_AND_PAUSED': 'Pause upon completion. you may resume the instantiation.\n Open the service to check it out.',
+ 'FAILED_AND_PAUSED': 'Failed and Paused: you may re-deploy the instantiation.\n Open the service to check it out.',
})) {
test(`getStatusTooltip should return status popover: status=${status}`, () => {
@@ -213,6 +215,9 @@ describe('Instantiation Status Service', () => {
result = service.getStatus('COMPLETED_AND_PAUSED');
expect(result.iconClassName).toEqual(PAUSE_UPON_COMPLETION);
+ result = service.getStatus('FAILED_AND_PAUSED');
+ expect(result.iconClassName).toEqual(FAILED_AND_PAUSED);
+
result = service.getStatus(undefined);
expect(result.iconClassName).toEqual(UNKNOWN);
});
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 cdbe890a5..709cb89ba 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
@@ -23,6 +23,7 @@ export let SUCCESS_CIRCLE : string = "success-circle-o";
export let STOPPED : string = "stop";
export let COMPLETED_WITH_ERRORS : string = "success_with_warning";
export let PAUSE_UPON_COMPLETION : string = "stopped-upon-success";
+export let FAILED_AND_PAUSED : string = "success_with_warning";
export let UNKNOWN : string = "question-mark-circle-o";
@@ -172,6 +173,8 @@ export class InstantiationStatusComponentService {
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.');
case 'COMPLETED_AND_PAUSED' :
return new ServiceStatus(PAUSE_UPON_COMPLETION, 'default','Pause upon completion. you may resume the instantiation.\n Open the service to check it out.' );
+ case 'FAILED_AND_PAUSED' :
+ return new ServiceStatus(FAILED_AND_PAUSED, 'success','Failed and Paused: you may re-deploy the instantiation.\n Open the service to check it out.' );
default:
return new ServiceStatus(UNKNOWN, 'primary', `Unexpected status: "${status}"`);
}
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts
index 5e0c2a8cd..676c3a451 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts
@@ -196,17 +196,17 @@ export class InstantiationStatusComponent implements OnInit {
isOpenEnabled(item: ServiceInfoModel):boolean {
switch(item.action) {
case ServiceAction.DELETE:
- return _.includes([ JobStatus.PENDING, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.FAILED], item.jobStatus);
+ return _.includes([ JobStatus.PENDING, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.FAILED, JobStatus.FAILED_AND_PAUSED], item.jobStatus);
case ServiceAction.UPDATE:
- return _.includes([JobStatus.PENDING, JobStatus.PAUSE, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.COMPLETED, JobStatus.FAILED], item.jobStatus);
+ return _.includes([JobStatus.PENDING, JobStatus.PAUSE, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.COMPLETED, JobStatus.FAILED, JobStatus.FAILED_AND_PAUSED], item.jobStatus);
default:
- return _.includes([JobStatus.COMPLETED, JobStatus.PAUSE, JobStatus.COMPLETED_WITH_ERRORS], item.jobStatus);
+ return _.includes([JobStatus.COMPLETED, JobStatus.PAUSE, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.FAILED_AND_PAUSED], item.jobStatus);
}
}
isAuditInfoEnabled(item: ServiceInfoModel): boolean {
if(item.action === ServiceAction.DELETE || item.action=== ServiceAction.UPDATE) {
- return _.includes([JobStatus.FAILED, JobStatus.IN_PROGRESS, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.PAUSE, JobStatus.COMPLETED], item.jobStatus);
+ return _.includes([JobStatus.FAILED, JobStatus.IN_PROGRESS, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.FAILED_AND_PAUSED, JobStatus.PAUSE, JobStatus.COMPLETED], item.jobStatus);
}
return true;// ServiceAction.INSTANTIATE
}
@@ -219,7 +219,7 @@ export class InstantiationStatusComponent implements OnInit {
}
isHideEnabled(item: ServiceInfoModel):boolean {
- return _.includes([JobStatus.COMPLETED, JobStatus.FAILED, JobStatus.STOPPED, JobStatus.COMPLETED_WITH_ERRORS], item.jobStatus);
+ return _.includes([JobStatus.COMPLETED, JobStatus.FAILED, JobStatus.STOPPED, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.FAILED_AND_PAUSED], item.jobStatus);
}
public onContextMenu($event: MouseEvent, item: any): void {
diff --git a/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts b/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts
index e7eb55d89..900b19e5f 100644
--- a/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts
+++ b/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts
@@ -26,7 +26,8 @@ export enum JobStatus {
COMPLETED_WITH_ERRORS = 'COMPLETED_WITH_ERRORS',
CREATING = 'CREATING',
PAUSE_UPON_COMPLETION = 'PAUSE_UPON_COMPLETION',
- COMPLETED_AND_PAUSED = 'COMPLETED_AND_PAUSED'
+ COMPLETED_AND_PAUSED = 'COMPLETED_AND_PAUSED',
+ FAILED_AND_PAUSED = 'FAILED_AND_PAUSED'
}
export enum PauseStatus {
AFTER_COMPLETION = 'afterCompletion',