You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2020/05/03 08:38:11 UTC

[openmeetings] branch master updated (219457e -> 8c9799f)

This is an automated email from the ASF dual-hosted git repository.

solomax pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git.


    from 219457e  Merge pull request #74 from apache/feature/OPENMEETINGS-2275-update-whiteboard-tool-panel-with-proposal
     new 194f3b2  [OPENMEETINGS-2301] code is improved a bit (original issue still reproducible)
     new 478fb2c  Merge branch 'master' of github.com:apache/openmeetings
     new 8c9799f  [OPENMEETINGS-2275] code clean-up

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../openmeetings/core/util/WebSocketHelper.java    | 32 +++++---
 .../openmeetings/web/room/sidebar/RoomSidebar.java |  4 +-
 .../apache/openmeetings/web/room/wb/WbPanel.html   | 90 +++++++++++-----------
 .../apache/openmeetings/web/room/wb/raw-wb-area.js |  1 -
 openmeetings-web/src/main/webapp/css/raw-wb.css    | 17 ++--
 5 files changed, 79 insertions(+), 65 deletions(-)


[openmeetings] 02/03: Merge branch 'master' of github.com:apache/openmeetings

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit 478fb2cc15c2a53e4f5d45d1efd4bd671ce262c3
Merge: 194f3b2 219457e
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Sun May 3 15:14:13 2020 +0700

    Merge branch 'master' of github.com:apache/openmeetings

 .../apache/openmeetings/web/room/wb/WbPanel.html   | 58 +++++++++++-----------
 .../apache/openmeetings/web/room/wb/raw-wb-area.js |  1 +
 .../openmeetings/web/room/wb/raw-wb-board.js       | 14 +++++-
 openmeetings-web/src/main/webapp/css/raw-wb.css    | 13 +++++
 4 files changed, 56 insertions(+), 30 deletions(-)


[openmeetings] 03/03: [OPENMEETINGS-2275] code clean-up

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit 8c9799fcfa6bb7f95110f4ef73de90844f6e4573
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Sun May 3 15:37:57 2020 +0700

    [OPENMEETINGS-2275] code clean-up
---
 .../apache/openmeetings/web/room/wb/WbPanel.html   | 90 +++++++++++-----------
 .../apache/openmeetings/web/room/wb/raw-wb-area.js |  1 -
 openmeetings-web/src/main/webapp/css/raw-wb.css    | 17 ++--
 3 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html
index 4e5f7fb..290e716 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html
@@ -89,57 +89,53 @@
 			</div>
 			<div class="tools"></div>
 		</div>
-		<div id="wb-zoom" class="wb-zoom row no-gutters">
-			<div class="col-auto">
-				<div class="doc-group input-group input-group-sm" aria-label="...">
-					<div class="input-group-prepend">
-						<button type="button" class="btn btn-outline-secondary up" wicket:message="title:256">
-							<i class="fas fa-reply"></i>
-						</button>
-					</div>
-					<input class="curr-slide" type="number" min="1" max="1"/>
-					<div class="input-group-append">
-						<div class="input-group-text"><wicket:message key="254"/></div>
-					</div>
-					<div class="input-group-append">
-						<div class="last-page input-group-text">1</div>
-					</div>
-					<div class="input-group-append">
-						<button type="button" class="btn-outline-secondary down" wicket:message="title:257">
-							<i class="fas fa-share"></i>
-						</button>
-					</div>
+		<div id="wb-zoom" class="wb-zoom">
+			<div class="doc-group input-group input-group-sm">
+				<div class="input-group-prepend">
+					<button type="button" class="btn btn-outline-secondary up" wicket:message="title:256">
+						<i class="fas fa-reply"></i>
+					</button>
+				</div>
+				<input class="curr-slide" type="number" min="1" max="1"/>
+				<div class="input-group-append">
+					<div class="input-group-text"><wicket:message key="254"/></div>
+				</div>
+				<div class="input-group-append">
+					<div class="last-page input-group-text">1</div>
+				</div>
+				<div class="input-group-append">
+					<button type="button" class="btn btn-outline-secondary down" wicket:message="title:257">
+						<i class="fas fa-share"></i>
+					</button>
 				</div>
 			</div>
-			<div class="col-auto">
-				<div class="zoom-group input-group input-group-sm" aria-label="...">
-					<div class="input-group-prepend">
-						<button type="button" class="btn btn-outline-secondary zoom-out" wicket:message="title:259">
-							<i class="fas fa-search-minus"></i>
-						</button>
-					</div>
-					<select class="zoom text-dark" data-custom-val="1.20">
-						<option value="FULL_FIT"><wicket:message key="zoom.FULL_FIT"/></option>
-						<option value="PAGE_WIDTH"><wicket:message key="zoom.PAGE_WIDTH"/></option>
-						<option value="custom">120%</option>
-						<option value="0.50">50%</option>
-						<option value="0.75">75%</option>
-						<option value="1.00">100%</option>
-						<option value="1.25">125%</option>
-						<option value="1.50">150%</option>
-						<option value="2.00">200%</option>
-						<option value="3.00">300%</option>
-						<option value="4.00">400%</option>
-					</select>
-					<div class="input-group-append">
-						<button type="button" class="btn btn-outline-secondary zoom-in" wicket:message="title:260">
-							<i class="fas fa-search-plus"></i>
-						</button>
-					</div>
+			<div class="zoom-group input-group input-group-sm">
+				<div class="input-group-prepend">
+					<button type="button" class="btn btn-outline-secondary zoom-out" wicket:message="title:259">
+						<i class="fas fa-search-minus"></i>
+					</button>
+				</div>
+				<select class="zoom text-dark" data-custom-val="1.20">
+					<option value="FULL_FIT"><wicket:message key="zoom.FULL_FIT"/></option>
+					<option value="PAGE_WIDTH"><wicket:message key="zoom.PAGE_WIDTH"/></option>
+					<option value="custom">120%</option>
+					<option value="0.50">50%</option>
+					<option value="0.75">75%</option>
+					<option value="1.00">100%</option>
+					<option value="1.25">125%</option>
+					<option value="1.50">150%</option>
+					<option value="2.00">200%</option>
+					<option value="3.00">300%</option>
+					<option value="4.00">400%</option>
+				</select>
+				<div class="input-group-append">
+					<button type="button" class="btn btn-outline-secondary zoom-in" wicket:message="title:260">
+						<i class="fas fa-search-plus"></i>
+					</button>
 				</div>
 			</div>
-			<div class="col-auto settings-group">
-				<button type="button" class="btn-outline-secondary btn-sm settings" wicket:message="title:lbl.settings.whiteboard">
+			<div class="settings-group">
+				<button type="button" class="btn btn-outline-secondary btn-sm settings" wicket:message="title:lbl.settings.whiteboard">
 					<i class="fas fa-cog"></i>
 				</button>
 			</div>
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
index f3d7ed6..0770af9 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
@@ -232,7 +232,6 @@ var DrawWbArea = function() {
 			self.removeDeleteHandler();
 		}
 		__initTab(tabsNav.find('li'));
-		console.log("this", tabs, tabs.find('.wb-tab-content .wb-tab'));
 		tabs.find('.wb-tab-content .wb-tab').each(function() {
 			$(this).data().setRole(role);
 		});
diff --git a/openmeetings-web/src/main/webapp/css/raw-wb.css b/openmeetings-web/src/main/webapp/css/raw-wb.css
index f53d23e..e4dcbb8 100644
--- a/openmeetings-web/src/main/webapp/css/raw-wb.css
+++ b/openmeetings-web/src/main/webapp/css/raw-wb.css
@@ -323,12 +323,20 @@ html[dir="rtl"] .room-block .sb-wb .wb-block {
 	border: 1px solid #888888;
 	box-shadow: 5px 5px 5px #888888;
 }
-.wb-area .wb-zoom input {
-	width: 50px
-}
 .wb-area .wb-zoom {
+	display: flex;
+	padding-top: 2px;
 	min-width: 360px
 }
+.wb-area .wb-zoom .doc-group
+, .wb-area .wb-zoom .zoom-group
+, .wb-area .wb-zoom .settings-group
+{
+	width: auto;
+}
+.wb-area .wb-zoom input {
+	width: 50px
+}
 .wb-area .wb-zoom .settings-group {
 	display: none;
 	margin-left: 2px;
@@ -339,9 +347,6 @@ html[dir="rtl"] .room-block .sb-wb .wb-block {
 .wb-area .wb-zoom .zoom-group {
 	margin-left: 2px;
 }
-.wb-area .wb-zoom {
-	padding-top: 2px;
-}
 #wb-rename-menu {
 	display: none;
 }


[openmeetings] 01/03: [OPENMEETINGS-2301] code is improved a bit (original issue still reproducible)

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit 194f3b217fee3e7f25c1945717069a18a2bc3321
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Sun May 3 15:14:01 2020 +0700

    [OPENMEETINGS-2301] code is improved a bit (original issue still reproducible)
---
 .../openmeetings/core/util/WebSocketHelper.java    | 32 ++++++++++++++++------
 .../openmeetings/web/room/sidebar/RoomSidebar.java |  4 +--
 2 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/openmeetings-core/src/main/java/org/apache/openmeetings/core/util/WebSocketHelper.java b/openmeetings-core/src/main/java/org/apache/openmeetings/core/util/WebSocketHelper.java
index 1584b36..30d9750 100644
--- a/openmeetings-core/src/main/java/org/apache/openmeetings/core/util/WebSocketHelper.java
+++ b/openmeetings-core/src/main/java/org/apache/openmeetings/core/util/WebSocketHelper.java
@@ -55,31 +55,45 @@ import com.github.openjson.JSONObject;
 public class WebSocketHelper {
 	private static final Logger log = LoggerFactory.getLogger(WebSocketHelper.class);
 
-	public static void sendClient(final IWsClient inC, byte[] b) {
-		if (inC != null) {
-			sendClient(inC, c -> {
+	public static void sendClient(final IWsClient omClient, byte[] b) {
+		if (omClient != null) {
+			sendClient(omClient, c -> {
 				try {
 					c.sendMessage(b, 0, b.length);
-				} catch (IOException e) {
+				} catch (Throwable e) {
 					log.error("Error while sending binary message to client", e);
 				}
+				checkClosed(c, omClient);
 			});
 		}
 	}
 
-	public static void sendClient(final IWsClient inC, JSONObject msg) {
-		log.trace("Sending WebSocket message to Client: {} -> {}", inC, msg);
-		if (inC != null) {
-			sendClient(inC, c -> {
+	public static void sendClient(final IWsClient omClient, JSONObject msg) {
+		log.trace("Sending WebSocket message to Client: {} -> {}", omClient, msg);
+		if (omClient != null) {
+			sendClient(omClient, c -> {
 				try {
 					c.sendMessage(msg.toString());
-				} catch (IOException e) {
+				} catch (Throwable e) {
 					log.error("Error while sending message to client", e);
 				}
+				checkClosed(c, omClient);
 			});
 		}
 	}
 
+	private static void checkClosed(IWebSocketConnection c, final IWsClient omClient) {
+		if (c.isOpen()) {
+			return;
+		}
+		log.error("!!!!WS connection is closed in sendMessage");
+		WebSocketSettings settings = WebSocketSettings.Holder.get((Application)getApp());
+		IWebSocketConnectionRegistry reg = settings.getConnectionRegistry();
+		reg.removeConnection(c.getApplication(), c.getSessionId(), c.getKey());
+		if (omClient instanceof Client) {
+			getApp().getBean(IClientManager.class).exit((Client)omClient);
+		}
+	}
 	public static IApplication getApp() {
 		return (IApplication)Application.get(getWicketApplicationName());
 	}
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
index f328010..76bb8f1 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
@@ -81,9 +81,9 @@ public class RoomSidebar extends Panel {
 		@Override
 		protected void respond(AjaxRequestTarget target) {
 			StringValue s = getRequest().getRequestParameters().getParameterValue(PARAM_SETTINGS);
-			if (!s.isEmpty()) {
+			Client c = room.getClient();
+			if (!s.isEmpty() && c != null) {
 				ExtendedClientProperties cp = WebSession.get().getExtendedProperties();
-				Client c = room.getClient();
 				cp.setSettings(new JSONObject(s.toString())).update(c);
 				if (!avInited) {
 					avInited = true;