From a8015a37cf166cf92ec35aad03a087cc68ba9903 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Thu, 20 Jun 2024 14:36:00 +0800 Subject: [PATCH 1/8] =?UTF-8?q?REPORT-123532=20=E6=8E=A7=E4=BB=B6=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E6=A0=B7=E5=BC=8F=E8=AE=BE=E7=BD=AE=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=AB=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E6=A0=B7=E5=BC=8F=E5=90=8E=EF=BC=8C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E4=BF=AE=E6=94=B9=E5=AF=B9=E8=B1=A1=E4=B8=AD=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=80=BC=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D?= =?UTF-8?q?=E8=B7=AF=E3=80=91=E4=BF=AE=E6=94=B9=E5=AF=B9=E8=B1=A1=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/widgettheme/ParaEditorSettingPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java index 5a67090bc2..314e1f5930 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java @@ -41,6 +41,7 @@ public class ParaEditorSettingPane extends EditorSettingPane extends EditorSettingPane Date: Tue, 16 Jul 2024 09:51:01 +0800 Subject: [PATCH 2/8] =?UTF-8?q?REPORT-70155=20fix:=20fvs=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=A0=B7=E5=BC=8F=E5=88=9B=E5=BB=BA=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=8D=95=E5=85=83=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/FormElementCasePaneDelegate.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 525b3c0ca4..9a30b3266d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -6,20 +6,21 @@ import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.form.FormECBackgroundAction; import com.fr.design.actions.form.FormECColumnsAction; import com.fr.design.actions.form.FormECFrozenAction; -import com.fr.design.designer.creator.XElementCase; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fit.NewUIModeCellElementPainter; -import com.fr.design.fit.common.FormDesignerUtil; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.mainframe.*; import com.fr.design.mainframe.cell.QuickEditorRegion; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.design.present.ConditionAttributesGroupPane; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.form.fit.common.LightTool; import com.fr.form.main.Form; import com.fr.grid.Grid; @@ -27,6 +28,7 @@ import com.fr.grid.GridColumn; import com.fr.grid.GridCorner; import com.fr.grid.GridRow; import com.fr.page.ReportSettingsProvider; +import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.worksheet.FormElementCase; import com.fr.design.selection.SelectionEvent; @@ -34,7 +36,6 @@ import com.fr.design.selection.SelectionListener; import javax.swing.JComponent; import javax.swing.JPanel; -import java.awt.Insets; import java.awt.Rectangle; /** @@ -69,6 +70,16 @@ public class FormElementCasePaneDelegate extends ElementCasePane { + DefaultTemplateCellElement defaultTemplateCellElement = DefaultThemedTemplateCellElementCase.createInstance(); + // fvs调整单元格默认样式 + AdjustWorkBookDefaultStyleUtils.adjustCellElement(defaultTemplateCellElement); + return defaultTemplateCellElement; + }); + } } private Rectangle getBoundsLineRect(TemplateElementCase elementCase) { From ad86fcdb91469123a734187bb38c99ade470e529 Mon Sep 17 00:00:00 2001 From: Zhanying <2446962908@qq.com> Date: Tue, 16 Jul 2024 09:58:50 +0800 Subject: [PATCH 3/8] =?UTF-8?q?REPORT-77878=20fix:=20fvs=E6=8F=92=E4=BB=B6?= =?UTF-8?q?-=E8=A1=A8=E6=A0=BC=E9=BB=98=E8=AE=A4=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E6=98=AF=E7=99=BD=E8=89=B2=EF=BC=8C=E4=BD=86?= =?UTF-8?q?=E6=98=AF=E5=8F=B3=E9=94=AE=E6=B8=85=E9=99=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=A0=BC=E5=BC=8F=EF=BC=8C=E5=AD=97=E4=BD=93=E4=BC=9A?= =?UTF-8?q?=E5=8F=98=E4=B8=BA=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/selection/CellSelection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index 4d5fe8a62b..ca95a933df 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -32,6 +32,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.report.RowColumnPane; import com.fr.design.selection.QuickEditor; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.grid.GridUtils; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; @@ -562,6 +563,8 @@ public class CellSelection extends Selection { for (int i = 0; i < removeElementList.size(); i++) { CellElement element = removeElementList.get(i); element.setStyle(null); + // fvs调整单元格默认样式 + AdjustWorkBookDefaultStyleUtils.adjustCellElement(element); } break; From c03449b739859c1ab4770d15d12f10037ffd24d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 16 Jul 2024 10:52:33 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=97=A0jira=20=E6=89=93=E5=8C=85=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/carton/latency/DesignerLatencyMetric.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java index 766ff17dba..7898b2ad42 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java @@ -1,7 +1,5 @@ package com.fr.design.carton.latency; -import com.fanruan.third.v2.org.ehcache.impl.internal.concurrent.ConcurrentHashMap; -import com.fr.concurrent.FineExecutors; import com.fr.concurrent.NamedThreadFactory; import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager; @@ -19,6 +17,7 @@ import com.fr.workspace.WorkspaceEvent; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -72,8 +71,7 @@ public class DesignerLatencyMetric { // 初始化容器 initializeContainer(); // 启动异步性能记录线程池 - executorService = FineExecutors.newCachedThreadPool( - new NamedThreadFactory(DesignerLatencyMetric.class)); + executorService = Executors.newFixedThreadPool(8); // 启动定时埋点 this.scheduler = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("LatencyMetricWorker")); this.scheduler.scheduleWithFixedDelay(this::collectAndSubmit, 60, 60, TimeUnit.SECONDS); From b05fd1300ce677243f373dcc7963396c78ff1c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 16 Jul 2024 19:06:43 +0800 Subject: [PATCH 5/8] =?UTF-8?q?REPORT-117002=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E5=9F=8B=E7=82=B9=E7=9B=91=E6=8E=A7=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../carton/latency/DesignerLatencyMetric.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java index 7898b2ad42..fa517096ee 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java @@ -8,9 +8,12 @@ import com.fr.design.mainframe.SiteCenterToken; import com.fr.event.Event; import com.fr.event.EventDispatcher; import com.fr.event.Listener; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ProductConstants; +import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; import com.fr.workspace.WorkspaceEvent; @@ -43,11 +46,13 @@ import static com.fr.design.carton.CartonConstants.USERID; */ public class DesignerLatencyMetric { + private String latencyUrl; private ExecutorService executorService; private ScheduledExecutorService scheduler; private static final Map LATENCY_CONTAINER = new ConcurrentHashMap<>(); - private static final String LATENCY_INFO_URL = "https://cloud.fanruan.com/api/monitor/record_of_deisgner_latency/single"; + private static final String DEFAULT_MONITOR_URL = "https://cloud.fanruan.com/api/monitor/"; + private static final String LATENCY_TABLE_SUFFIX = "record_of_designer_latency/single"; private final static class InstanceHolder { static final DesignerLatencyMetric INSTANCE = new DesignerLatencyMetric(); @@ -74,7 +79,7 @@ public class DesignerLatencyMetric { executorService = Executors.newFixedThreadPool(8); // 启动定时埋点 this.scheduler = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("LatencyMetricWorker")); - this.scheduler.scheduleWithFixedDelay(this::collectAndSubmit, 60, 60, TimeUnit.SECONDS); + this.scheduler.scheduleWithFixedDelay(this::collectAndSubmit, 60, 60, TimeUnit.MINUTES); // 注册设计器工作目录切换事件监听 EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener() { @Override @@ -100,6 +105,16 @@ public class DesignerLatencyMetric { } } + private String getLatencyUrl() { + if (StringUtils.isEmpty(latencyUrl)) { + String monitorEntry = CloudCenter.getInstance().acquireUrlByKind("cloud.monitor.api.entrypoint", DEFAULT_MONITOR_URL); + if (StringUtils.isNotEmpty(monitorEntry)) { + latencyUrl = monitorEntry + LATENCY_TABLE_SUFFIX; + } + } + return latencyUrl; + } + private void initializeContainer() { for (LatencyLevel level : LatencyLevel.values()) { LATENCY_CONTAINER.put(level, new AtomicInteger()); @@ -132,9 +147,9 @@ public class DesignerLatencyMetric { para.put("token", SiteCenterToken.generateToken()); para.put("content", collect()); try { - HttpToolbox.post(LATENCY_INFO_URL, para); - } catch (Throwable ignore) { - // doNothing + HttpToolbox.post(getLatencyUrl(), para); + } catch (Throwable t) { + FineLoggerFactory.getLogger().debug(t,"[Latency] failed to submit latency log to cloud."); } resetContainer(); } From 5e915785e160bddccc48cbc3b4f283f805ffb047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 16 Jul 2024 19:12:48 +0800 Subject: [PATCH 6/8] =?UTF-8?q?REPORT-117002=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E5=9F=8B=E7=82=B9=E7=9B=91=E6=8E=A7=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/carton/latency/DesignerLatencyMetric.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java index fa517096ee..68aa42b4c9 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java @@ -107,10 +107,9 @@ public class DesignerLatencyMetric { private String getLatencyUrl() { if (StringUtils.isEmpty(latencyUrl)) { - String monitorEntry = CloudCenter.getInstance().acquireUrlByKind("cloud.monitor.api.entrypoint", DEFAULT_MONITOR_URL); - if (StringUtils.isNotEmpty(monitorEntry)) { - latencyUrl = monitorEntry + LATENCY_TABLE_SUFFIX; - } + String monitorEntry = CloudCenter.getInstance().acquireUrlByKind("cloud.monitor.api.entrypoint"); + latencyUrl = (StringUtils.isNotEmpty(monitorEntry) ? monitorEntry : DEFAULT_MONITOR_URL) + + LATENCY_TABLE_SUFFIX; } return latencyUrl; } From edc7184564e6ed125862266152013045a52f156c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Wed, 17 Jul 2024 09:51:21 +0800 Subject: [PATCH 7/8] =?UTF-8?q?REPORT-127241=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E5=9F=8B=E7=82=B9=E5=AD=97=E6=AE=B5=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/carton/latency/DesignerLatencyMetric.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java index 68aa42b4c9..4dc38634c0 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java @@ -87,6 +87,7 @@ public class DesignerLatencyMetric { collectAndSubmit(); } }); + FineLoggerFactory.getLogger().info("[Latency] designer latency metric started."); } } @@ -102,6 +103,7 @@ public class DesignerLatencyMetric { this.scheduler.shutdown(); } collectAndSubmit(); + FineLoggerFactory.getLogger().info("[Latency] designer latency metric stopped."); } } @@ -147,6 +149,7 @@ public class DesignerLatencyMetric { para.put("content", collect()); try { HttpToolbox.post(getLatencyUrl(), para); + FineLoggerFactory.getLogger().debug("[Latency] submit latency log to cloud."); } catch (Throwable t) { FineLoggerFactory.getLogger().debug(t,"[Latency] failed to submit latency log to cloud."); } @@ -163,7 +166,9 @@ public class DesignerLatencyMetric { info.put(DESIGN_METHOD, WorkContext.getCurrent().isLocal() ? LOCAL : REMOTE); info.put(OPERANDS_NUM, LATENCY_CONTAINER.values().stream().mapToInt(AtomicInteger::get).sum()); for (Map.Entry entry : LATENCY_CONTAINER.entrySet()) { - info.put(entry.getKey().getMark(), entry.getValue().get()); + if (!LatencyLevel.UNDEFINE.equals(entry.getKey())) { + info.put(entry.getKey().getMark(), entry.getValue().get()); + } } return info; } From 5980231c6de2cb0498c56fadbf088202425ed242 Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Wed, 17 Jul 2024 12:08:50 +0800 Subject: [PATCH 8/8] =?UTF-8?q?REPORT-125241=20fix:=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=BB=8E=E5=86=85=E5=B1=82=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0=E6=9C=80=E5=A4=96=E5=B1=82=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/file/DefaultTemplateTreeDefineProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java b/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java index 1d2048fa28..9bee877aee 100644 --- a/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java +++ b/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java @@ -421,7 +421,9 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi dialog.setVisible(true); DesignerFrameFileDealerPane.getInstance().getSelectedOperation().refresh(); - LocateAction.gotoEditingTemplateLeaf(targetFile); + SwingUtilities.invokeLater(() -> { + LocateAction.gotoEditingTemplateLeaf(targetFile); + }); } }