UNPKG

864 BJavaScriptView Raw
1// Copyright (c) Jupyter Development Team.
2// Distributed under the terms of the Modified BSD License.
3import { showErrorMessage } from '@jupyterlab/apputils';
4import { nullTranslator } from '@jupyterlab/translation';
5/**
6 * A default connection lost handler, which brings up an error dialog.
7 */
8export const ConnectionLost = async function (manager, err, translator) {
9 translator = translator || nullTranslator;
10 const trans = translator.load('jupyterlab');
11 const title = trans.__('Server Connection Error');
12 const networkMsg = trans.__('A connection to the Jupyter server could not be established.\n' +
13 'JupyterLab will continue trying to reconnect.\n' +
14 'Check your network connection or Jupyter server configuration.\n');
15 return showErrorMessage(title, { message: networkMsg });
16};
17//# sourceMappingURL=connectionlost.js.map
\No newline at end of file