Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

106 lan browser gets nr to crash on an uncaught error #110

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/common/base.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const prettyDate = require('../helpers/date.helper');

const STATUSES = {
NOT_CONNECTED: { fill: 'red', shape: 'ring', text: 'not connected' },
CONNECTED: { fill: 'green', shape: 'dot', text: 'connected' },
NOT_CONNECTED: { fill: 'red', shape: 'ring', text: 'node-red:common.status.not-connected' },
CONNECTED: { fill: 'green', shape: 'dot', text: 'node-red:common.status.connected' },
SERVER_VALIDATION_PENDING: { fill: 'yellow', shape: 'dot', text: 'server validation pending' },
SERVER_VALIDATION_TIMEOUT: { fill: 'orange', shape: 'dot', text: 'server validation timeout' },
INVALID_CONFIGURATION: { fill: 'red', shape: 'dot', text: 'invalid configuration' },
Expand Down
6 changes: 2 additions & 4 deletions src/nodes/connection/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ module.exports = (RED) => {
super(config, RED);
}

getData(msg) {
getData() {
return {
...msg,
url: '/connection',
method: 'GET',
payload: undefined
method: 'GET'
}
}
}
Expand Down
13 changes: 0 additions & 13 deletions src/nodes/freebox-server/freebox-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module.exports = function (RED) {
};

this._statusChanged = new EventEmitter();
node.on('close', () => this.logout());

this.init(config);
}
Expand Down Expand Up @@ -206,18 +205,6 @@ module.exports = function (RED) {
});
}

/**
* logout
*
* @return void
*/
logout() {
this.apiCall('/login/logout', { method: 'POST' }).then(() => {
RED.log.info('Session closed');
this._statusChanged.emit('session.closed');
});
}

/**
* apiCall
*
Expand Down
6 changes: 2 additions & 4 deletions src/nodes/lan-browser/lan-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ module.exports = (RED) => {
super(config, RED);
}

getData(msg) {
getData() {
return {
...msg,
url: '/lan/browser/pub',
method: 'GET',
payload: undefined
method: 'GET'
};
}
}
Expand Down
Loading