File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " LightPivotTable" ,
33 "author" : " ZitRo" ,
4- "version" : " 1.3.1 " ,
4+ "version" : " 1.3.2 " ,
55 "description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
66 "main" : " test/testServer.js" ,
77 "repository" : {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Then use global object constructed from <i>LightPivotTable</i>:
3636var setup = { // Object that contain settings. Properties in brackets can be missed.
3737 container: document .getElementById (" pivot" ) // HTMLElement which will contain table.
3838 [, locale: " en" ] // language to use (default: browser default or "en")
39- logs: false , // enable logs
39+ [, logs: false ] // logging disabled by default
4040 , dataSource: {
4141 MDX2JSONSource: " http://localhost:57772/SAMPLES" , // MDX2JSON server address
4242 basicMDX: typeof req === " object" ? req .basicMDX : req
Original file line number Diff line number Diff line change @@ -49,8 +49,12 @@ MDXParser.prototype.prependNonEmpty = function (expression) {
4949MDXParser . prototype . drillDown = function ( mdx , filter , expression ) {
5050
5151 if ( ! filter ) {
52- this . _warnMDX ( mdx , "no filter specified" ) ;
53- return "" ;
52+ if ( / ] \s + O N \s + 1 / . test ( mdx ) ) {
53+ return mdx = mdx . replace ( / ] \s + O N \s + 1 / , "].children ON 1" ) ;
54+ } else {
55+ this . _warnMDX ( mdx , "no filter specified" ) ;
56+ return "" ;
57+ }
5458 }
5559
5660 var parts = mdx . split ( / ( s e l e c t \s * ) ( .* ?) ( \s * f r o m ) / ig) ; // split by SELECT queries
@@ -133,6 +137,6 @@ MDXParser.prototype.mdxType = function (mdx) {
133137 */
134138MDXParser . prototype . applyFilter = function ( basicMDX , filterSpec ) {
135139
136- return basicMDX + " %FILTER " + filterSpec ;
140+ return basicMDX + ( filterSpec ? " %FILTER " + filterSpec : "" ) ;
137141
138142} ;
You can’t perform that action at this time.
0 commit comments