remove "Previous instantiotion" button from service popup. 13/100313/1
authorAlexey Sandler <alexey.sandler@intl.att.com>
Wed, 15 Jan 2020 12:19:08 +0000 (14:19 +0200)
committerAlexey Sandler <alexey.sandler@intl.att.com>
Wed, 15 Jan 2020 12:19:08 +0000 (14:19 +0200)
aditional code has been removed
Issue-ID: VID-739
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: Ifbd3491add8f25d951dfe17ce50ac6be3dfae65f

vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.ts
vid-webpack-master/src/app/shared/models/formControlModels/formPopupDetails.model.ts

index a6f6cc6..e922853 100755 (executable)
@@ -75,10 +75,6 @@ var creationDialogController = function (COMPONENT, FIELD, PARAMETER, $scope, $h
             {
                 $location.path('/servicePlanning').search({serviceModelId: event.data.data.serviceModelId});
             }
-        } else if (event.data.eventId == 'showPreviousInstantiations') {
-            {
-                $location.path('/instantiationStatus').search({filterText: event.data.data.serviceModelId});
-            }
         }
         $scope.$apply();
     }
index 6d99693..13b72f0 100644 (file)
@@ -2142,33 +2142,6 @@ describe('Service popup service', () => {
     expect(service.closeDialogEvent.next).toHaveBeenCalledWith(that);
   });
 
-  test('showPreviousInstantiations should trigger postMessage', () => {
-    let that = <any>{
-      parentElementClassName: 'content',
-      _iframeService: iframeService,
-      resetPopupData : () =>{      },
-      serviceModel:{
-        uuid:'1111'
-      }
-
-    };
-
-    let expectedMessage= {
-      eventId: 'showPreviousInstantiations',
-      data: {
-        serviceModelId: that.serviceModel.uuid
-      }
-    };
-
-    jest.spyOn(window.parent, 'postMessage');
-
-    service.showPreviousInstantiations(that, fb.group({}));
-
-    expect( window.parent.postMessage).toHaveBeenCalledWith(expectedMessage,"*")
-
-  });
-
-
 
   test('getDynamicInputs should return list of controls' ,() => {
     const result:  FormControlModel[] = service.getDynamicInputs('6b528779-44a3-4472-bdff-9cd15ec93450');
index d25ab2c..588d234 100644 (file)
@@ -61,9 +61,6 @@ export class ServicePopupService implements GenericPopupInterface {
       (that, form: FormGroup) => {that.onSubmit(that, form);},
       (that: any, form: FormGroup) => {
         that.onCancel(that, form);
-      },
-      (that: any, form: FormGroup) => {
-        that.showPreviousInstantiations(that, form);
       }
     );
   }
@@ -133,12 +130,6 @@ export class ServicePopupService implements GenericPopupInterface {
     this.onCancel(that, form);
   }
 
-  showPreviousInstantiations(that, form: FormGroup,): void {
-    const eventId = 'showPreviousInstantiations';
-    this.postMessageToWindowParent(eventId, that.serviceModel.uuid);
-    this.onCancel(that, form);
-  }
-
   private postMessageToWindowParent(eventId: string, serviceModelId:string) {
     window.parent.postMessage({
       eventId: eventId,
index 40d74d6..36704e2 100644 (file)
@@ -14,8 +14,6 @@ export class FormPopupDetails {
   modelInformationItems: ModelInformationItem[];
   onSubmit : (that : any, form: FormGroup , ...args) =>  void;
   onCancel : (that : any, form: FormGroup) => void;
-  onOtherAction: (that: any, form: FormGroup) => void;
-
 
   constructor(that : any,
               popupTypeName : PopupType ,
@@ -27,8 +25,7 @@ export class FormPopupDetails {
               dynamicInputsControlList : FormControlModel[],
               modelInformationItems : ModelInformationItem[],
               onSubmit : (that : any, form : FormGroup, ...args) =>  void,
-              onCancel: (that: any, form: FormGroup) => void,
-              onOtherAction?: (that: any, form: FormGroup) => void) {
+              onCancel: (that: any, form: FormGroup) => void) {
     this.title = title;
     this.leftSubTitle = leftSubTitle;
     this.rightSubTitle = rightSubTitle;
@@ -37,7 +34,6 @@ export class FormPopupDetails {
     this.modelInformationItems = modelInformationItems;
     this.onSubmit = onSubmit;
     this.onCancel = onCancel;
-    this.onOtherAction = onOtherAction;
     this.popupTypeName = popupTypeName;
     this.UUIDData = UUIDData;
     this.that = that;