summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2020-05-18 10:06:29 +0300
committerEinat Vinouze <einat.vinouze@intl.att.com>2020-05-18 11:28:43 +0300
commitaaec5296d2fa63828c320e4a3fb1e5ed0e168de2 (patch)
tree09ec001b9ee7f7b10f45c51563e99e261192fb6c /vid-webpack-master/src/app
parenta1891033584c124bc6e58676f9109b182707e3e8 (diff)
Add pause icon to the instantiationStatus table
Issue-ID: VID-821 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Change-Id: Idbe53b0d0f3515e5c5321f4631ff45ac459377c6 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app')
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts18
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts4
-rw-r--r--vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts3
3 files changed, 22 insertions, 3 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 eedd46dd3..5d7d89804 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,5 +1,17 @@
import {getTestBed, TestBed} from '@angular/core/testing';
-import {COMPLETED_WITH_ERRORS, INPROGRESS, InstantiationStatusComponentService, PAUSE, PENDING, ServiceStatus, STOPPED, SUCCESS_CIRCLE, UNKNOWN, X_O} from './instantiationStatus.component.service';
+import {
+ COMPLETED_WITH_ERRORS,
+ INPROGRESS,
+ InstantiationStatusComponentService,
+ PAUSE,
+ PAUSE_UPON_COMPLETION,
+ PENDING,
+ ServiceStatus,
+ STOPPED,
+ SUCCESS_CIRCLE,
+ UNKNOWN,
+ X_O
+} from './instantiationStatus.component.service';
import {ServiceInfoModel} from '../shared/server/serviceInfo/serviceInfo.model';
import {AaiService} from "../shared/services/aaiService/aai.service";
import {MsoService} from "../shared/services/msoService/mso.service";
@@ -137,6 +149,7 @@ describe('Instantiation Status Service', () => {
'StOpPeD': 'Stopped: Due to previous failure, will not be instantiated.',
'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.',
})) {
test(`getStatusTooltip should return status popover: status=${status}`, () => {
@@ -197,6 +210,9 @@ describe('Instantiation Status Service', () => {
result = service.getStatus('UNEXPECTED_RANDOM_STATUS');
expect(result.iconClassName).toEqual(UNKNOWN);
+ result = service.getStatus('COMPLETED_AND_PAUSED');
+ expect(result.iconClassName).toEqual(PAUSE_UPON_COMPLETION);
+
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 a6445193c..e59c16a3a 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
@@ -22,6 +22,7 @@ export let X_O : string = "x-circle-o";
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 UNKNOWN : string = "question-mark-circle-o";
@@ -168,7 +169,8 @@ export class InstantiationStatusComponentService {
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.');
-
+ 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.' );
default:
return new ServiceStatus(UNKNOWN, 'primary', `Unexpected status: "${status}"`);
}
diff --git a/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts b/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts
index 808c3df7a..e029f48f9 100644
--- a/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts
+++ b/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts
@@ -24,7 +24,8 @@ export enum JobStatus {
PENDING = 'PENDING',
STOPPED = 'STOPPED',
COMPLETED_WITH_ERRORS = 'COMPLETED_WITH_ERRORS',
- CREATING = 'CREATING'
+ CREATING = 'CREATING',
+ PAUSE_UPON_COMPLETION = 'PAUSE_UPON_COMPLETION'
}
export enum PauseStatus {
AFTER_COMPLETION = 'afterCompletion',