File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " LightPivotTable" ,
3
3
"author" : " ZitRo" ,
4
- "version" : " 1.3.1 " ,
4
+ "version" : " 1.3.2 " ,
5
5
"description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
6
6
"main" : " test/testServer.js" ,
7
7
"repository" : {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Then use global object constructed from <i>LightPivotTable</i>:
36
36
var setup = { // Object that contain settings. Properties in brackets can be missed.
37
37
container: document .getElementById (" pivot" ) // HTMLElement which will contain table.
38
38
[, locale: " en" ] // language to use (default: browser default or "en")
39
- logs: false , // enable logs
39
+ [, logs: false ] // logging disabled by default
40
40
, dataSource: {
41
41
MDX2JSONSource: " http://localhost:57772/SAMPLES" , // MDX2JSON server address
42
42
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) {
49
49
MDXParser . prototype . drillDown = function ( mdx , filter , expression ) {
50
50
51
51
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
+ }
54
58
}
55
59
56
60
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) {
133
137
*/
134
138
MDXParser . prototype . applyFilter = function ( basicMDX , filterSpec ) {
135
139
136
- return basicMDX + " %FILTER " + filterSpec ;
140
+ return basicMDX + ( filterSpec ? " %FILTER " + filterSpec : "" ) ;
137
141
138
142
} ;
You can’t perform that action at this time.
0 commit comments