Commit 06b8ba23 authored by mouadh's avatar mouadh

format

parent 21e7cb50
...@@ -294,7 +294,6 @@ class ConfigParser: ...@@ -294,7 +294,6 @@ class ConfigParser:
except: except:
raise ('Bad configuration in the configuration file') raise ('Bad configuration in the configuration file')
def construct_cubes(self, client_type='excel'): def construct_cubes(self, client_type='excel'):
""" """
Construct cube (with it dimensions) and facts from the config file. Construct cube (with it dimensions) and facts from the config file.
...@@ -311,7 +310,6 @@ class ConfigParser: ...@@ -311,7 +310,6 @@ class ConfigParser:
else: else:
raise ("Config file don't exist") raise ("Config file don't exist")
def _construct_cubes_web(self): def _construct_cubes_web(self):
# try: # try:
...@@ -331,9 +329,8 @@ class ConfigParser: ...@@ -331,9 +329,8 @@ class ConfigParser:
measures=[ measures=[
mes.text for mes in xml_facts.findall('measures/name') mes.text for mes in xml_facts.findall('measures/name')
], ],
columns=xml_facts.find('columns').text.split(',') columns=xml_facts.find('columns').text.split(','))
for xml_facts in tree.xpath('/cubes/cube/facts')
) for xml_facts in tree.xpath('/cubes/cube/facts')
] ]
tables = [ tables = [
...@@ -370,12 +367,12 @@ class ConfigParser: ...@@ -370,12 +367,12 @@ class ConfigParser:
pie_charts=dashboard.find('PieCharts').text.split(','), pie_charts=dashboard.find('PieCharts').text.split(','),
bar_chats=dashboard.find('BarCharts').text.split(','), bar_chats=dashboard.find('BarCharts').text.split(','),
line_chart={ line_chart={
table.find('name').text: ( table.find('name').text:
table.find('columns').text.split(',') if table.find('columns') is not None else 'ALL') for table in (table.find('columns').text.split(',')
dashboard.findall('LineCharts/table') if table.find('columns') is not None else 'ALL')
} for table in dashboard.findall('LineCharts/table')
})
) for dashboard in tree.xpath('/cubes/cube/Dashboards/Dashboard') for dashboard in tree.xpath('/cubes/cube/Dashboards/Dashboard')
] ]
# except: # except:
# raise ('Bad configuration in the configuration file') # raise ('Bad configuration in the configuration file')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment