gamma-app-controller 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/application-controller/application-dataset-component/create-dataset/create-dataset.component.mjs +2 -2
- package/esm2020/lib/application-controller/application-view-components/create-comp-view/create-comp-view.component.mjs +4 -2
- package/esm2020/lib/application-controller/page-controller/page-config/page-config.component.mjs +1 -26
- package/esm2020/lib/shared/advanced-component/gamma-table-with-percentage/gamma-table-with-percentage.component.mjs +2 -1
- package/esm2020/lib/shared/template-dataset-call-service.mjs +10 -3
- package/fesm2015/gamma-app-controller.mjs +16 -29
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +14 -29
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -9359,7 +9359,9 @@ class CreateCompViewComponent {
|
|
|
9359
9359
|
this.createViewConfig(data);
|
|
9360
9360
|
}
|
|
9361
9361
|
createViewConfig(data) {
|
|
9362
|
-
|
|
9362
|
+
if (data?.kpiConfig?.dataSource) {
|
|
9363
|
+
delete data.kpiConfig.dataSource;
|
|
9364
|
+
}
|
|
9363
9365
|
this.creatCompViewObject['datasetId'] = data['datasetId'];
|
|
9364
9366
|
this.creatCompViewObject['viewType'] = this.selectedViewType;
|
|
9365
9367
|
this.isLoader = true;
|
|
@@ -10351,6 +10353,7 @@ class GammaTableWithPercentageComponent {
|
|
|
10351
10353
|
return;
|
|
10352
10354
|
}
|
|
10353
10355
|
else {
|
|
10356
|
+
debugger;
|
|
10354
10357
|
this.isLoader = true;
|
|
10355
10358
|
this.page_config = value;
|
|
10356
10359
|
this.page_parms = value.titleParams;
|
|
@@ -12056,7 +12059,7 @@ class CreateDatasetComponent {
|
|
|
12056
12059
|
"datasetName": "",
|
|
12057
12060
|
"datasetType": ""
|
|
12058
12061
|
};
|
|
12059
|
-
this.dataSetTypeContainer = [{ name: "Query Builder", value: "querybuilder" },
|
|
12062
|
+
this.dataSetTypeContainer = [{ name: "Query Builder", value: "querybuilder" },
|
|
12060
12063
|
{ name: "Rest API", value: "simpleApi" }, { name: "SQL Builder", value: "sqlQuery" }, { name: "Plain JSON", value: "plainjson" }];
|
|
12061
12064
|
this.mongoDataset = {
|
|
12062
12065
|
"api": "/kpi/trends/network/get-metric-data",
|
|
@@ -12902,30 +12905,6 @@ class PageConfigComponent {
|
|
|
12902
12905
|
let index = this.dashBoardWidgetConfig.widgets.findIndex(object => object.widgetId === div.widgetId);
|
|
12903
12906
|
this.insertNewWiget(index);
|
|
12904
12907
|
});
|
|
12905
|
-
const p_del_button = document.createElement('div');
|
|
12906
|
-
p_del_button.innerText = 'Detete layout';
|
|
12907
|
-
p_del_button.classList.add('bg-red-700', "p-1", "w-fit", "cursor-pointer", 'text-xs');
|
|
12908
|
-
p_del_button.addEventListener('click', () => {
|
|
12909
|
-
let result = confirm("<i>Are You Sure?</i>", "Delete Views");
|
|
12910
|
-
result.then((dialogResult) => {
|
|
12911
|
-
if (dialogResult) {
|
|
12912
|
-
this.loadingModal = true;
|
|
12913
|
-
this.dashBoardWidgetConfig.widgets = this.dashBoardWidgetConfig.widgets.map(config => config.widgetId);
|
|
12914
|
-
rowDiv.remove();
|
|
12915
|
-
this.service.editAppPageConfig(this.dashBoardWidgetConfig).subscribe({
|
|
12916
|
-
next: (data) => {
|
|
12917
|
-
this.getAppPageDetailConfigByPageId();
|
|
12918
|
-
}, error: (err) => {
|
|
12919
|
-
this.loadingModal = false;
|
|
12920
|
-
this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Widget Creation');
|
|
12921
|
-
}
|
|
12922
|
-
});
|
|
12923
|
-
this.newWidgetIndex = undefined;
|
|
12924
|
-
this.isWidgetCreationContent = false;
|
|
12925
|
-
this.isDefaultView = true;
|
|
12926
|
-
}
|
|
12927
|
-
});
|
|
12928
|
-
});
|
|
12929
12908
|
const advance_button = document.createElement('div');
|
|
12930
12909
|
advance_button.innerText = 'Add Multiple View';
|
|
12931
12910
|
advance_button.classList.add('bg-yellow-700', "p-1", "w-fit", "cursor-pointer", 'text-xs');
|
|
@@ -12936,7 +12915,6 @@ class PageConfigComponent {
|
|
|
12936
12915
|
});
|
|
12937
12916
|
p_innerDiv.appendChild(advance_button);
|
|
12938
12917
|
p_innerDiv.appendChild(p_button_widget);
|
|
12939
|
-
p_innerDiv.appendChild(p_del_button);
|
|
12940
12918
|
if (!this.isDashBoardContentTypeView) {
|
|
12941
12919
|
rowDiv.appendChild(p_innerDiv);
|
|
12942
12920
|
}
|
|
@@ -18776,8 +18754,15 @@ class TemplateDatasetCallService {
|
|
|
18776
18754
|
const tenantIds = dataset.config.queryConfig.mapedFilters
|
|
18777
18755
|
.filter(f => f.serverColumn === "tenant_id")
|
|
18778
18756
|
.map(f => f.defaultValue);
|
|
18779
|
-
|
|
18780
|
-
const
|
|
18757
|
+
let isMatch;
|
|
18758
|
+
const username = this.securityPrincipal.getPrincipalName();
|
|
18759
|
+
if (username == "admin" || this.securityPrincipal.groupDetails?.includes('pronto-admin-group')) {
|
|
18760
|
+
isMatch = true;
|
|
18761
|
+
}
|
|
18762
|
+
else {
|
|
18763
|
+
const associatedTenants = this.securityPrincipal.getTargetTenantIds();
|
|
18764
|
+
isMatch = (tenantIds) ? (associatedTenants) ? tenantIds.some(t => associatedTenants.includes(t)) : false : true;
|
|
18765
|
+
}
|
|
18781
18766
|
if (!isMatch) {
|
|
18782
18767
|
this.toastr.error("Unauthorized Access");
|
|
18783
18768
|
this.uniqueDataSetObject[datasetId] = [];
|