Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
ab2a5d44
Commit
ab2a5d44
authored
May 19, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
f6879c40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
olapy/core/mdx/executor/execute.py
olapy/core/mdx/executor/execute.py
+8
-6
olapy/core/mdx/tools/config_file_parser.py
olapy/core/mdx/tools/config_file_parser.py
+8
-6
No files found.
olapy/core/mdx/executor/execute.py
View file @
ab2a5d44
...
@@ -136,7 +136,8 @@ class MdxEngine:
...
@@ -136,7 +136,8 @@ class MdxEngine:
config_file_parser
=
ConfigParser
(
self
.
cube_path
)
config_file_parser
=
ConfigParser
(
self
.
cube_path
)
tables
=
{}
tables
=
{}
if
config_file_parser
.
config_file_exist
(
if
config_file_parser
.
config_file_exist
(
)
and
self
.
cube
in
config_file_parser
.
get_cubes_names
()
and
self
.
client
!=
'web'
:
)
and
self
.
cube
in
config_file_parser
.
get_cubes_names
(
)
and
self
.
client
!=
'web'
:
for
cubes
in
config_file_parser
.
construct_cubes
():
for
cubes
in
config_file_parser
.
construct_cubes
():
# TODO working with cubes.source == 'csv'
# TODO working with cubes.source == 'csv'
...
@@ -172,7 +173,8 @@ class MdxEngine:
...
@@ -172,7 +173,8 @@ class MdxEngine:
config_file_parser
=
ConfigParser
(
self
.
cube_path
)
config_file_parser
=
ConfigParser
(
self
.
cube_path
)
if
config_file_parser
.
config_file_exist
(
if
config_file_parser
.
config_file_exist
(
self
.
client
self
.
client
)
and
self
.
cube
in
config_file_parser
.
get_cubes_names
(
client_type
=
'web'
):
)
and
self
.
cube
in
config_file_parser
.
get_cubes_names
(
client_type
=
'web'
):
for
cubes
in
config_file_parser
.
construct_cubes
(
self
.
client
):
for
cubes
in
config_file_parser
.
construct_cubes
(
self
.
client
):
# TODO cubes.source == 'csv'
# TODO cubes.source == 'csv'
if
cubes
.
source
==
'postgres'
:
if
cubes
.
source
==
'postgres'
:
...
...
olapy/core/mdx/tools/config_file_parser.py
View file @
ab2a5d44
...
@@ -220,7 +220,8 @@ class ConfigParser:
...
@@ -220,7 +220,8 @@ class ConfigParser:
:return: True | False
:return: True | False
"""
"""
if
self
.
config_file_exist
():
if
self
.
config_file_exist
():
with
open
(
os
.
path
.
join
(
self
.
cube_path
,
self
.
file_name
))
as
config_file
:
with
open
(
os
.
path
.
join
(
self
.
cube_path
,
self
.
file_name
))
as
config_file
:
parser
=
etree
.
XMLParser
()
parser
=
etree
.
XMLParser
()
tree
=
etree
.
parse
(
config_file
,
parser
)
tree
=
etree
.
parse
(
config_file
,
parser
)
...
@@ -373,7 +374,8 @@ class ConfigParser:
...
@@ -373,7 +374,8 @@ class ConfigParser:
global_table
=
{
global_table
=
{
'columns'
:
'columns'
:
dashboard
.
find
(
'Global_table/columns'
).
text
.
split
(
','
),
dashboard
.
find
(
'Global_table/columns'
).
text
.
split
(
','
),
'rows'
:
dashboard
.
find
(
'Global_table/rows'
).
text
.
split
(
','
)
'rows'
:
dashboard
.
find
(
'Global_table/rows'
).
text
.
split
(
','
)
},
},
pie_charts
=
dashboard
.
find
(
'PieCharts'
).
text
.
split
(
','
),
pie_charts
=
dashboard
.
find
(
'PieCharts'
).
text
.
split
(
','
),
bar_charts
=
dashboard
.
find
(
'BarCharts'
).
text
.
split
(
','
),
bar_charts
=
dashboard
.
find
(
'BarCharts'
).
text
.
split
(
','
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment