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

Configurable "Real-time Connection Lost" Notification #190

Merged
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
23 changes: 2 additions & 21 deletions src/realtime/MCWSStreamProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,8 @@ define([

//Communicate websocket timeout and errors to users
if (data.onclose && data.code === 1006) {
let dialog = this.openmct.overlays.dialog({
iconClass: "alert",
message: 'Real-time data connection lost - data may not be displayed as expected. Please reload page to reconnect.',
buttons: [
{
label: "Cancel",
callback: function () {
dialog.dismiss();
}
},
{
label: "Reload",
emphasis: true,
callback: function () {
dialog.dismiss();
window.location.reload();
}
}
]
});

this.openmct.notifications.error('Real-time data connection lost - data may not be displayed as expected.');
console.error(`Real-time data connection lost - data may not be displayed as expected.`);
} else if (data.onerror) {
this.openmct.notifications.error('Websocket Error, please see console for details');
console.error(`Websocket Error - Code:${data.code}, Error:${data.reason}`);
Expand Down