diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-07-07 19:23:03 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-07-08 16:13:43 +0300 |
commit | f792671ae247a931f34d902e9276202b5016ef9a (patch) | |
tree | 6104971e8074c9a3d720836276ff18619719ec02 /vid-webpack-master/src/app/shared/components/searchMembersModal/search-members-modal.component.ts | |
parent | fc62274e8d15964d63c62bf0e2f4abc040252ee9 (diff) |
Merge from ecomp 718fd196 - Modern UI
Issue-ID: VID-378
Change-Id: I2736b98426e324ec3aa233b034229ba84d99839f
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/searchMembersModal/search-members-modal.component.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/searchMembersModal/search-members-modal.component.ts | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/vid-webpack-master/src/app/shared/components/searchMembersModal/search-members-modal.component.ts b/vid-webpack-master/src/app/shared/components/searchMembersModal/search-members-modal.component.ts deleted file mode 100644 index 9c65d222d..000000000 --- a/vid-webpack-master/src/app/shared/components/searchMembersModal/search-members-modal.component.ts +++ /dev/null @@ -1,82 +0,0 @@ -import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; -import {DialogComponent, DialogService} from "ng2-bootstrap-modal"; -import {IframeService} from "../../utils/iframe.service"; -import {AaiService} from "../../services/aaiService/aai.service"; -import {VnfMember} from "../../models/VnfMember"; -import {VnfGroupModel} from "../../models/vnfGroupModel"; -import {MembersTableService} from "./members-table/members-table.service"; -import {VnfGroupInstance} from "../../models/vnfGroupInstance"; - - -export interface PopupModel { - title: string; - serviceModelId : string; - searchFields: ISearchField[]; - description : string; - subscriberId: string, - serviceType: string, - node: VnfGroupInstance, - vnfGroupModel: VnfGroupModel; - -} - -export interface ISearchField { - title: string; - value: any; - dataTestId: string; -} - -@Component({ - selector : 'search-members-modal', - templateUrl : 'search-members-modal.component.html', - styleUrls : ['search-members-modal.component.scss'] -}) - -export class SearchMembersModalComponent extends DialogComponent<PopupModel, boolean> implements OnInit, OnDestroy { - title: string; - serviceModelId : string; - parentElementClassName = 'content'; - membersData: VnfMember[]; - description : string; - searchFields: ISearchField[]; - vnfGroupModel: VnfGroupModel; - subscriberId: string; - serviceType: string; - node: VnfGroupInstance; - disableSetMembers: boolean = true; - constructor(dialogService: DialogService , - private _iframeService : IframeService, - private _aaiService : AaiService, - private _membersTableService: MembersTableService){ - super(dialogService); - - } - @ViewChild('MembersTableComponent') membersTable; - - ngOnInit() : void{ - this._aaiService.getOptionalGroupMembers(this.serviceModelId, this.subscriberId, this.serviceType, (Object.values(this.vnfGroupModel.members))[0].sourceModelInvariant, this.vnfGroupModel.properties.type, this.vnfGroupModel.properties.role) - .subscribe((result: VnfMember[])=>{ - this.membersData = this._membersTableService.filterUsedVnfMembers(this.serviceModelId, result); - }); - }; - - - closeDialog() : void{ - this._iframeService.removeClassCloseModal(this.parentElementClassName); - this.dialogService.removeDialog(this); - setTimeout(() => { - window.parent.postMessage("closeIframe", "*"); - }, 15); - } - selectedMembersAmountChange(selectedMembersAmount: number) : void { - this.disableSetMembers = selectedMembersAmount==0; - } - - - setMembers() : void { - this._membersTableService.setMembers({serviceId : this.serviceModelId, vnfGroupStoreKey : this.node.vnfGroupStoreKey}); - this.closeDialog(); - } -} - - |