File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 6666import subprocess
6767import psutil
6868import distro
69+ import socket
6970
7071from werkzeug .security import generate_password_hash
7172from werkzeug .security import check_password_hash
@@ -531,6 +532,18 @@ def diagnostic():
531532 return render_template ('diagnostic.html' , logs = logs )
532533
533534
535+ @app .route ('/api/v1/infos' , methods = ['GET' ])
536+ def get_infos ():
537+ """Small api route to get basic informations about the base station"""
538+
539+ infos = {"app" : "RTKBase" ,
540+ "app_version" : rtkbaseconfig .get ("general" , "version" ),
541+ "url" : html .escape (request .base_url ),
542+ "fqdn" : socket .getfqdn (),
543+ "uptime" : get_uptime (),
544+ "hostname" : socket .gethostname ()}
545+ return json .dumps (infos )
546+
534547#### Handle connect/disconnect events ####
535548
536549@socketio .on ("connect" , namespace = "/test" )
You can’t perform that action at this time.
0 commit comments