Skip to content

Commit 60c2bf6

Browse files
authored
v3.0.7 - Merge pull request #301 from flask-dashboard/development
2 parents 7bc7296 + 60afa3f commit 60c2bf6

21 files changed

+67
-35
lines changed

docs/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
This project adheres to `Semantic Versioning <http://semver.org/>`_.
66
Please note that the changes before version 1.10.0 have not been documented.
77

8+
v3.0.7
9+
----------
10+
Changed
11+
- Added a first version of the Reporting functionality
12+
- Improved usability of the overview table
13+
- Fixed issue #`295` <https://github.com/flask-dashboard/Flask-MonitoringDashboard/issues/295>`_.
14+
15+
816
v3.0.6
917
----------
1018
Changed

docs/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ The line should then be:
3939

4040
.. code-block:: python
4141
42-
dashboard.config.init_from(envvar='DASHBOARD_CONFIG')
42+
dashboard.config.init_from(envvar='FLASK_MONITORING_DASHBOARD_CONFIG')
4343
44-
This will configure the Dashboard based on the file provided in the environment variable called `DASHBOARD_CONFIG`.
44+
This will configure the Dashboard based on the file provided in the environment variable called `FLASK_MONITORING_DASHBOARD_CONFIG`.
4545

4646
The content of the configuration file
4747
-------------------------------------

docs/contact.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Currently, the team consists of three active developers:
2626
+------------+----------------------------------------------------------------------+
2727

2828
.. |Picture1| image:: https://avatars2.githubusercontent.com/u/17162650?s=460&v=4
29-
..:width: 100px
29+
..:width: 100px
3030

3131
.. |Picture2| image:: https://avatars2.githubusercontent.com/u/7281856?s=400&v=4
32-
..:width: 100px
32+
..:width: 100px
3333

3434
.. |Picture3| image:: https://avatars3.githubusercontent.com/u/17165311?s=400&v=4
35-
..:width: 100px
35+
..:width: 100px
3636

3737

3838
Found a bug?

docs/functionality.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ at least 1) in the application can be found under the **Dashboard** menu:
214214
requests for that endpoint. This provides information whether certain endpoints perform better (in terms of
215215
execution time) than other endpoints.
216216

217+
6. **Reporting:** A more experimental feature which aims to automatically
218+
detect and report changes in performance for various intervals
219+
(e.g. today vs. yesterday, this week vs. last week, etc).
220+
217221
Endpoint
218222
~~~~~~~~~~~~~~
219223

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.0.6",
2+
"version": "3.0.7",
33
"author": "Patrick Vogel, Bogdan Petre",
44
"email": "flask.monitoringdashboard@gmail.com"
55
}

flask_monitoringdashboard/core/config/parser.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ def parse_version(parser, header, version):
2323
# The file is specified by: 'ref: <location>'
2424
git_file = (open(os.path.join(git, 'HEAD')).read().rsplit(': ', 1)[1]).rstrip()
2525
# read the git-version
26-
version = open(git + '/' + git_file).read()
27-
# cut version to at most 6 chars
28-
return version[:6]
26+
version_file = os.path.join(git , git_file)
27+
if os.path.exists(version_file):
28+
version = open(version_file).read()
29+
# cut version to at most 6 chars
30+
return version[:6]
31+
else:
32+
# Return "dummy" version in case of no git version file found
33+
return version
2934
except IOError:
3035
log("Error reading one of the files to retrieve the current git-version.")
3136
raise

flask_monitoringdashboard/core/profiler/stacktraceProfiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def __init__(self, thread_to_monitor, endpoint, ip, group_by, outlier_profiler=N
3737
self._lines_body = []
3838
self._total = 0
3939
self._outlier_profiler = outlier_profiler
40+
self._status_code = 404
4041

4142
def run(self):
4243
"""

flask_monitoringdashboard/core/reporting/questions/status_code_distribution.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from collections import defaultdict
2-
31
from flask_monitoringdashboard.controllers.requests import get_status_code_frequencies_in_interval
42
from flask_monitoringdashboard.core.reporting.questions.report_question import Answer, ReportQuestion
53
from flask_monitoringdashboard.database import session_scope

flask_monitoringdashboard/database/request.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Contains all functions that access a Request object.
33
"""
44
import time
5-
from random import sample
65

76
from sqlalchemy import and_, func
87

@@ -56,7 +55,7 @@ def add_request(db_session, duration, endpoint_id, ip, group_by, status_code):
5655
status_code=status_code,
5756
)
5857
db_session.add(request)
59-
db_session.flush()
58+
db_session.commit()
6059
return request.id
6160

6261

flask_monitoringdashboard/static/css/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,4 +497,14 @@ footer.sticky-footer {
497497
transform: scaleY(1.0);
498498
-webkit-transform: scaleY(1.0);
499499
}
500+
}
501+
502+
.greenText {color:green;}
503+
.redText {color:red;}
504+
505+
.table_cell_with_error_count:after {
506+
content:attr(error-count);
507+
color: red;
508+
vertical-align: super;
509+
font-size: small;
500510
}

0 commit comments

Comments
 (0)