Skip to content

Commit

Permalink
bugfix config
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingBird95 committed Mar 20, 2018
1 parent 8375ea6 commit 588cedf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Unreleased
----------
Changed

- Fixed bug with configuration

- Added TODO List

- Updated functionality to retrieve the stacktrace of an Outlier
Expand Down
1 change: 1 addition & 0 deletions flask_monitoringdashboard/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def init_from(self, file=None, envvar=None):
file = os.getenv(envvar)
if not file:
print("No configuration file specified. Please do so.")
return

# When collecting unit test performance results, create log file
log_dir = os.getenv('DASHBOARD_LOG_DIR')
Expand Down
2 changes: 1 addition & 1 deletion flask_monitoringdashboard/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_session_id():
# implement here your own custom function
return '12345'

dashboard.config.get_group_by = get_session_id
dashboard.config.init_from()
dashboard.bind(app=app)

@app.route('/')
Expand Down
13 changes: 13 additions & 0 deletions flask_monitoringdashboard/test/test_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import unittest

from flask_monitoringdashboard.test.utils import get_test_app


class TestConfig(unittest.TestCase):

def test_init(self):
"""
Test whether the init_form doesn't break when nothing is specified
"""
import flask_monitoringdashboard as dashboard
dashboard.config.init_from()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def desc():

setuptools.setup(
name="Flask-MonitoringDashboard",
version='1.10.8',
version='1.10.9',
packages=setuptools.find_packages(),
include_package_data=True,
platforms='Any',
Expand Down

0 comments on commit 588cedf

Please sign in to comment.