Skip to content

Commit 9432d93

Browse files
committed
Improve user message when Glances WebUI/RestAPI is ran
1 parent 7647895 commit 9432d93

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

glances/outputs/glances_restful_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,6 @@ def _router(self):
269269
endpoint=self._api_value,
270270
)
271271

272-
# Restful API
273-
bindmsg = f'Glances RESTful API Server started on {self.bind_url}api/{self.API_VERSION}'
274-
logger.info(bindmsg)
275-
276272
# WEB UI
277273
if not self.args.disable_webui:
278274
# Template for the root index.html file
@@ -281,12 +277,16 @@ def _router(self):
281277
# Statics files
282278
self._app.mount(self.url_prefix + '/static', StaticFiles(directory=self.STATIC_PATH), name="static")
283279

284-
logger.info(f"Get WebUI in {self.STATIC_PATH}")
280+
logger.info(f"The WebUI is enable and got statics files in {self.STATIC_PATH}")
285281

286282
bindmsg = f'Glances Web User Interface started on {self.bind_url}'
283+
logger.info(bindmsg)
284+
print(bindmsg)
287285
else:
288-
bindmsg = 'The WebUI is disable (--disable-webui)'
286+
logger.info('The WebUI is disable (--disable-webui)')
289287

288+
# Restful API
289+
bindmsg = f'Glances RESTful API Server started on {self.bind_url}api/{self.API_VERSION}'
290290
logger.info(bindmsg)
291291
print(bindmsg)
292292

0 commit comments

Comments
 (0)