Async MSO error visibility: let open "retry" from Audit-info 68/100368/2
authorIttay Stern <ittay.stern@att.com>
Thu, 16 Jan 2020 11:30:34 +0000 (13:30 +0200)
committerIttay Stern <ittay.stern@att.com>
Thu, 16 Jan 2020 13:24:14 +0000 (15:24 +0200)
On the "audit info" modal (available on Instantiation Status page), show
a link navigating to read-only RETRY page with more audit info.

Issue-ID: VID-749

Change-Id: I070336059859668292af31c187a7672c68962832
Signed-off-by: Ittay Stern <ittay.stern@att.com>
features.properties.md
vid-app-common/src/main/java/org/onap/vid/properties/Features.java
vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.html
vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts
vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts

index e464583..f5e1113 100644 (file)
   when flag is true and max_instances is not declare than user can add unlimited VND, NETWORK, VFMODULE,
   User can duplicate up to 10 record in single time.
   If the flag is false and max_instances is not declare the max will be 1 else max_instances value.
+
+* FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO
+  On the "audit info" modal (available on Instantiation Status page), shows a link navigating to
+  the read-only RETRY page with more audit info.
+  
\ No newline at end of file
index 8a944a9..74f7d4e 100644 (file)
@@ -83,6 +83,7 @@ public enum Features implements Feature {
     FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE,
     FLAG_2004_INSTANTIATION_TEMPLATES_POPUP,
     FLAG_2002_UNLIMITED_MAX,
+    FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO,
 
     ;
 
index 5145784..3dff92c 100644 (file)
           </div>
         </div>
         <div class="col-md-8 right-panel">
-          <div class="row" *ngIf="showVidStatus"><span class="table-title">VID status</span></div>
+          <div class="row" *ngIf="showVidStatus">
+            <div class="col-md-6 leftColumn"><span class="table-title">VID status</span></div>
+            <div class="col-md-6 rightColumn"><span *ngIf="showMoreAuditInfoLink">
+                <a id="full_screen_link" target="_parent" title="Full-screen audit info" [href]="readOnlyRetryUrl()">
+                  <i class="fa fa-external-link"></i>
+                </a>
+            </span></div>
+          </div>
           <div class="row" *ngIf="showVidStatus">
             <table id="service-instantiation-audit-info-vid"  class="table table-bordered">
               <thead class="thead-dark">
index 665b8d1..3a7f4ec 100644 (file)
@@ -10,6 +10,7 @@ import {IframeService} from "../../utils/iframe.service";
 import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../store/reducers";
 import {AuditInfoModalComponentService} from "./auditInfoModal.component.service";
+import {FeatureFlagsService, Features} from "../../services/featureFlag/feature-flags.service";
 
 @Component({
   selector: 'audit-info-modal',
@@ -24,6 +25,8 @@ export class AuditInfoModalComponent {
   modelInfoItems: ModelInformationItem[] = [];
   serviceModel: ServiceModel;
   serviceModelName: string;
+  serviceModelId: string;
+  jobId: string;
   vidInfoData: AuditStatus[] = [];
   msoInfoData: AuditStatus[] = [];
   isAlaCarte: boolean;
@@ -32,15 +35,18 @@ export class AuditInfoModalComponent {
   model: any;
   instanceId: string;
   isALaCarteFlagOn: boolean;
+  showMoreAuditInfoLink: boolean;
   type : string = "Service";
   showVidStatus : boolean = true;
   auditInfoModalComponentService : AuditInfoModalComponentService;
   constructor(private _serviceInfoService: ServiceInfoService, private _iframeService : IframeService,
               private _auditInfoModalComponentService : AuditInfoModalComponentService,
+              private _featureFlagsService: FeatureFlagsService,
               private store: NgRedux<AppState>) {
     this.auditInfoModalComponentService = this._auditInfoModalComponentService;
     AuditInfoModalComponent.openModal.subscribe((jobData: ServiceInfoModel) => {
       this.isALaCarteFlagOn = this.store.getState().global.flags['FLAG_A_LA_CARTE_AUDIT_INFO'];
+      this.showMoreAuditInfoLink = _featureFlagsService.getFlagState(Features.FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO);
       this.initializeProperties();
       this.showVidStatus = true;
       if (jobData) {
@@ -48,6 +54,8 @@ export class AuditInfoModalComponent {
         this.openAuditInfoModal(jobData);
         _iframeService.addClassOpenModal(this.parentElementClassName);
         this.serviceModelName = jobData.serviceModelName ? jobData.serviceModelName : '';
+        this.serviceModelId = jobData.serviceModelId;
+        this.jobId = jobData.jobId;
         this.auditInfoModal.show();
       } else {
         _iframeService.removeClassCloseModal(this.parentElementClassName);
@@ -57,6 +65,7 @@ export class AuditInfoModalComponent {
 
     AuditInfoModalComponent.openInstanceAuditInfoModal.subscribe(({instanceId  , type ,  model, instance}) => {
       this.showVidStatus = false;
+      this.showMoreAuditInfoLink = false;
       this.initializeProperties();
       this.setModalTitles(type);
       this.serviceModelName = AuditInfoModalComponentService.getInstanceModelName(model);
@@ -118,5 +127,8 @@ export class AuditInfoModalComponent {
   onNavigate(){
     window.open("http://ecompguide.web.att.com:8000/#ecomp_ug/c_ecomp_ops_vid.htmll#r_ecomp_ops_vid_bbglossary", "_blank");
   }
+
+  readOnlyRetryUrl = (): string =>
+    `../../serviceModels.htm?more#/servicePlanning/RETRY?serviceModelId=${this.serviceModelId}&jobId=${this.jobId}`
 }
 
index 54fdc0c..19a3fc7 100644 (file)
@@ -15,6 +15,7 @@ export enum Features {
   FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS ='FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS',
   FLAG_2004_INSTANTIATION_STATUS_FILTER ='FLAG_2004_INSTANTIATION_STATUS_FILTER',
   FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE = 'FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE',
+  FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO = 'FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO',
   FLAG_2004_INSTANTIATION_TEMPLATES_POPUP = 'FLAG_2004_INSTANTIATION_TEMPLATES_POPUP'
 }