Browse Source

Merge pull request #13948 in DESIGN/design from release/11.0 to bugfix/11.0

* commit '246a4d40f9cb70fb15b6c360685927fb82c8479b':
  修改方法名称
  修改方法名称
  REPORT-118163 获取到了数据集sql语句中注释的参数
  REPORT-118629 FRM并行计算偶发埋点记录失败
  无jira任务,修复单测
  REPORT-115482 fix: 客户模板中报表块单元格插入图片,预览报错,编辑卡死
bugfix/11.0
superman 7 months ago
parent
commit
1215d046e1
  1. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java
  2. 7
      designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java
  3. 8
      designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java
  4. 2
      designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -251,7 +251,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
private static Parameter[] processParameters(DBTableData tableData, Calculator calculator) { private static Parameter[] processParameters(DBTableData tableData, Calculator calculator) {
ParameterProvider[] parameters = tableData.getParameters(); ParameterProvider[] parameters = tableData.getParameters();
if (parameters == null || parameters.length == 0) { if (parameters == null || parameters.length == 0) {
tableData.setParameters(ParameterHelper.analyze4Parameters(tableData.getQuery(), false)); tableData.setParameters(ParameterHelper.analyze4Parameters(tableData.getQueryWithoutComments(), false));
return new Parameter[0]; return new Parameter[0];
} }
return Parameter.providers2Parameter(Calculator.processParameters(calculator, parameters)); return Parameter.providers2Parameter(Calculator.processParameters(calculator, parameters));

7
designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java

@ -88,8 +88,9 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice {
MessageRecorderFactory.getInstance().syncSubmit(message); MessageRecorderFactory.getInstance().syncSubmit(message);
} }
} }
} catch (Exception ignore) { } catch (Exception ex) {
//埋点信息入库失败应该不能影响业务流程 //埋点信息入库失败应该不能影响业务流程
FineLoggerFactory.getLogger().debug("[Metric] failed to log message.", ex);
} finally { } finally {
sessionBinder.detachSession(); sessionBinder.detachSession();
} }
@ -113,7 +114,11 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice {
} }
public static void recordSQLDetail(String uuid) { public static void recordSQLDetail(String uuid) {
try {
DBMeterFactory.getMeter().submit(uuid); DBMeterFactory.getMeter().submit(uuid);
} catch (Exception e) {
FineLoggerFactory.getLogger().debug("[Metric] failed to log sql detail.", e);
}
} }
public static void recordSQL(Compute once, MeasureObject measureObject) { public static void recordSQL(Compute once, MeasureObject measureObject) {

8
designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java

@ -9,6 +9,7 @@ import com.fr.base.Style;
import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.design.gui.iscrollbar.UIScrollBar;
import com.fr.general.ImageWithSuffix; import com.fr.general.ImageWithSuffix;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -92,9 +93,14 @@ public class ImagePreviewPane extends JComponent implements Scrollable, ImagePre
isLoading = false; isLoading = false;
CoreGraphHelper.waitForImage(image); CoreGraphHelper.waitForImage(image);
if (image.getFineImage() != null && image.getImage() != null) {
try {
imageWidth = image.getWidth(null); imageWidth = image.getWidth(null);
imageHeight = image.getHeight(null); imageHeight = image.getHeight(null);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
this.setToolTipText("Image Size: " + imageWidth + "x" + imageHeight + "px"); this.setToolTipText("Image Size: " + imageWidth + "x" + imageHeight + "px");
} }
fireChangeListener(); fireChangeListener();

2
designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java

@ -49,7 +49,7 @@ public class EnvChangeEntranceTest {
EasyMock.expect(selectedEnv.getRemindTime()).andReturn(null); EasyMock.expect(selectedEnv.getRemindTime()).andReturn(null);
FunctionalHttpRequest request = EasyMock.mock(FunctionalHttpRequest.class); FunctionalHttpRequest request = EasyMock.mock(FunctionalHttpRequest.class);
EasyMock.expect(request.getServiceList()).andReturn(null); EasyMock.expect(request.getServiceList(connectionInfo)).andReturn(null);
PowerMock.expectNew(FunctionalHttpRequest.class, connectionInfo).andReturn(request).anyTimes(); PowerMock.expectNew(FunctionalHttpRequest.class, connectionInfo).andReturn(request).anyTimes();
EasyMock.expect(request.getServerBranch()).andReturn(remoteBranch); EasyMock.expect(request.getServerBranch()).andReturn(remoteBranch);

Loading…
Cancel
Save