Pārlūkot izejas kodu

Handles graceful-shutdown focus error response.

j8
paweldomas 10 gadus atpakaļ
vecāks
revīzija
5b44edb3cc
6 mainītis faili ar 18274 papildinājumiem un 18246 dzēšanām
  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 Parādīt failu

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

+ 3
- 1
lang/main.json Parādīt failu

173
         "settings2": "Participants join muted",
173
         "settings2": "Participants join muted",
174
         "settings3": "Require nicknames<br/><br/>Set a password to lock your room:",
174
         "settings3": "Require nicknames<br/><br/>Set a password to lock your room:",
175
         "yourPassword": "your password",
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
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 8
- 0
modules/UI/UI.js Parādīt failu

135
     APP.connectionquality.addListener(CQEvents.STOP,
135
     APP.connectionquality.addListener(CQEvents.STOP,
136
         VideoLayout.onStatsStop);
136
         VideoLayout.onStatsStop);
137
     APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, onDisposeConference);
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
     APP.xmpp.addListener(XMPPEvents.KICKED, function () {
146
     APP.xmpp.addListener(XMPPEvents.KICKED, function () {
139
         messageHandler.openMessageDialog("dialog.sessTerminated", "Session Terminated",
147
         messageHandler.openMessageDialog("dialog.sessTerminated", "Session Terminated",
140
             "dialog.kickMessage", "Ouch! You have been kicked out of the meet!");
148
             "dialog.kickMessage", "Ouch! You have been kicked out of the meet!");

+ 4
- 0
modules/xmpp/moderator.js Parādīt failu

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

+ 1
- 0
service/xmpp/XMPPEvents.js Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt