From 6ba1286c96ff988303656aa3daa9d9eb8e7968dc Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 5 Nov 2018 14:01:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-12324=20=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E3=80=8B=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E4=B8=AD=E6=96=B0=E5=A2=9E=E6=95=B0=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=90=8E=E6=97=A5=E5=BF=97=E4=B8=AD=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/TreeTableDataDictPane.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java index 81c791282..f1f1c6c75 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java @@ -16,12 +16,15 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; - -import com.fr.script.Calculator; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.ButtonGroup; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -155,7 +158,6 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable { } } rtd.setTableDataSource(DesignTableDataManager.getEditingTableDataSource()); - rtd.createDataModel(Calculator.createCalculator()); PreviewTablePane.previewTableData(rtd); } }); From f086badbf6a0d839f5cf141d80c724b044265ffb Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 13 Nov 2018 12:04:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=20websoc?= =?UTF-8?q?ket=E7=AB=AF=E5=8F=A3=E5=8F=AF=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A4=9A=E4=B8=AA=E5=8F=AF=E9=80=89=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E8=AE=A9=E5=8D=95=E6=9C=BA=E5=A4=9A=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E9=9B=86=E7=BE=A4=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/socketio/DesignerSocketIO.java | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 132d72d17..bcf7450e1 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -68,8 +68,8 @@ public class DesignerSocketIO { return; } try { - String uri = getSocketUri(current); - socketIO = Optional.of(IO.socket(new URI(uri))); + String[] uri = getSocketUri(current); + socketIO = Optional.of(IO.socket(new URI(uri[0]))); socketIO.get().on(WorkspaceConstants.WS_LOGRECORD, printLog); socketIO.get().on(WorkspaceConstants.CONFIG_MODIFY, new Emitter.Listener() { @Override @@ -109,19 +109,23 @@ public class DesignerSocketIO { } } - private static String getSocketUri(Workspace current) throws IOException { + private static String[] getSocketUri(Workspace current) throws IOException { URL url = new URL(current.getPath()); - int port = WorkContext.getCurrent().get(SocketInfoOperator.class).getPort(); + Integer[] ports = WorkContext.getCurrent().get(SocketInfoOperator.class).getPort(); WorkspaceConnection connection = WorkContext.getCurrent().getConnection(); - return String.format("%s://%s:%s%s?%s=%s&%s=%s", - url.getProtocol(), - url.getHost(), - port, - WorkspaceConstants.WS_NAMESPACE, - DecisionServiceConstants.WEB_SOCKET_TOKEN_NAME, - connection.getToken(), - RemoteDesignConstants.USER_LOCK_ID, - connection.getId() - ); + String[] result = new String[ports.length]; + for (int i = 0; i < ports.length; i++ ) { + result[i] = String.format("%s://%s:%s%s?%s=%s&%s=%s", + url.getProtocol(), + url.getHost(), + ports[i], + WorkspaceConstants.WS_NAMESPACE, + DecisionServiceConstants.WEB_SOCKET_TOKEN_NAME, + connection.getToken(), + RemoteDesignConstants.USER_LOCK_ID, + connection.getId()); + } + return result; + } }