Skip to content

Commit f24f066

Browse files
authored
Merge pull request #51 from flask-dashboard/python3.5
Python3.5
2 parents e36a08e + 7212770 commit f24f066

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ You can see the execution time and last access time per endpoint.
99

1010
Also, unit tests can be run by TravisCI and monitored.
1111

12-
IMPORTANT: Since the implementation uses string interpolation, the minimum python version is 3.6 [PEP 498](https://www.python.org/dev/peps/pep-0498/).
12+
Python version
13+
==============
14+
The minimum Python version that we use for this project is Python 3.5.
15+
However, it will also work in Python 3.4, but we do not maintain support for this version.
16+
1317

1418
Installation
1519
============
@@ -102,5 +106,5 @@ This extra method is needed for the logging, and without it, the unit test resul
102106

103107
Screenshots
104108
===========
105-
![Screenshot 1](/images/screenshot1.png)
106-
![Screenshot 2](/images/screenshot2.png)
109+
![Screenshot 1](/docs/img/screenshot1.png)
110+
![Screenshot 2](/docs/img/screenshot2.png)

dashboard/routings/export_data.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
def download_csv():
1818
csv = '"ENDPOINT","EXECUTION_TIME","TIME_OF_EXECUTION","VERSION","GROUP_BY","IP_ADDRESS"\n'
1919
for entry in get_data():
20-
csv += f'"{entry.endpoint}",{entry.execution_time},"{entry.time}","{entry.version}","{entry.group_by}",' \
21-
f'"{entry.ip}"\n'
20+
csv += '"{}",{},"{}","{}","{}","{}"\n'.format(entry.endpoint, entry.execution_time, entry.time, entry.version,
21+
entry.group_by, entry.ip)
2222

2323
response = make_response(csv)
2424
response.headers["Content-Disposition"] = "attachment; filename=measurements_{0}.csv".format(
@@ -32,8 +32,8 @@ def export_data():
3232
csv = ['"ENDPOINT","EXECUTION_TIME","TIME_OF_EXECUTION","VERSION","GROUP_BY","IP_ADDRESS"']
3333
data = get_data()
3434
for entry in data:
35-
csv.append(f'"{entry.endpoint}","{entry.execution_time}","{entry.time}","{entry.version}","{entry.group_by}",'
36-
f'"{entry.ip}"')
35+
csv.append('"{}","{}","{}","{}","{}","{}"'.format(entry.endpoint, entry.execution_time, entry.time,
36+
entry.version, entry.group_by, entry.ip))
3737
return render_template('dashboard/export-data.html', link=config.link, session=session, data=csv)
3838

3939

@@ -99,7 +99,7 @@ def get_json_data_from(security_token: str, time_from: int):
9999
})
100100
return jsonify(data)
101101
except ValueError as e:
102-
return f'ValueError: {e}'
102+
return 'ValueError: {}'.format(e)
103103

104104

105105
@blueprint.route('/get_json_monitor_rules/<security_token>')
@@ -123,4 +123,4 @@ def get_json_monitor_rules(security_token: str):
123123
})
124124
return jsonify(data)
125125
except ValueError as e:
126-
return f'ValueError: {e}'
126+
return 'ValueError: {}'.format(e)

images/screenshot1.png

-239 KB
Binary file not shown.

images/screenshot2.png

-122 KB
Binary file not shown.

0 commit comments

Comments
 (0)