Improve user message when Glances WebUI/RestAPI is ran

pull/2933/head
nicolargo 2024-08-24 15:53:20 +02:00
parent 76478959cc
commit 9432d9361e
1 changed files with 6 additions and 6 deletions

View File

@ -269,10 +269,6 @@ class GlancesRestfulApi:
endpoint=self._api_value, endpoint=self._api_value,
) )
# Restful API
bindmsg = f'Glances RESTful API Server started on {self.bind_url}api/{self.API_VERSION}'
logger.info(bindmsg)
# WEB UI # WEB UI
if not self.args.disable_webui: if not self.args.disable_webui:
# Template for the root index.html file # Template for the root index.html file
@ -281,12 +277,16 @@ class GlancesRestfulApi:
# Statics files # Statics files
self._app.mount(self.url_prefix + '/static', StaticFiles(directory=self.STATIC_PATH), name="static") self._app.mount(self.url_prefix + '/static', StaticFiles(directory=self.STATIC_PATH), name="static")
logger.info(f"Get WebUI in {self.STATIC_PATH}") logger.info(f"The WebUI is enable and got statics files in {self.STATIC_PATH}")
bindmsg = f'Glances Web User Interface started on {self.bind_url}' bindmsg = f'Glances Web User Interface started on {self.bind_url}'
logger.info(bindmsg)
print(bindmsg)
else: else:
bindmsg = 'The WebUI is disable (--disable-webui)' logger.info('The WebUI is disable (--disable-webui)')
# Restful API
bindmsg = f'Glances RESTful API Server started on {self.bind_url}api/{self.API_VERSION}'
logger.info(bindmsg) logger.info(bindmsg)
print(bindmsg) print(bindmsg)