From 5b836f0b8c5d8fbbe23011cfad82f3d97050b1d0 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 11 Apr 2022 17:04:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-69324=20=E6=8F=92=E4=BB=B6-=E6=96=B0?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86-=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=86=85=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/upm/UpmShowPane.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java b/designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java index 0384b5c291..23a712508e 100644 --- a/designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java +++ b/designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java @@ -32,23 +32,14 @@ public class UpmShowPane extends BasicPane { UpmShowPane() { setLayout(new BorderLayout()); - modernUIPane = ModernUIPaneFactory.modernUIPaneBuilder() - .prepareForV6(new ScriptContextAdapter() { + modernUIPane = new ModernUIPane.Builder<>() + .prepare(new ScriptContextAdapter() { @Override public void onScriptContextCreated(ScriptContextEvent event) { - // 6.x JSValue window = event.getBrowser().executeJavaScriptAndReturnValue("window"); window.asObject().setProperty("PluginHelper", UpmBridge.getBridge(event.getBrowser())); } }) - .prepareForV7(params -> { - // 7.x - JsObject window = params.frame().executeJavaScript("window"); - if (window != null) { - window.putProperty("PluginHelper", NewUpmBridge.getBridge(window)); - } - return InjectJsCallback.Response.proceed(); - }) .withURL(UpmFinder.getMainResourcePath(), UpmUtils.renderMap()) .build(); EventDispatcher.listen(DownloadEvent.UPDATE, new Listener() { @@ -57,6 +48,12 @@ public class UpmShowPane extends BasicPane { modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap()); } }); + EventDispatcher.listen(DownloadEvent.UPDATE, new Listener() { + @Override + public void on(Event event, String param) { + modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap()); + } + }); add(modernUIPane, BorderLayout.CENTER); } } From 17e3993901176924e7094f7fb997be0bab761d4b Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 11 Apr 2022 18:00:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/formula/FunctionConstants.java | 3 +-- .../src/main/java/com/fr/design/gui/style/TextFormatPane.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java index 6235551ec4..17e61b5e9f 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java @@ -288,8 +288,7 @@ public final class FunctionConstants { private static NameAndFunctionList getNewFunctionList() { return new NameAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_New"), new Function[]{ - new ENDOFMONTH(), new NUMTOZH(), new MIDCHAR(), new ISWORKDAY(), new ENBYSTRNUM(), new TEXTGETNUM(), - new GETCHARNUM(), new GCD(), new LCM() + new ENDOFMONTH(), new NUMTOZH(), new MIDCHAR(), new ISWORKDAY() }); } diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java index 3e97743ff6..a477cb16c1 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java @@ -58,7 +58,7 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName private static final Integer[] TYPES = new Integer[]{ FormatContents.NULL, FormatContents.NUMBER, FormatContents.CURRENCY, FormatContents.PERCENT, - FormatContents.THOUSANDTHS, FormatContents.SCIENTIFIC, + FormatContents.SCIENTIFIC, FormatContents.DATE, FormatContents.TIME, FormatContents.TEXT}; From 6e0d9710fbe9f808af7773eb1b9fac10048160df Mon Sep 17 00:00:00 2001 From: Bryant Date: Mon, 11 Apr 2022 18:02:11 +0800 Subject: [PATCH 3/3] Update designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java --- .../record/analyzer/advice/MonitorAdvice.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java index a459d0841d..68f8c8508f 100644 --- a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java +++ b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java @@ -4,11 +4,11 @@ import com.fr.design.record.analyzer.DesignerAnalyzerAdvice; import com.fr.general.GeneralUtils; import com.fr.intelli.measure.Estimator; import com.fr.intelli.metrics.Compute; +import com.fr.intelli.metrics.MessageRecorderFactory; import com.fr.intelli.metrics.SupervisoryConfig; import com.fr.intelli.record.Measurable; import com.fr.intelli.record.MeasureObject; import com.fr.intelli.record.MeasureUnit; -import com.fr.intelli.record.MetricRegistry; import com.fr.log.FineLoggerFactory; import com.fr.measure.DBMeterFactory; import com.fr.stable.ArrayUtils; @@ -80,18 +80,16 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { List newArgs = new ArrayList<>(Arrays.asList(args)); newArgs.add(id); recordSQLDetail(id); + Object message = null; + try { + message = measurable.durableEntity(measureObject, newArgs.toArray()); + } catch (Throwable throwable) { + FineLoggerFactory.getLogger().error(throwable.getMessage(), throwable); + } if (measurable instanceof Estimator) { - measurable.asyncDurable(measureObject, newArgs.toArray()); + MessageRecorderFactory.getInstance().asyncSubmit(message); } else { - Object message = null; - try { - message = measurable.durableEntity(measureObject, newArgs.toArray()); - } catch (Throwable throwable) { - FineLoggerFactory.getLogger().error(throwable.getMessage(), throwable); - } - if (message != null) { - MetricRegistry.getMetric().submit(message); - } + MessageRecorderFactory.getInstance().syncSubmit(message); } } } catch (Exception ignore) {