Skip to content

Commit dcf84a8

Browse files
drillDownTarget support (moving to another dashboard)
1 parent 04d2e85 commit dcf84a8

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

example/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
MDX2JSONSource: "http://localhost:57772/SAMPLES", // MDX2JSON server address
9191
basicMDX: typeof req === "object" ? req.basicMDX : req
9292
}
93+
//, drillDownTarget: "<dashboard name>" - undocumented, deepSee only
9394
};
9495

9596
if (req.DrillDownExpression) { // set custom DrillDown on variant 10

export/LightPivotTable.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
<Class name="DeepSee.LightPivotTable">
1313
<Super>%DeepSee.Component.Portlet.abstractPortlet</Super>
14-
<TimeChanged>63520,75672.654316</TimeChanged>
14+
<TimeChanged>63521,5059.885023</TimeChanged>
1515
<TimeCreated>63515,61322.546099</TimeCreated>
1616

1717
<Parameter name="INCLUDEFILES">
1818
<Default>style:DeepSeeLightPivotTable.css,script:DeepSeeLightPivotTable.js</Default>
1919
</Parameter>
2020

21+
<Property name="DataSource">
22+
<Type>%String</Type>
23+
</Property>
24+
2125
<Method name="%OnGetPortletName">
2226
<ClassMethod>1</ClassMethod>
2327
<ReturnType>%String</ReturnType>
@@ -162,14 +166,15 @@
162166
}
163167
}
164168
//console.log(info);
165-
//console.log(_.getConnectedController());
169+
//console.log(AA = _.getConnectedController());
166170
setup = {
167171
container: container,
168172
dataSource: {
169173
MDX2JSONSource: source,
170174
basicMDX: info["mdx"]
171175
}
172176
}
177+
if (info["drillDownDataSource"]) setup["drillDownTarget"] = info["drillDownDataSource"];
173178
post(source + "/DataSource", { DataSource: info["dataSource"] }, function (data) {
174179
175180
//console.log(data);
@@ -192,8 +197,10 @@
192197
<Implementation><![CDATA[
193198
set ..renderFlag = ..renderFlag + 1
194199
200+
set ..DataSource = $get(..settings("dataSource"))
201+
195202
&html<
196-
<div data-source="#(..settings("dataSource"))#" class="lpt-container" style="position: absolute; left: 0; bottom: 0; width: 100%; height: 100%;">
203+
<div data-source="#(..DataSource)#" class="lpt-container" style="position: absolute; left: 0; bottom: 0; width: 100%; height: 100%;">
197204
198205
</div>
199206
>

source/js/PivotView.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,13 @@ PivotView.prototype._cellClickHandler = function (x, y) {
173173
console.warn("Unable to get filters for cell (%d, %d)", x, y);
174174
}
175175

176-
this.controller.showDrillThrough([f1, f2]);
176+
if (this.controller.CONFIG["drillDownTarget"]) {
177+
window.location = location.origin + location.pathname + "?DASHBOARD="
178+
+ encodeURIComponent(this.controller.CONFIG["drillDownTarget"]) + "&SETTINGS=FILTER:"
179+
+ encodeURIComponent(f1 + "~" + f2) + ";";
180+
} else {
181+
this.controller.showDrillThrough([f1, f2]);
182+
}
177183

178184
};
179185

0 commit comments

Comments
 (0)