summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2018-08-29 17:01:32 +0300
committerIttay Stern <ittay.stern@att.com>2019-02-18 18:35:30 +0200
commit6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 (patch)
tree936005c364dc5a7264d6304d4777c3d83494db22 /vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts
parent67d99f816cc583643c35193197594cf78d8ce60a (diff)
merge from ecomp a88f0072 - Modern UI
Issue-ID: VID-378 Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts')
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts83
1 files changed, 0 insertions, 83 deletions
diff --git a/vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts b/vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts
deleted file mode 100644
index 1cff97f5b..000000000
--- a/vid-webpack-master/src/app/instantiationStatus/auditInfoModal/auditInfoModal.component.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-import {Component, ViewChild} from '@angular/core';
-import {Subject} from 'rxjs/Subject';
-import {ModalDirective} from 'ngx-bootstrap'
-import {Constants} from '../../shared/utils/constants';
-import {ModelInformationItem} from '../../shared/components/model-information/model-information.component';
-import {ServiceModel} from '../../shared/models/serviceModel';
-import {ServiceInfoService} from '../../shared/server/serviceInfo/serviceInfo.service';
-import {ServiceInfoModel} from '../../shared/server/serviceInfo/serviceInfo.model';
-import {AuditStatus} from '../../shared/server/serviceInfo/AuditStatus.model';
-import {IframeService} from "../../shared/utils/iframe.service";
-
-@Component({
- selector: 'audit-info-modal',
- templateUrl: './auditInfoModal.component.html',
- styleUrls: ['./auditInfoModal.component.scss']
-})
-export class AuditInfoModalComponent {
- static openModal: Subject<ServiceInfoModel> = new Subject<ServiceInfoModel>();
- @ViewChild('auditInfoModal') public auditInfoModal: ModalDirective;
- title: string = Constants.AuditInfoModal.TITLE;
- modelInfoItems: Array<ModelInformationItem> = [];
- serviceModel: ServiceModel;
- serviceModelName: string;
- vidInfoData: Array<AuditStatus> = [];
- msoInfoData: Array<AuditStatus> = [];
- parentElementClassName = 'content';
- isLoading = true;
-
- constructor(private _serviceInfoService: ServiceInfoService, private _iframeService : IframeService) {
- AuditInfoModalComponent.openModal.subscribe((jobData: ServiceInfoModel) => {
- this.initializeProperties();
- if (jobData) {
- this.openAuditInfoModal(jobData);
- _iframeService.addClassOpenModal(this.parentElementClassName);
- this.serviceModelName = jobData.serviceModelName ? jobData.serviceModelName : '';
- this.auditInfoModal.show();
- } else {
- _iframeService.removeClassCloseModal(this.parentElementClassName);
- this.auditInfoModal.hide();
- }
- })
- }
-
- initializeProperties() : void {
- this.modelInfoItems = null;
- this.vidInfoData = [];
- this.msoInfoData = [];
- this.isLoading = true;
- }
-
- openAuditInfoModal(jobData: ServiceInfoModel): void {
- this.modelInfoItems = this.createModelInformationItems(jobData);
- this.initAuditInfoData(jobData['jobId']);
- this.auditInfoModal.show();
- }
-
- initAuditInfoData(jobId: string) {
- this._serviceInfoService.getJobAuditStatus(jobId)
- .subscribe((res: Array<Array<AuditStatus>>) => {
- this.vidInfoData = res[0];
- this.msoInfoData = res[1];
- this.isLoading = false;
- });
- }
-
- createModelInformationItems(serviceModel: ServiceInfoModel): Array<ModelInformationItem> {
- return [
- new ModelInformationItem('Subscriber name', 'subscriberName', [serviceModel.subscriberName]),
- new ModelInformationItem('Service type', 'serviceType', [serviceModel.serviceType]),
- new ModelInformationItem('Service model version', 'serviceModelVersion', [serviceModel.serviceModelVersion]),
- new ModelInformationItem('Service instance name', 'serviceInstanceName', [serviceModel.serviceInstanceName], '', true),
- new ModelInformationItem('Service instance ID', 'serviceInstanceId', [serviceModel.serviceInstanceId]),
- new ModelInformationItem('Requestor User ID', 'userId', [serviceModel.userId]),
- ];
- }
-
- onCancelClick() {
- this._iframeService.removeClassCloseModal(this.parentElementClassName);
- this.initializeProperties();
- this.auditInfoModal.hide();
- }
-}
-