Browse Source

Merge pull request #14840 in DESIGN/design from fbp/release to fbp/feature

* commit 'c2585b9adf12f5a3fbeacab4eb095acd6462cf44':
  REPORT-134696 & REPORT-134691 & REPORT-134306 & REPORT-133443 fix: NewUI适配问题修复
  值编辑面板缩放
  弹窗已经缩放,间距变大导致的遮挡,拉长20
  REPORT-134503 && REPORT-132845 启动设计器后直接连接远程环境,设计器插件未生效 【问题原因】 1、获取远程插件状态接口发生变化,获取远程插件状态失败。 2、插件引擎之前未考虑远程设计 【改动思路】 1、注册插件repository。修改接口的返回类型。 2、设计器模块启动的时候,单独注册 需要启动的插件同步模块 及 获取插件状态的接口信息
  REPORT-132842 【fr-fbp回归】【数据集】fbp工程 新增数据连接,什么都不设置,直接保存失败
  REPORT-133851 【fr-fbp回归】文件数据集中新建文件夹
fbp/feature
superman 3 months ago
parent
commit
0288be23b8
  1. 12
      designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java
  2. 8
      designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java
  3. 2
      designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java
  4. 11
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  5. 2
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  6. 6
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  7. 1
      designer-chart/src/main/java/com/fr/design/chartx/component/correlation/AbstractCorrelationPane.java
  8. 5
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeBeautyPane.java
  9. 11
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java
  10. 11
      designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java
  11. 10
      designer-realize/src/main/java/com/fanruan/boot/env/function/app/PluginRemote.java
  12. 2
      designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java

12
designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java

@ -65,6 +65,12 @@ public class LocalConnectionSource extends BaseConnectionSource {
ConnectionProcessorFactory.addConnection(bean); ConnectionProcessorFactory.addConnection(bean);
} catch (DriverNotFoundException e) { } catch (DriverNotFoundException e) {
throw new DriverUnExistException(); throw new DriverUnExistException();
} catch (RuntimeException e) {
if (e.getCause() instanceof DriverNotFoundException) {
throw new DriverUnExistException();
} else {
throw e;
}
} }
} }
@ -82,6 +88,12 @@ public class LocalConnectionSource extends BaseConnectionSource {
ConnectionProcessorFactory.updateConnection(bean.getConnectionName(), bean); ConnectionProcessorFactory.updateConnection(bean.getConnectionName(), bean);
} catch (DriverNotFoundException e) { } catch (DriverNotFoundException e) {
throw new DriverUnExistException(); throw new DriverUnExistException();
} catch (RuntimeException e) {
if (e.getCause() instanceof DriverNotFoundException) {
throw new DriverUnExistException();
} else {
throw e;
}
} }
} }

8
designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java

@ -56,7 +56,7 @@ public class UIDetailErrorLinkDialog extends UIDialog {
private static final String TAG_A_END = "</a>"; private static final String TAG_A_END = "</a>";
private static final double SCALE = 1.2; private static final double SCALE = 1.2;
private final Dimension dimension = new Dimension(360, 180); private final Dimension dimension = new Dimension(360, 200);
public static Builder newBuilder() { public static Builder newBuilder() {
return new Builder(); return new Builder();
@ -99,8 +99,10 @@ public class UIDetailErrorLinkDialog extends UIDialog {
contentPane.add(link, BorderLayout.SOUTH); contentPane.add(link, BorderLayout.SOUTH);
// 确定 + 取消 // 确定 + 取消
JPanel actionPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, GAP_10, GAP_8)); JPanel actionPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, GAP_8, GAP_10));
actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Report_OK"))); UIButton okButton = createButton(Toolkit.i18nText("Fine-Design_Report_OK"));
FineUIStyle.setStyle(okButton, FineUIStyle.STYLE_PRIMARY);
actionPane.add(okButton);
actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"))); actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")));
this.getContentPane().add(column(10, this.getContentPane().add(column(10,

2
designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java

@ -154,7 +154,7 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
* 设置变化的背景颜色 * 设置变化的背景颜色
*/ */
public void setBackgroundUIColor(Color color) { public void setBackgroundUIColor(Color color) {
// ((UITextFieldUI) this.ui).setBackgroundColor4NoGiveNumber(color); setBackground(color);
} }
/** /**

11
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -28,8 +28,6 @@ import com.fr.plugin.manage.control.PluginTaskCallback;
import com.fr.plugin.manage.control.PluginTaskResult; import com.fr.plugin.manage.control.PluginTaskResult;
import com.fr.plugin.manage.control.ProgressCallback; import com.fr.plugin.manage.control.ProgressCallback;
import com.fr.report.ReportHelper; import com.fr.report.ReportHelper;
import com.fr.rpc.ExceptionHandler;
import com.fr.rpc.RPCInvokerExceptionInfo;
import com.fr.rpc.Result; import com.fr.rpc.Result;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -39,7 +37,7 @@ import com.fr.workspace.engine.base.FineObjectPool;
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest; import com.fr.workspace.engine.channel.http.FunctionalHttpRequest;
import com.fr.workspace.engine.exception.WorkspaceConnectionException; import com.fr.workspace.engine.exception.WorkspaceConnectionException;
import com.fr.workspace.engine.rpc.WorkspaceProxyPool; import com.fr.workspace.engine.rpc.WorkspaceProxyPool;
import com.fr.workspace.server.check.VersionInfoOperator;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.ParsePosition; import java.text.ParsePosition;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -53,7 +51,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.swing.SwingWorker;
/** /**
* @author pengda * @author pengda
@ -285,16 +282,14 @@ public class VersionCheckUtils {
public static JSONArray checkLocalAndRemotePlugin() { public static JSONArray checkLocalAndRemotePlugin() {
JSONArray differentPlugins = new JSONArray(); JSONArray differentPlugins = new JSONArray();
JSONArray remotePlugins = FRContext.getCommonOperator().getPluginStatus(); List<JSONObject> remotePlugins = FRContext.getCommonOperator().getPluginStatus();
Map<String, PluginContext> localPluginsMap = new HashMap<>(); Map<String, PluginContext> localPluginsMap = new HashMap<>();
List<PluginContext> localPlugins = PluginManager.getContexts(); List<PluginContext> localPlugins = PluginManager.getContexts();
for (PluginContext pluginContext : localPlugins) { for (PluginContext pluginContext : localPlugins) {
localPluginsMap.put(pluginContext.getID(), pluginContext); localPluginsMap.put(pluginContext.getID(), pluginContext);
} }
JSONObject remotePlugin;
Map<String, String> pluginsNameMap = ReportHelper.getPluginNameMap(); Map<String, String> pluginsNameMap = ReportHelper.getPluginNameMap();
for (int i = 0; i < remotePlugins.size(); i++) { for (JSONObject remotePlugin : remotePlugins) {
remotePlugin = remotePlugins.getJSONObject(i);
if (isPluginNeedIgnore(remotePlugin)) { if (isPluginNeedIgnore(remotePlugin)) {
continue; continue;
} }

2
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -891,7 +891,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
vPane = new ValueEditorPane(types); vPane = new ValueEditorPane(types);
this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 45)); this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 45));
this.add(vPane); this.add(vPane);
vPane.setPreferredSize(new Dimension(220, 25)); vPane.setPreferredSize(scale(new Dimension(220, 25)));
} }
@Override @Override

6
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -172,6 +172,7 @@ public class FILEChooserPane extends BasicPane {
protected boolean showEnv; protected boolean showEnv;
protected boolean showLoc; protected boolean showLoc;
protected boolean showWebReport = false; protected boolean showWebReport = false;
protected boolean showMkdir = true;
private UIDialog dialog; private UIDialog dialog;
@ -245,6 +246,7 @@ public class FILEChooserPane extends BasicPane {
chooserPane.showEnv = true; chooserPane.showEnv = true;
chooserPane.showLoc = false; chooserPane.showLoc = false;
chooserPane.showWebReport = false; chooserPane.showWebReport = false;
chooserPane.showMkdir = false;
// 替换掉 PlaceListModel // 替换掉 PlaceListModel
chooserPane.setFileDataPlaceListModel(FileDataFILE.parseType(filter)); chooserPane.setFileDataPlaceListModel(FileDataFILE.parseType(filter));
chooserPane.removeAllFilter(); chooserPane.removeAllFilter();
@ -338,6 +340,7 @@ public class FILEChooserPane extends BasicPane {
mkdirButton = initMkdirButton(); mkdirButton = initMkdirButton();
locationPane.add(mkdirButton, BorderLayout.EAST); locationPane.add(mkdirButton, BorderLayout.EAST);
mkdirButton.setEnabled(showMkdir);
JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
// Richie:placesList includes C,D,E,F and DeskTop etc. // Richie:placesList includes C,D,E,F and DeskTop etc.
@ -1229,7 +1232,7 @@ public class FILEChooserPane extends BasicPane {
currentDirectory = dir; currentDirectory = dir;
this.locationBtnPane.populate(currentDirectory); this.locationBtnPane.populate(currentDirectory);
this.mkdirButton.setEnabled(currentDirectory != null); this.mkdirButton.setEnabled(currentDirectory != null && showMkdir);
refreshSubFileListModel(); refreshSubFileListModel();
} }
@ -1872,7 +1875,6 @@ public class FILEChooserPane extends BasicPane {
private UIButton initMkdirButton() { private UIButton initMkdirButton() {
UIButton folderButton = new UIButton(); UIButton folderButton = new UIButton();
folderButton.setIcon(new LazyIcon("new_folder")); folderButton.setIcon(new LazyIcon("new_folder"));
folderButton.setUI(new UIButtonUI());
folderButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Utils_New_Folder")); folderButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Utils_New_Folder"));
folderButton.addActionListener(new ActionListener() { folderButton.addActionListener(new ActionListener() {
@Override @Override

1
designer-chart/src/main/java/com/fr/design/chartx/component/correlation/AbstractCorrelationPane.java

@ -81,6 +81,7 @@ public abstract class AbstractCorrelationPane<T> extends BasicBeanPane<T> {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
tablePane.addLine(createLine()); tablePane.addLine(createLine());
tablePane.doParentRepaintEvent();
fireTargetChanged(); fireTargetChanged();
} }
}; };

5
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeBeautyPane.java

@ -10,6 +10,7 @@ import com.fr.plugin.chart.type.GradientType;
import com.fr.van.chart.designer.component.VanChartBeautyPane; import com.fr.van.chart.designer.component.VanChartBeautyPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -57,7 +58,9 @@ public class VanChartGaugeBeautyPane extends VanChartBeautyPane {
} }
private void checkGradientBarVisible() { private void checkGradientBarVisible() {
gradientBarPane.setVisible(getGradientTypeBox().getSelectedIndex() == 1); SwingUtilities.invokeLater(() -> {
gradientBarPane.setVisible(getGradientTypeBox().getSelectedIndex() == 1);
});
} }
protected String[] getNameArray() { protected String[] getNameArray() {

11
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

@ -119,17 +119,6 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
JPanel stylePane = valueFillStylePane == null ? new JPanel() : valueFillStylePane; JPanel stylePane = valueFillStylePane == null ? new JPanel() : valueFillStylePane;
colorPickerPane = new ColorPickerPaneWithMaxMin(parentPane, "meterString", valueFillStylePane) { colorPickerPane = new ColorPickerPaneWithMaxMin(parentPane, "meterString", valueFillStylePane) {
protected int getBoundX() {
return 0;
}
protected int getBoundY() {
return 10;
}
protected int getPreferredMarginY() {
return 10;
}
protected double getDescriptionWidth() { protected double getDescriptionWidth() {
double descriptionWidth = super.getDescriptionWidth(); double descriptionWidth = super.getDescriptionWidth();

11
designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java vendored

@ -9,9 +9,15 @@ import com.fanruan.carina.annotions.Stop;
import com.fanruan.carina.annotions.Supplemental; import com.fanruan.carina.annotions.Supplemental;
import com.fanruan.plugin.autonomy.AutonomyClassManagerGroup; import com.fanruan.plugin.autonomy.AutonomyClassManagerGroup;
import com.fanruan.plugin.autonomy.AutonomyClassManagerProvider; import com.fanruan.plugin.autonomy.AutonomyClassManagerProvider;
import com.fr.json.JSONObject;
import com.fr.plugin.ExtraClassManager; import com.fr.plugin.ExtraClassManager;
import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.PluginSyncModuleType;
import com.fr.workspace.server.repository.plugin.PluginRepository;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import java.util.List;
import java.util.function.Supplier;
/** /**
* 设计器插件模块环境切换的中间模块 * 设计器插件模块环境切换的中间模块
@ -38,6 +44,11 @@ public class DesignPluginComponent extends PluginComponent {
@Start @Start
public void start() { public void start() {
ExtraClassManager.getInstance().registerAutonomyClassManager(Carina.getApplicationContext().group(AutonomyClassManagerGroup.class).getAll().toArray(new AutonomyClassManagerProvider[0])); ExtraClassManager.getInstance().registerAutonomyClassManager(Carina.getApplicationContext().group(AutonomyClassManagerGroup.class).getAll().toArray(new AutonomyClassManagerProvider[0]));
Supplier<List<JSONObject>> supplier = () -> PluginRepository.getInstance().getPluginStatus();
PluginManager.registerRemotePluginSupplier(supplier);
PluginManager.setSyncModuleType(PluginSyncModuleType.DESIGN);
super.start(); super.start();
} }

10
designer-realize/src/main/java/com/fanruan/boot/env/function/app/PluginRemote.java vendored

@ -1,7 +1,6 @@
package com.fanruan.boot.env.function.app; package com.fanruan.boot.env.function.app;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.json.JSONArray;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -12,6 +11,7 @@ import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
@ -57,19 +57,17 @@ public class PluginRemote {
private Map<String, PluginStatus> getRemoteStatus() { private Map<String, PluginStatus> getRemoteStatus() {
JSONArray statusArray = FRContext.getCommonOperator().getPluginStatus(); List<JSONObject> objectList = FRContext.getCommonOperator().getPluginStatus();
JSONObject status;
String id; String id;
String version; String version;
boolean running; boolean running;
Map<String, PluginStatus> statusMap = new HashMap<>(); Map<String, PluginStatus> statusMap = new HashMap<>();
for (int i = 0; i < statusArray.length(); i++) { for (JSONObject status : objectList) {
try { try {
status = statusArray.getJSONObject(i);
id = status.getString("id"); id = status.getString("id");
version = status.getString("version"); version = status.getString("version");
running = status.getBoolean("running"); running = status.getBoolean("running");
if(StringUtils.isBlank(id)){ if (StringUtils.isBlank(id)) {
continue; continue;
} }
PluginStatus pluginStatus = PluginStatus.create(id, version, running); PluginStatus pluginStatus = PluginStatus.create(id, version, running);

2
designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java

@ -63,6 +63,7 @@ import com.fr.workspace.server.repository.compatible.register.CompatibleRegister
import com.fanruan.workplace.network.RemoteNetworkRepository; import com.fanruan.workplace.network.RemoteNetworkRepository;
import com.fr.workspace.server.repository.config.ConfigRepository; import com.fr.workspace.server.repository.config.ConfigRepository;
import com.fr.workspace.server.repository.connection.ConnectionRepository; import com.fr.workspace.server.repository.connection.ConnectionRepository;
import com.fr.workspace.server.repository.plugin.PluginRepository;
import com.fr.workspace.server.repository.resource.PublicResourceRepository; import com.fr.workspace.server.repository.resource.PublicResourceRepository;
import com.fr.workspace.server.repository.resource.WorkResourceRepository; import com.fr.workspace.server.repository.resource.WorkResourceRepository;
import com.fr.workspace.server.repository.system.SystemInfoRepository; import com.fr.workspace.server.repository.system.SystemInfoRepository;
@ -112,6 +113,7 @@ public class DesignWorkContextComponent {
RepositoryManager.getInstance().pureRegisterRepo4Start(WorkResourceRepository.getInstance()); RepositoryManager.getInstance().pureRegisterRepo4Start(WorkResourceRepository.getInstance());
RepositoryManager.getInstance().pureRegisterRepo4Start(PublicResourceRepository.getInstance()); RepositoryManager.getInstance().pureRegisterRepo4Start(PublicResourceRepository.getInstance());
RepositoryManager.getInstance().pureRegisterRepo4Start(ConfigRepository.getInstance()); RepositoryManager.getInstance().pureRegisterRepo4Start(ConfigRepository.getInstance());
RepositoryManager.getInstance().pureRegisterRepo4Start(PluginRepository.getInstance());
RepositoryManager.getInstance().initLocalRepository(); RepositoryManager.getInstance().initLocalRepository();
CompatibleRegister.registerCompatibleEnv(); CompatibleRegister.registerCompatibleEnv();
for (WorkRPCRegister<?> workRPCRegister : ServiceContext.group(WorkspaceKey.class).getAll()) { for (WorkRPCRegister<?> workRPCRegister : ServiceContext.group(WorkspaceKey.class).getAll()) {

Loading…
Cancel
Save