1717def 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 )
0 commit comments