Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Socketio #436

Merged
merged 8 commits into from Jun 13, 2017
Merged

Socketio #436

merged 8 commits into from Jun 13, 2017

Conversation

cemsbr
Copy link
Contributor

@cemsbr cemsbr commented May 23, 2017

This a big change. Review by commit is recommended.

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)

def __init__(self, socketio):
"""Receive the socket to write to."""
super().__init__()
Copy link
Contributor

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?

turn_off_led()
console.log('disconnected')
})
function disconnect() {
Copy link
Contributor

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

@cemsbr
Copy link
Contributor Author

cemsbr commented May 24, 2017

@diraol, I applied your suggestions.

@cemsbr cemsbr mentioned this pull request May 26, 2017
<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>
Copy link
Member

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
Copy link
Member

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

@beraldoleal beraldoleal merged commit e190882 into kytos:master Jun 13, 2017
@cemsbr cemsbr deleted the socketio branch June 20, 2017 18:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants