Browse Source

Handles graceful-shutdown focus error response.

j8
paweldomas 10 years ago
parent
commit
5b44edb3cc
6 changed files with 18274 additions and 18246 deletions
  1. 1
    1
      index.html
  2. 3
    1
      lang/main.json
  3. 18257
    18244
      libs/app.bundle.js
  4. 8
    0
      modules/UI/UI.js
  5. 4
    0
      modules/xmpp/moderator.js
  6. 1
    0
      service/xmpp/XMPPEvents.js

+ 1
- 1
index.html View File

@@ -19,7 +19,7 @@
19 19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20 20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21 21
     <script src="interface_config.js?v=5"></script>
22
-    <script src="libs/app.bundle.js?v=21"></script>
22
+    <script src="libs/app.bundle.js?v=22"></script>
23 23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24 24
     <link rel="stylesheet" href="css/font.css?v=6"/>
25 25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 3
- 1
lang/main.json View File

@@ -173,6 +173,8 @@
173 173
         "settings2": "Participants join muted",
174 174
         "settings3": "Require nicknames<br/><br/>Set a password to lock your room:",
175 175
         "yourPassword": "your password",
176
-        "Back": "Back"
176
+        "Back": "Back",
177
+        "serviceUnavailable": "Service unavailable",
178
+        "gracefulShutdown": "Our service is currently down for maintenance. Please try again later."
177 179
     }
178 180
 }

+ 18257
- 18244
libs/app.bundle.js
File diff suppressed because it is too large
View File


+ 8
- 0
modules/UI/UI.js View File

@@ -135,6 +135,14 @@ function registerListeners() {
135 135
     APP.connectionquality.addListener(CQEvents.STOP,
136 136
         VideoLayout.onStatsStop);
137 137
     APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, onDisposeConference);
138
+    APP.xmpp.addListener(XMPPEvents.GRACEFUL_SHUTDOWN, function () {
139
+        messageHandler.openMessageDialog(
140
+            'dialog.serviceUnavailable', 'Service unavailable',
141
+            'dialog.gracefulShutdown',
142
+            'Our service is currently down for maintenance.' +
143
+            ' Please try again later.'
144
+        );
145
+    });
138 146
     APP.xmpp.addListener(XMPPEvents.KICKED, function () {
139 147
         messageHandler.openMessageDialog("dialog.sessTerminated", "Session Terminated",
140 148
             "dialog.kickMessage", "Ouch! You have been kicked out of the meet!");

+ 4
- 0
modules/xmpp/moderator.js View File

@@ -275,6 +275,10 @@ var Moderator = {
275 275
                     console.info("Session expired! - removing");
276 276
                     localStorage.removeItem("sessionId");
277 277
                 }
278
+                if ($(error).find('>error>graceful-shutdown').length) {
279
+                    eventEmitter.emit(XMPPEvents.GRACEFUL_SHUTDOWN);
280
+                    return;
281
+                }
278 282
                 // Not authorized to create new room
279 283
                 if ($(error).find('>error>not-authorized').length) {
280 284
                     console.warn("Unauthorized to start the conference", error);

+ 1
- 0
service/xmpp/XMPPEvents.js View File

@@ -3,6 +3,7 @@ var XMPPEvents = {
3 3
     CALL_TERMINATED: "xmpp.callterminated.jingle",
4 4
     CALL_INCOMING: "xmpp.callincoming.jingle",
5 5
     DISPOSE_CONFERENCE: "xmpp.dispoce_confernce",
6
+    GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",
6 7
     KICKED: "xmpp.kicked",
7 8
     BRIDGE_DOWN: "xmpp.bridge_down",
8 9
     USER_ID_CHANGED: "xmpp.user_id_changed",

Loading…
Cancel
Save