Browse Source

Pull request #14706: REPORT-130891 【FBP数据源】url方式预览文件数据集失败 & REPORT-131288 【取数优化】先启本地工程,就不会有数据中心的入口,必须直接远程状态启用才可以

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/release to fbp/release

* commit 'c10aebec6848ef9db8748eafbabb254b6426a812':
  REPORT-131288 【取数优化】先启本地工程,就不会有数据中心的入口,必须直接远程状态启用才可以
  REPORT-130891 【FBP数据源】url方式预览文件数据集失败
fbp/release
Destiny.Lin-林锦龙 3 months ago
parent
commit
6af61b4f65
  1. 7
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  2. 4
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  3. 12
      designer-base/src/main/java/com/fr/design/data/tabledata/LocalTableDataSource.java
  4. 16
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  5. 1
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  6. 9
      designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java

7
designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java

@ -352,6 +352,13 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
}); });
} }
} }
/**
* 重置
*/
public void resetAddMenuDef() {
this.addMenuDef.clearShortCuts();
this.createAddMenuDef();
}
private abstract class TDAction extends UpdateAction { private abstract class TDAction extends UpdateAction {

4
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -646,10 +646,6 @@ public class TableDataTreePane extends BasicTableDataTreePane {
} }
private void resetAddMenuDef() {
this.addMenuDef.clearShortCuts();
this.createAddMenuDef();
}
/** /**
* 感觉这里把一堆Action和Op之类的送到抽象类里去检查很奇怪抽象类本身定义的Action只有add和connection * 感觉这里把一堆Action和Op之类的送到抽象类里去检查很奇怪抽象类本身定义的Action只有add和connection

12
designer-base/src/main/java/com/fr/design/data/tabledata/LocalTableDataSource.java

@ -1,8 +1,10 @@
package com.fr.design.data.tabledata; package com.fr.design.data.tabledata;
import com.fanruan.config.impl.data.TableDataConfigProviderFactory; import com.fanruan.config.impl.data.TableDataConfigProviderFactory;
import com.fr.decision.webservice.bean.dataset.FileDataSetBean;
import com.fr.decision.webservice.bean.entry.FileNodeBean; import com.fr.decision.webservice.bean.entry.FileNodeBean;
import com.fr.decision.webservice.v10.datasource.dataset.processor.impl.FileProcessor; import com.fr.decision.webservice.v10.datasource.dataset.processor.impl.FileProcessor;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.tabledata.BaseTableDataSource; import com.fr.workspace.server.repository.tabledata.BaseTableDataSource;
@ -49,4 +51,14 @@ public class LocalTableDataSource extends BaseTableDataSource {
public List<FileNodeBean> getFileList(String fileType) { public List<FileNodeBean> getFileList(String fileType) {
return FileProcessor.KEY.getFileList(fileType, StringUtils.EMPTY); return FileProcessor.KEY.getFileList(fileType, StringUtils.EMPTY);
} }
@Override
public boolean testFilePath(FileDataSetBean fileDataSetBean) {
try {
return FileProcessor.KEY.testFilePath(fileDataSetBean);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
}
} }

16
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -14,6 +14,7 @@ import com.fr.data.impl.ExcelTableData;
import com.fr.data.impl.FileTableData; import com.fr.data.impl.FileTableData;
import com.fr.data.impl.TextTableData; import com.fr.data.impl.TextTableData;
import com.fr.data.impl.XMLTableData; import com.fr.data.impl.XMLTableData;
import com.fr.decision.webservice.bean.dataset.FileDataSetBean;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.datapane.preview.PreviewTablePane;
@ -47,6 +48,7 @@ import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLReadable;
import com.fr.stable.xml.XMLableReader; import com.fr.stable.xml.XMLableReader;
import com.fr.workspace.server.repository.tabledata.TableDataRepository;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
@ -233,22 +235,20 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} }
params = getEditorPaneParameter(); params = getEditorPaneParameter();
URLDataSource url = new URLDataSource(urlText.getText().trim(), params); URLDataSource url = new URLDataSource(urlText.getText().trim(), params);
InputStream in = null; boolean result = false;
try { try {
in = url.getSourceStream(params); String urlText = ParameterHelper.analyze4Templatee(url.getUrl(), params);
FileDataSetBean bean = new FileDataSetBean();
bean.setFilePath(urlText);
result = TableDataRepository.getInstance().testFilePath(bean);
} catch (Throwable e) { } catch (Throwable e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
if (in == null) { if (!result) {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"), FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
} else { } else {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully"));
try {
in.close();
} catch (IOException e) {
in = null;
}
} }
} }
}; };

1
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -755,6 +755,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
refresh(); refresh();
DesignerFrameFileDealerPane.getInstance().refreshDockingView(); DesignerFrameFileDealerPane.getInstance().refreshDockingView();
TemplateTreePane.getInstance().refreshDockingView(); TemplateTreePane.getInstance().refreshDockingView();
TableDataTreePane.getInstanceWithoutRefreshEverytime(DesignModelAdapter.getCurrentModelAdapter()).resetAddMenuDef();
} }
/** /**

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

@ -5,6 +5,7 @@ import com.fanruan.carina.Carina;
import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.DependsOn;
import com.fanruan.carina.annotions.FineComponent; import com.fanruan.carina.annotions.FineComponent;
import com.fanruan.carina.annotions.Start; import com.fanruan.carina.annotions.Start;
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;
@ -44,4 +45,12 @@ public class DesignPluginComponent extends PluginComponent {
protected void addPluginStoreFilter(ServletContext servletContext) { protected void addPluginStoreFilter(ServletContext servletContext) {
// do nothing // do nothing
} }
/**
* stop
*/
@Stop
public void stop() {
super.stop();
}
} }

Loading…
Cancel
Save