summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main
diff options
context:
space:
mode:
authorSudarshan Kumar <sudarshan.kumar@att.com>2020-06-23 14:51:04 +0530
committerSudarshan Kumar <sudarshan.kumar@att.com>2020-06-23 14:52:20 +0530
commitccb2b1b2fbaf58a5545f32c86d30778c17c03f6f (patch)
treea8e7d056c11ee3f6d44e4a6a2c4e6e7f69ed6142 /ecomp-sdk/epsdk-app-overlay/src/main
parent66ca6228706979938338a15cd16200e779925b9f (diff)
Report Search,Menu Update,Disable console fixes
Report Search,Menu Update,Disable console fixes Issue-ID: PORTAL-932 Change-Id: I4898cde786ef90828b0999750c34e6e85179c069 Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts16
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts57
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts2
5 files changed, 60 insertions, 19 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
index 84d5b8ac..c6fbc8c4 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
@@ -41,8 +41,11 @@ import { MatTableDataSource } from '@angular/material/table';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { AdminService } from '../admin.service';
-import { NgbModal} from '@ng-bootstrap/ng-bootstrap';
-import { Column, DataTableSettings, ColumnTypes} from 'portalsdk-tag-lib';
+import { NgbModal, ModalDismissReasons, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
+import { InformationModalComponent } from 'src/app/modals/information-modal/information-modal.component';
+import { NewMenuComponent } from './new-menu/new-menu.component';
+import { Column, DataTableSettings, RdpCrudInterface , ColumnTypes} from 'portalsdk-tag-lib';
+import { element } from '@angular/core/src/render3';
import { MenusService } from './menus.service';
@Component({
@@ -69,12 +72,12 @@ export class MenusComponent implements OnInit {
public columns: any = [];
activeStatusOptions = [
- {index: 0, value: 'true', name: 'Y'},
- {index: 1, value: 'false', name: 'N'}
+ {id: '0', name: 'Y'},
+ {id: '1', name: 'N'}
];
separatorStatusOptions = [
- {index: 0, value: 'true', name: 'Y'},
- {index: 1, value: 'false', name: 'N'}
+ {id: '0', name: 'Y'},
+ {id: '1', name: 'N'}
];
functionCDselectData = [];
parentListSelectData = [];
@@ -189,6 +192,7 @@ export class MenusComponent implements OnInit {
this.parentList.push({id: _data[i][0], name: _data[i][1]});
}
console.log("Actual parent list : ", this.parentList);
+ this.menuService.getParentList(this.parentList);
}
}, error => {
this.showSpinner = false;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
index aeb8ea49..912b65bb 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
@@ -104,23 +104,32 @@ export class MenusService implements RdpCrudInterface {
data.active = this.updateStatus(data.active);
data.separator = this.updateStatus(data.separator);
let keys = Object.keys(data);
+ let menuCache = this.menu;
keys.forEach(element => {
if (data[element] != null || data[element] != undefined) {
if (element == 'parentId') {
- this.menu[element] = 1;
+ if (isNaN(data[element])) {
+ menuCache[element] = this.updateParentNameToID(data[element]);
+ } else{
+ menuCache[element] = data[element];
+ }
+ console.log("Parent Id to update : ", menuCache[element]);
} else {
- this.menu[element] = data[element];
+ menuCache[element] = data[element];
}
}
});
- let result = { availableFnMenuItem: this.menu };
+ let result = { availableFnMenuItem: menuCache };
let postData = JSON.stringify(result);
console.log("postData >>>>>>", postData);
this.adminService.updateFnMenuItem(postData)
.subscribe(_data => {
+ console.log("Response : ", _data);
this.statusResponse.next("200");
+ menuCache = this.menu;
}, error => {
console.log("Error : ", error);
+ menuCache = this.menu;
});
}
@@ -130,11 +139,10 @@ export class MenusService implements RdpCrudInterface {
console.log(data.active);
data.active = this.updateStatus(data.active);
data.separator = this.updateStatus(data.separator);
- let result = { availableFnMenuItem: data };
- this.adminService.deleteMenu(result).subscribe(response => {
+ this.adminService.deleteMenu(data).subscribe(response => {
console.log("Response ", response);
this.statusResponse.next("200");
- }, error =>{
+ }, error => {
console.log("Error : ", error);
})
}
@@ -147,15 +155,44 @@ export class MenusService implements RdpCrudInterface {
}
}
+ private updateBooleanValue(data) {
+ if (data) {
+ return 'Y';
+ } else {
+ return 'N';
+ }
+ }
+
+ parentList: any;
+
+ getParentList(list) {
+ this.parentList = list;
+ }
+
+ private updateParentNameToID(data) {
+ let val;
+ this.parentList.forEach(ele => {
+ if (ele['name'] == data) {
+ val = ele['id'];
+ }
+ });
+ console.log("ParentId value ", val);
+ return val;
+ }
+
get() {
- console.log("get method is getting called from AppServie data:: ");
+ console.log("get method is getting called from MenuServie data:: ");
let response = this.adminService.getFnMenuItems();
let resp;
response.subscribe(res => {
- console.log("Get Response : ", res);
resp = res;
- console.log("edited : ",JSON.parse(resp.data).fnMenuItems);
- this.updatedData.next(JSON.parse(resp.data).fnMenuItems);
+ let responseData = JSON.parse(resp.data).fnMenuItems;
+ responseData.forEach(element => {
+ element.active = this.updateBooleanValue(element.active);
+ element.separator = this.updateBooleanValue(element.separator);
+ })
+ this.updatedData.next(responseData);
})
}
+
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts
index 3cd72584..0c1781bc 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts
@@ -12,6 +12,6 @@ export class DashboardReportGridService {
getReportList() : Observable<any>
{
- return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0");
+ return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0&show_all=true");
}
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html
index 0295bdd6..7bb6729d 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html
@@ -84,7 +84,7 @@
[length]="dataSource1?.data.length"
[pageIndex]="0"
[pageSize]="20"
- [pageSizeOptions]="[20]">
+ [pageSizeOptions]="[20,40,60,80,100]">
</mat-paginator>
</div>
</div>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts
index 560bd6e1..aad435f5 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts
@@ -15,6 +15,6 @@ export class ReportListService {
return this._http.get(environment.baseUrl + "/raptor.htm?action=report.delete&c_master=" + reportId);
}
getAllReports():Observable<any>{
- return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0");
+ return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0&show_all=true");
}
}