Browse Source
* commit '818543e391ada9b5e37d7db4bd509f5e2c926de4': REPORT-13902 错误的test依赖, 先移出来. 切换事件监听优先级 load 场景下 模板内存优化结果的处理 REPORT-13202 包含插件控件的模板切换环境后存储出错 REPORT-12718 设计器漏传了. 无JIRA任务 去掉httpclient的使用 REPORT-13802 REPORT-13802 REPORT-13810 REPORT-13303 设计器如果根目录有很多面板, 会卡在白屏很久, 不合理. REPORT-13626 先改回去,不在回归里面处理,一直都是这样的逻辑 REPORT-13074 远程设计向下兼容 1. 将尝试连接和正式连接提示分开。 CHART-3086 geojson读写移到core。service相关改动较大 下一波处理 REPORT-13074 远程设计向下兼容 1. 忘了注释掉 REPORT-13074 远程设计向下兼容 1. 修复一下逻辑。 更方便理解 REPORT-13074 远程设计向下兼容 1. 补充一些注释。 REPORT-13074 远程设计向下兼容 1. 加入序列化异常 SerilizationException , WorkspaceNoteHitException 2. 加入切换远程连接的检测,以及测试远程连接的提醒。bugfix/10.0
abel.chen
6 years ago
16 changed files with 369 additions and 123 deletions
@ -0,0 +1,62 @@ |
|||||||
|
package com.fr.env; |
||||||
|
|
||||||
|
import com.fr.log.FineLoggerFactory; |
||||||
|
import com.fr.stable.AssistUtils; |
||||||
|
import com.fr.workspace.WorkContext; |
||||||
|
import com.fr.workspace.connect.WorkspaceConnectionInfo; |
||||||
|
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest; |
||||||
|
|
||||||
|
/** |
||||||
|
* 测试连接的结果。 |
||||||
|
* 不改变原有逻辑的情况下,加入一层转化。 |
||||||
|
* 根据这里的转化结果,判断需要提示哪些内容。 |
||||||
|
* |
||||||
|
* created by Harrison on 2018/12/20 |
||||||
|
**/ |
||||||
|
public enum TestConnectionResult { |
||||||
|
/** |
||||||
|
* 完全成功, 版本匹配,测试连接成功。 |
||||||
|
*/ |
||||||
|
Fully_Success, |
||||||
|
|
||||||
|
/** |
||||||
|
* 不完全成功,版本不匹配,但测试连接成功。 |
||||||
|
*/ |
||||||
|
Partly_Sucess, |
||||||
|
|
||||||
|
/** |
||||||
|
* 完全失败,直接没连上 |
||||||
|
*/ |
||||||
|
Fully_Failed, |
||||||
|
|
||||||
|
/** |
||||||
|
* 验证 Token 失败 |
||||||
|
*/ |
||||||
|
Auth_Failed; |
||||||
|
|
||||||
|
public static TestConnectionResult parse(Boolean value, WorkspaceConnectionInfo info) { |
||||||
|
if (value == null) { |
||||||
|
return Auth_Failed; |
||||||
|
} |
||||||
|
|
||||||
|
if (!value) { |
||||||
|
return Fully_Failed; |
||||||
|
} |
||||||
|
try { |
||||||
|
|
||||||
|
String serverVersion = new FunctionalHttpRequest(info).getServerVersion(); |
||||||
|
if (AssistUtils.equals(serverVersion, WorkContext.getVersion())) { |
||||||
|
return Fully_Success; |
||||||
|
} |
||||||
|
|
||||||
|
return Partly_Sucess; |
||||||
|
} catch (Exception e) { |
||||||
|
|
||||||
|
// 发生异常,说明没连接上。返回完全失败。
|
||||||
|
FineLoggerFactory.getLogger().error(e.getMessage()); |
||||||
|
return Fully_Failed; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -1 +1 @@ |
|||||||
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL指的是:/WebReport/ReportServer |
假如访问的是http://localhost:8075/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL指的是:/webroot/decision/view/report |
@ -1 +1 @@ |
|||||||
http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL is /WebReport/ReportServer |
http://localhost:8075/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL is /webroot/decision/view/report |
@ -0,0 +1,29 @@ |
|||||||
|
package com.fr.form.ui; |
||||||
|
|
||||||
|
import com.fr.design.designer.creator.XCreator; |
||||||
|
import com.fr.design.designer.creator.XCreatorUtils; |
||||||
|
import com.fr.design.mainframe.FormSelectionUtils; |
||||||
|
import com.fr.form.main.Form; |
||||||
|
import com.fr.general.ComparatorUtils; |
||||||
|
import junit.framework.TestCase; |
||||||
|
|
||||||
|
import java.awt.Dimension; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author kerry |
||||||
|
* @date 2018/7/27 |
||||||
|
*/ |
||||||
|
public class WidgetNameCopyTest extends TestCase { |
||||||
|
|
||||||
|
public void testWidgetNameCopy() throws Exception { |
||||||
|
Widget button = new FreeButton(); |
||||||
|
Form form = new Form(); |
||||||
|
button.setWidgetName("button0"); |
||||||
|
XCreator xCreator = XCreatorUtils.createXCreator(button, new Dimension(100, 100)); |
||||||
|
XCreator copyXcreator1 = FormSelectionUtils.copyXcreator(form, xCreator); |
||||||
|
XCreator copyXcreator2 = FormSelectionUtils.copyXcreator(form, xCreator); |
||||||
|
copyXcreator1.toData().setWidgetName("button_test"); |
||||||
|
assertTrue(!ComparatorUtils.equals(copyXcreator2.toData().getWidgetName(), copyXcreator1.toData().getWidgetName())); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue