aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app')
-rw-r--r--vid-webpack-master/src/app/app.routing.ts8
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts56
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html17
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss8
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts12
7 files changed, 63 insertions, 42 deletions
diff --git a/vid-webpack-master/src/app/app.routing.ts b/vid-webpack-master/src/app/app.routing.ts
index 779d17e3c..eaf4e9ca4 100644
--- a/vid-webpack-master/src/app/app.routing.ts
+++ b/vid-webpack-master/src/app/app.routing.ts
@@ -6,12 +6,20 @@ import {SupportComponent} from "./support/support.component";
import {HealthStatusRoutes} from "./healthStatus/health-status.routing";
import {VlanTaggingRoutes} from "./vlanTagging/vlan-tagging.routing";
import {InstantiationStatusRoutes} from "./instantiationStatus/InstantiationStatus.routing";
+import {InstantiationTemplatesModalComponent} from "./shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component";
const routes: Routes = [
...DrawingBoardRoutes,
...HealthStatusRoutes,
...VlanTaggingRoutes,
...InstantiationStatusRoutes,
{
+ path: 'instantiationTemplatesPopup',
+ component: InstantiationTemplatesModalComponent,
+ resolve: {
+ flags: FlagsResolve
+ }
+ },
+ {
path: 'servicePopup',
component: GenericFormPopupComponent,
resolve: {
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
index f9da42607..f9a11eab1 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
@@ -61,7 +61,7 @@
(click)="openTemplateModal()"
><span>Template</span></button>
<button
- *ngIf=isInstantiationStatusFilterFlagOn()
+ *ngIf="isShowPreviousInstantiationBtn"
[attr.data-tests-id]="'ShowPreviousInstancesButton'"
type="button" class="btn btn-success submit"
(click)="formPopupDetails.onOtherAction(formPopupDetails.that, dynamicForm)">
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss
index 5057b44a5..18416dae6 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss
@@ -134,7 +134,7 @@ $grid-border: 1px #d2d2d2 solid;
}
.submit {
- width: 120px;
+ min-width: 120px;
height: 36px;
background: #009fdb;
border-radius: 2px;
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
index 159871f45..3939e44ff 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
@@ -46,6 +46,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
type: PopupType;
uuidData: UUIDData;
showTemplateBtn: boolean = false;
+ isShowPreviousInstantiationBtn: boolean = false;
isUpdateMode: boolean;
node: ITreeNode = null;
hasGeneralApiError: boolean = false;
@@ -85,29 +86,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
.subscribe(params => {
console.log('changed');
if (params['serviceModelId'] && params['isCreate'] == "true") {
- this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
- this.uuidData = <any>{
- bulkSize: 1,
- isMacro: this._store.getState().service.serviceHierarchy[serviceModelId].service.vidNotions.instantiationType === 'Macro',
- type: PopupType.SERVICE,
- serviceId: serviceModelId,
- popupService: this._servicePopupService,
- };
- this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"];
-
- this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
- this.closeDialog(that);
- });
-
- this.formPopupDetails = this.uuidData.popupService.getGenericFormPopupDetails(
- this.uuidData['serviceId'],
- null,
- null,
- this.node,
- this.uuidData,
- false
- );
- });
+ this.onInitForCreateNewServicePopup();
}
});
@@ -125,6 +104,34 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
}
}
+ private onInitForCreateNewServicePopup() {
+ this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
+ this.uuidData = <any>{
+ bulkSize: 1,
+ isMacro: this._store.getState().service.serviceHierarchy[serviceModelId].service.vidNotions.instantiationType === 'Macro',
+ type: PopupType.SERVICE,
+ serviceId: serviceModelId,
+ popupService: this._servicePopupService,
+ };
+ this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"];
+
+ this.isShowPreviousInstantiationBtn = !!this._store.getState().global.flags["FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER"];
+
+ this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
+ this.closeDialog(that);
+ });
+
+ this.formPopupDetails = this.uuidData.popupService.getGenericFormPopupDetails(
+ this.uuidData['serviceId'],
+ null,
+ null,
+ this.node,
+ this.uuidData,
+ false
+ );
+ });
+ }
+
hasSomeError(formPopupDetails: FormPopupDetails, form: FormGroup): boolean {
if (_.isNil(formPopupDetails)) return false;
else {
@@ -148,9 +155,6 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
this._dialogService.addDialog(InstantiationTemplatesModalComponent, {});
}
- isInstantiationStatusFilterFlagOn() {
- return FeatureFlagsService.getFlagState(Features.FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER, this._store);
- }
}
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html
index c231c6081..19f641a56 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html
@@ -23,12 +23,15 @@
</div>
</div>
<div class="col-md-6">
- <input
- (keypress)="onFilterKeypress($event)"
- class="filter-input form-control input-text"
- placeholder="Filter...">
+ <div class="col-md-6">
+ </div>
+ <div class="col-md-6">
+ <input
+ class="filter-input form-control input-text"
+ placeholder="Filter..."
+ [(ngModel)]="filterText">
+ </div>
</div>
-
</div>
<div class="row" style="margin-left: 0;margin-right: 0;padding: 20px;">
<table id="member-table" class="table table-bordered" style="table-layout: fixed">
@@ -37,7 +40,7 @@
<th class="header-title" id="header-userId">User ID</th>
<th class="header-title" id="header-createDate" style="width: 21ch;">Date</th>
<th class="header-title" id="header-instanceName" style="max-width: 50ch;">Instance Name</th>
- <th class="header-title" id="header-instantiationStatus">Instantiation Status</th>
+ <th class="header-title" id="header-instantiationStatus" style="width: 30ch;">Instantiation Status</th>
<th class="header-title" id="header-summary">Summary</th>
<th class="header-title" id="header-region">Region</th>
<th class="header-title" id="header-tenant">Tenant</th>
@@ -46,7 +49,7 @@
</thead>
<tbody>
<tr class="member-table-row"
- *ngFor="let item of filterTableData;"
+ *ngFor="let item of filterTableData | searchFilter: filterText ;"
(click)="selectedJobId = item.jobId"
[ngClass]="{'selected' : selectedJobId === item.jobId}"
[attr.data-tests-id]="'row-' + item.jobId">
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss
index ef8d01a75..267d2cee0 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss
@@ -166,7 +166,11 @@ $grid-border: 1px #d2d2d2 solid;
.filter-input {
float: right;
- width: 25%;
+ width: 50%;
+ }
+
+ .details-item {
+ text-align: right;
}
@@ -187,6 +191,6 @@ $grid-border: 1px #d2d2d2 solid;
}
.member-table-row.selected {
- background: #009fdbb5 !important;
+ background: #8080808f !important;
}
}
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
index 56abe5b4c..4d89750f9 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
@@ -18,6 +18,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
templateModalComponentService: InstantiationTemplatesModalService;
originalTableData: InstantiationTemplatesRowModel[] = [];
filterTableData : InstantiationTemplatesRowModel[] = [];
+ filterText: string;
constructor(dialogService: DialogService,
private _iframeService: IframeService,
@@ -29,6 +30,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
}
ngOnInit(): void {
+ this.filterText = '';
this._route
.queryParams
.subscribe(params => {
@@ -44,12 +46,12 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
};
- onFilterKeypress = (event : KeyboardEvent) => {
- //event.target.value
- console.log(event.altKey);
- };
-
closeModal(): void {
+ this._iframeService.removeClassCloseModal('content');
this.dialogService.removeDialog(this);
+ setTimeout(() => {
+ window.parent.postMessage("closeIframe", "*");
+ }, 15);
+
}
}