Browse Source

init

master
Zhenfei.Li 4 years ago
parent
commit
2742853218
  1. 16
      README.md
  2. 4
      build.xml
  3. BIN
      fr-plugin-pack-request-0.0.1.zip
  4. 19
      plugin.xml
  5. 2
      src/main/java/com/fr/plugin/pack/ReportBridge.java
  6. 2
      src/main/java/com/fr/plugin/pack/ReportDef.java
  7. 2
      src/main/resources/com/fr/plugin/pack/report.js

16
README.md

@ -1,2 +1,16 @@
### 插件调试环境搭建
1.
1. clone仓库到BI仓库同级目录,编辑nuclear-maven的pom.xml,引用插件目录
![企业微信截图_6fc59751-44ef-4edc-87c9-50cdf55446dc.png](https://upload-images.jianshu.io/upload_images/4968021-00eb069a3643dbaa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2. 在工程目录的WEB-INF的plugins文件夹下新建如图文件夹,将工程中的plugin.xml复制过去(或者直接安装根目录中打包好的zip插件,会自动建这样的文件夹)
![企业微信截图_474e2f8b-cbe9-418e-b78a-7ca959dd11bf.png](https://upload-images.jianshu.io/upload_images/4968021-fab0e6337b93feae.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3. 修改插件pom中的output,改成工程中插件文件夹的classes即可。
![企业微信截图_9f29fc43-b522-479a-81b9-0328437593e9.png](https://upload-images.jianshu.io/upload_images/4968021-c04479609de5a404.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4. 正常build,起工程,断点调试
### 打包插件
1. 修改build.xml的jdk.home和classes
![image.png](https://upload-images.jianshu.io/upload_images/4968021-364bdcc061f6007e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2. idea的ant直接添加工程中的build.xml即可
![image.png](https://upload-images.jianshu.io/upload_images/4968021-510012c5932a1e6f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3. build后会生成classes,然后直接打包即可

4
build.xml

@ -7,12 +7,12 @@
<!-- <property name="FRLibs" value="E:\jar-FR\10.0-idea"/>-->
<property name="destLoc" value="."/>
<property name="classes" value="/Users/leezerofly/env/direct-bi/WEB-INF/plugins/plugin-com.fr.plugin.hw.import.excel-2.0.0/classes"/>
<property name="classes" value="/Users/leezerofly/env/direct-bi/WEB-INF/plugins/plugin-com.fr.plugin.pack.request-0.0.1/classes"/>
<xmlproperty file="${basedir}/plugin.xml"/>
<property name="current-version" value="${plugin.version}"/>
<property name="current-id" value="${plugin.id}"/>
<property name="plugin-version" value="${current-version}"/>
<property name="plugin-name" value="hwExcelExport"/>
<property name="plugin-name" value="pack-request"/>
<property name="plugin-jar" value="fr-plugin-${plugin-name}-${plugin-version}.jar"/>
<!-- <target name="prepare">-->
<!-- <delete dir="${classes}"/>-->

BIN
fr-plugin-pack-request-0.0.1.zip

Binary file not shown.

19
plugin.xml

@ -8,25 +8,10 @@
<vendor>帆软</vendor>
<description><![CDATA[将仪表板获取组件信息的请求打包,提高加载速度]]></description>
<change-notes><![CDATA[]]></change-notes>
<main-package>com.fr.plugin.pack</main-package>
<function-recorder class="com.fr.plugin.pack.ReportBridge"/>
<extra-decision>
<WebResourceProvider class="com.fr.plugin.pack.ReportBridge"/>
<WebResourceProvider class="com.fr.plugin.pack.ShowBridge"/>
</extra-decision>
<!-- <extra-decision>-->
<!-- <SystemOptionProvider class="com.fr.plugin.decision.HWOptionProvider"/>-->
<!-- <HttpHandlerProvider class="com.fr.plugin.decision.request.HWHandlerProvider"/>-->
<!-- <URLAliasProvider class="com.fr.plugin.decision.request.HWURLAliasProvider"/>-->
<!-- <HttpHandlerProvider class="com.fr.plugin.decision.ExcelMngHandleBridge"/>-->
<!-- <URLAliasProvider class="com.fr.plugin.decision.ExcelMngAliasBridge"/>-->
<!-- </extra-decision>-->
<!-- <extra-core>-->
<!-- <DBAccessProvider class="com.fr.plugin.decision.ExcelMngConfigAccessBridge"/>-->
<!-- <DBAccessProvider class="com.fr.plugin.decision.ReuseConfigAccessBridge"/>-->
<!-- <DialectCreator class="com.fr.plugin.decision.dialect.DialectCreator"/>-->
<!-- </extra-core>-->
<function-recorder class="com.fr.plugin.decision.ReportBridge"/>
<!-- <function-recorder class="com.fr.plugin.decision.HWOptionProvider"/>-->
</plugin>

2
src/main/java/com/fr/plugin/pack/ReportBridge.java

@ -2,8 +2,10 @@ package com.fr.plugin.pack;
import com.finebi.conf.internalimp.component.ReportComponent;
import com.fr.decision.fun.impl.AbstractWebResourceProvider;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.web.struct.Atom;
@FunctionRecorder
public class ReportBridge extends AbstractWebResourceProvider {
@Override
public Atom attach() {

2
src/main/java/com/fr/plugin/pack/ReportDef.java

@ -6,7 +6,7 @@ import com.fr.web.struct.browser.RequestClient;
import com.fr.web.struct.category.ScriptPath;
import com.fr.web.struct.category.StylePath;
public class ReportDef extends Component {
public class ReportDef extends Component {
public static final ReportDef KEY = new ReportDef();
public ReportDef(){}
public ScriptPath script(RequestClient client ) {

2
src/main/resources/com/fr/plugin/pack/report.js

@ -1,5 +1,5 @@
;(function() {
console.log("report js loaded");
console.log("edit js loaded");
})();

Loading…
Cancel
Save