Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

bugfix/11.0
Yvan 3 years ago
parent
commit
fd6e590654
  1. 3
      designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java
  2. 2
      designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java
  3. 12
      designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java
  4. 19
      designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java

3
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()
});
}

2
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};

12
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<Object> newArgs = new ArrayList<>(Arrays.asList(args));
newArgs.add(id);
recordSQLDetail(id);
if (measurable instanceof Estimator) {
measurable.asyncDurable(measureObject, newArgs.toArray());
} 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);
}
if (measurable instanceof Estimator) {
MessageRecorderFactory.getInstance().asyncSubmit(message);
} else {
MessageRecorderFactory.getInstance().syncSubmit(message);
}
}
} catch (Exception ignore) {

19
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<String>() {
@ -57,6 +48,12 @@ public class UpmShowPane extends BasicPane {
modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap());
}
});
EventDispatcher.listen(DownloadEvent.UPDATE, new Listener<String>() {
@Override
public void on(Event event, String param) {
modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap());
}
});
add(modernUIPane, BorderLayout.CENTER);
}
}

Loading…
Cancel
Save