Skip to content

Commit b8f5847

Browse files
committed
[KNOWAGE-9309] fix missing parameter in the title in COCKPIT export
1 parent 6d2a117 commit b8f5847

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

knowage-excel-export/src/main/java/it/eng/knowage/engine/api/excel/export/oldcockpit/exporters/CrossTabExporter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public class CrossTabExporter extends GenericWidgetExporter implements IWidgetEx
8383
private Properties properties;
8484
private Map<String, List<Threshold>> thresholdColorsMap;
8585
private JSONObject variables = new JSONObject();
86-
Map<String, Map<String, Object>> driversMap;
8786

8887
protected Map<Integer, XSSFCellStyle> formatHash2CellStyle = new HashMap<>();
8988

@@ -731,7 +730,7 @@ public int export() {
731730
JSONObject template = new JSONObject(templateString);
732731
JSONObject widget = getWidgetById(template, widgetId);
733732
String widgetName = getWidgetName(widget);
734-
widgetName = replacePlaceholderIfPresent(widgetName, driversMap);
733+
widgetName = replacePlaceholderIfPresent(widgetName);
735734

736735
JSONObject crosstabDefinition = optionsObj.getJSONObject("crosstabDefinition");
737736
CrossTab cs = buildCrossTab(crosstabDefinition);

knowage-excel-export/src/main/java/it/eng/knowage/engine/api/excel/export/oldcockpit/exporters/GenericWidgetExporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public int export() {
6262
JSONObject template = new JSONObject(templateString);
6363
JSONObject widget = getWidgetById(template, widgetId);
6464
String widgetName = getWidgetName(widget);
65-
widgetName = replacePlaceholderIfPresent(widgetName, driversMap);
65+
widgetName = replacePlaceholderIfPresent(widgetName);
6666

6767
JSONObject dataStore = excelExporter.getDataStoreForWidget(template, widget);
6868
if (dataStore != null) {
@@ -136,7 +136,7 @@ protected JSONObject getWidgetById(JSONObject template, long widgetId) {
136136
throw new SpagoBIRuntimeException("Unable to find widget with id [" + widgetId + "] in template");
137137
}
138138

139-
protected String replacePlaceholderIfPresent(String widgetName, Map<String, Map<String, Object>> driversMap) {
139+
protected String replacePlaceholderIfPresent(String widgetName) {
140140
if (widgetName.contains("$P{")) {
141141
String placeholder = widgetName.substring(widgetName.indexOf("$P{") + 3, widgetName.indexOf("}"));
142142
if (driversMap.containsKey(placeholder)) {

knowage-excel-export/src/main/java/it/eng/knowage/engine/api/excel/export/oldcockpit/exporters/MapExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public int export() {
4040
JSONObject template = new JSONObject(templateString);
4141
JSONObject widget = getWidgetById(template, widgetId);
4242
String widgetName = getWidgetName(widget);
43-
widgetName = replacePlaceholderIfPresent(widgetName, driversMap);
43+
widgetName = replacePlaceholderIfPresent(widgetName);
4444

4545
JSONArray dataStoreArray = excelExporter.getMultiDataStoreForWidget(template, widget);
4646
for (int i = 0; i < dataStoreArray.length(); i++) {

knowage-excel-export/src/main/java/it/eng/knowage/engine/api/excel/export/oldcockpit/exporters/TableExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public int export() {
4141
JSONObject widget = getWidgetById(template, widgetId);
4242
JSONObject settings = widget.getJSONObject("settings");
4343
String widgetName = getWidgetName(widget);
44-
widgetName = replacePlaceholderIfPresent(widgetName, driversMap);
44+
widgetName = replacePlaceholderIfPresent(widgetName);
4545
String cockpitSheetName = getCockpitSheetName(template, widgetId);
4646
Sheet sheet = excelExporter.createUniqueSafeSheet(wb, widgetName, cockpitSheetName);
4747

0 commit comments

Comments
 (0)