Conversation
Deprecated in favor of a more robust web socket.
Changes: - Long-polling for logs - Messages are instantaneously published - Remove periodic requests every 3 seconds - Remove backend log buffer - Replace socketio namespaces by rooms - Chromium/Chrome changes: - Faster log rendering (fix kytos#427) - No more strange characters in log panel - Remove INFO logs about web-UI own requests (close kytos#429)
kytos/core/websocket.py
Outdated
|
||
def __init__(self, socketio): | ||
"""Receive the socket to write to.""" | ||
super().__init__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cemsbr this WebSocketStream
class does not inherit from other classes, why calling the super().__init__()
here?
kytos/web-ui/static/js/kytos-logs.js
Outdated
turn_off_led() | ||
console.log('disconnected') | ||
}) | ||
function disconnect() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cemsbr may be it is better to call this method something like announce_disconnection
ou disconnected
, since it does not perform the disconnection itself
@diraol, I applied your suggestions. |
kytos/web-ui/index.html
Outdated
<li class="nav-kytos-api-status"> | ||
<i class="fa fa-power-off api-status" aria-hidden="true"></i> | ||
<span class='hidden-sm hidden-xs'>Kytos </span>API | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, let's keep this led until everything become web socket.
Do not print web requests (INFO level) to avoid infinit loop when | ||
printing the logs in the web interface with long-polling mode. | ||
""" | ||
return record.name != 'werkzeug' or record.levelno > logging.INFO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please open an issue in order to us use a proper websocket listen. Maybe with wampp
API status LED makes HTTP requests every 2 seconds.
This a big change. Review by commit is recommended.