Procházet zdrojové kódy

Merge branch 'master' of https://gitee.com/anji-plus/report

qianlishi před 4 roky
rodič
revize
ecb00428f4

+ 1 - 1
doc/docs/guide/README.md

@@ -9,7 +9,7 @@
 内置的基础功能包括数据源,数据集,报表管理,项目部分截图如下。<br>
 
 ##数据流程图
-![An image](../picture/img.png)
+![An image](docs/picture/datasource/img.png)
 
 ## 打包目录
 ```

+ 7 - 1
doc/docs/guide/datasource.md

@@ -16,10 +16,16 @@
 - 只有测试通过的数据源才可以保存
 
 
-![An image](../picture/img.png)
+![An image](../picture/datasource/img.png)
 
 
 
+## 扩展
+- 以kudu impala 为例,在lib文件夹下加入kudu impala相关的JDBC连接相关的包,如图
+- 在数据库中新增数据源类型,参考数据源类型(上方)
+
+![An image](../picture/datasource/kudu-impala-lib.png)
+
 
   
   

+ 0 - 0
doc/docs/picture/img.png → doc/docs/picture/datasource/img.png


binární
doc/docs/picture/datasource/kudu-impala-lib.png


+ 20 - 0
report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java

@@ -57,6 +57,26 @@ public class TokenFilter implements Filter {
 
             //延长有效期
             cacheHelper.stringSetExpire(username, authorization, 3600);
+
+
+            //在线体验版本
+            if (username.equals("guest")
+                    && !uri.endsWith("/dataSet/testTransform")
+                    && !uri.endsWith("/reportDashboard/getData")
+                    && !uri.startsWith("/dict")
+                    && !uri.startsWith("/dict")
+            ) {
+                //不允许删除
+                String method = request.getMethod();
+                if ("post".equalsIgnoreCase(method)
+                        || "put".equalsIgnoreCase(method)
+                        || "delete".equalsIgnoreCase(method)
+                ) {
+                    ResponseBean responseBean = ResponseBean.builder().code("50001").message("在线体验版本,不允许此操作。请自行下载本地运行").build();
+                    response.getWriter().print(JSONObject.toJSONString(responseBean));
+                    return;
+                }
+            }
         }
 
         //执行

+ 3 - 1
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java

@@ -67,7 +67,9 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi
         ReportDashboardObjectDto result = new ReportDashboardObjectDto();
         ReportDashboardDto reportDashboardDto = new ReportDashboardDto();
         ReportDashboard reportDashboard = this.selectOne("report_code", reportCode);
-        GaeaAssert.notNull(reportDashboard, ResponseCode.RULE_CONTENT_NOT_EXIST, "reportDashboard");
+        if (null == reportDashboard) {
+            return new ReportDashboardObjectDto();
+        }
         GaeaBeanUtils.copyAndFormatter(reportDashboard, reportDashboardDto);
 
         List<ReportDashboardWidget> list = reportDashboardWidgetService.list(

+ 2 - 2
report-ui/config/dev.env.js

@@ -4,6 +4,6 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  // BASE_API: '"http://127.0.0.1:9095"'
-  BASE_API: '"http://10.108.26.197:9095"'
+  BASE_API: '"http://127.0.0.1:9095"'
+  // BASE_API: '"http://10.108.26.197:9095"'
 })