Update graphviz_execution_engine.py

This commit is contained in:
Saifeddine ALOUI 2024-04-30 09:18:01 +02:00 committed by GitHub
parent d26dd9db9e
commit 29f9f0248d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,6 +117,7 @@ def execute_graphviz(code, client:Client, message_id, build_file=False):
with open(tmp_file,"w",encoding="utf8") as f:
f.write(build_graphviz_output(code)["output"])
link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_2_url(tmp_file)}"
execution_time = time.time() - start_time
output_json = {"output": f'<b>Page built successfully</b><br><a href="{link}" target="_blank">Press here to view the page</a>', "execution_time": execution_time}
return output_json
else: