15407: Adds user visible warning when websocket url is not set.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 20 Aug 2019 14:44:17 +0000 (11:44 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 20 Aug 2019 14:44:17 +0000 (11:44 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

.gitignore
src/websocket/websocket.ts

index c18f27f6572824668327ebd997eafd3f0c77d76d..45df030d3294be423b92aa8d9f355b00a7f7a34a 100644 (file)
@@ -22,6 +22,7 @@
 .env.development.local
 .env.test.local
 .env.production.local
+.npm.local
 
 npm-debug.log*
 yarn-debug.log*
index 4fd7cc2c6c6d961d17bd5df4790af653fa02fca7..e7ea3016c9a50038d4dcb8a5d3e832d93a02daf7 100644 (file)
@@ -13,6 +13,7 @@ import { loadContainers } from '~/store/processes/processes-actions';
 import { LogEventType } from '~/models/log';
 import { addProcessLogsPanelItem } from '../store/process-logs-panel/process-logs-panel-actions';
 import { FilterBuilder } from "~/services/api/filter-builder";
+import { snackbarActions, SnackbarKind } from "~/store/snackbar/snackbar-actions";
 
 export const initWebSocket = (config: Config, authService: AuthService, store: RootStore) => {
     if (config.websocketUrl) {
@@ -20,7 +21,8 @@ export const initWebSocket = (config: Config, authService: AuthService, store: R
         webSocketService.setMessageListener(messageListener(store));
         webSocketService.connect();
     } else {
-        console.warn("WARNING: webSocketUrl is not configured on the API Server");
+        console.warn("WARNING: Websocket ExternalURL is not set on the API Server");
+        store.dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Websocket URL missing on cluster config", kind: SnackbarKind.WARNING }));
     }
 };