From 3f4f411eb66bcba775fa271523a83b6ca1d756e8 Mon Sep 17 00:00:00 2001 From: Peter Walker Date: Mon, 26 Jun 2017 12:10:58 -0500 Subject: [PATCH] add logic to show network test dialog --- web/app/assets/javascripts/everywhere/everywhere.js | 8 ++++++++ web/app/assets/javascripts/globals.js | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/app/assets/javascripts/everywhere/everywhere.js b/web/app/assets/javascripts/everywhere/everywhere.js index 851526ca4..f815cb65c 100644 --- a/web/app/assets/javascripts/everywhere/everywhere.js +++ b/web/app/assets/javascripts/everywhere/everywhere.js @@ -62,6 +62,8 @@ watchPreferencesEvent(app); + watchNetworkTestEvent(app); + initializeStun(app); operationalEvents(app); @@ -77,6 +79,12 @@ }); } + function watchNetworkTestEvent(app) { + context.JK.onBackendEvent(ALERT_NAMES.SHOW_NETWORK_TEST, 'everywhere', function() { + app.layout.showDialog('network-test') + }); + } + function checkMacOSXInstalledCorrectly() { var os = context.jamClient.GetOSAsString(); // check if method exists at all for migration purposes diff --git a/web/app/assets/javascripts/globals.js b/web/app/assets/javascripts/globals.js index e9333ad94..e21d883e2 100644 --- a/web/app/assets/javascripts/globals.js +++ b/web/app/assets/javascripts/globals.js @@ -139,7 +139,8 @@ VIDEO_WINDOW_CLOSED :50, VST_CHANGED: 51, // VST state changed SAMPLERATE_CONFIGURATION_BAD: 52, - LAST_ALERT : 53 + SHOW_NETWORK_TEST: 53, + LAST_ALERT : 54 } // recreate eThresholdType enum from MixerDialog.h context.JK.ALERT_TYPES = { @@ -205,7 +206,8 @@ 50: {"title": "", "message": ""}, // VIDEO_WINDOW_CLOSED 51: {"title": "", "message": ""}, // VST_CHANGED 52: {"title": "", "message": ""}, // SAMPLERATE_CONFIGURATION_BAD - 53: {"title": "", "message": ""} // LAST_ALERT + 53: {"title": "", "message": ""}, // SHOW_NETWORK_TEST + 54: {"title": "", "message": ""} // LAST_ALERT }; // add the alert's name to the ALERT_TYPES structure