17
17
def download_csv ():
18
18
csv = '"ENDPOINT","EXECUTION_TIME","TIME_OF_EXECUTION","VERSION","GROUP_BY","IP_ADDRESS"\n '
19
19
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 )
22
22
23
23
response = make_response (csv )
24
24
response .headers ["Content-Disposition" ] = "attachment; filename=measurements_{0}.csv" .format (
@@ -32,8 +32,8 @@ def export_data():
32
32
csv = ['"ENDPOINT","EXECUTION_TIME","TIME_OF_EXECUTION","VERSION","GROUP_BY","IP_ADDRESS"' ]
33
33
data = get_data ()
34
34
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 ) )
37
37
return render_template ('dashboard/export-data.html' , link = config .link , session = session , data = csv )
38
38
39
39
@@ -99,7 +99,7 @@ def get_json_data_from(security_token: str, time_from: int):
99
99
})
100
100
return jsonify (data )
101
101
except ValueError as e :
102
- return f 'ValueError: { e } '
102
+ return 'ValueError: {}' . format ( e )
103
103
104
104
105
105
@blueprint .route ('/get_json_monitor_rules/<security_token>' )
@@ -123,4 +123,4 @@ def get_json_monitor_rules(security_token: str):
123
123
})
124
124
return jsonify (data )
125
125
except ValueError as e :
126
- return f 'ValueError: { e } '
126
+ return 'ValueError: {}' . format ( e )
0 commit comments