Skip to content

Commit

Permalink
Improve user message when Glances WebUI/RestAPI is ran
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Aug 24, 2024
1 parent 7647895 commit 9432d93
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions glances/outputs/glances_restful_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ def _router(self):
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
if not self.args.disable_webui:
# Template for the root index.html file
Expand All @@ -281,12 +277,16 @@ def _router(self):
# Statics files
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}'
logger.info(bindmsg)
print(bindmsg)
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)
print(bindmsg)

Expand Down

0 comments on commit 9432d93

Please sign in to comment.