diff --git a/doc/docs/guide/README.md b/doc/docs/guide/README.md index 3422216f..9310ab2c 100644 --- a/doc/docs/guide/README.md +++ b/doc/docs/guide/README.md @@ -9,7 +9,7 @@ 内置的基础功能包括数据源,数据集,报表管理,项目部分截图如下。
##数据流程图 -![An image](../picture/img.png) +![An image](docs/picture/datasource/img.png) ## 打包目录 ``` diff --git a/doc/docs/guide/datasource.md b/doc/docs/guide/datasource.md index 1fccaef1..ed3a89ac 100644 --- a/doc/docs/guide/datasource.md +++ b/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) + diff --git a/doc/docs/picture/img.png b/doc/docs/picture/datasource/img.png similarity index 100% rename from doc/docs/picture/img.png rename to doc/docs/picture/datasource/img.png diff --git a/doc/docs/picture/datasource/kudu-impala-lib.png b/doc/docs/picture/datasource/kudu-impala-lib.png new file mode 100644 index 00000000..21a8e0ed Binary files /dev/null and b/doc/docs/picture/datasource/kudu-impala-lib.png differ diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java index dd9e186b..1656bd23 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java +++ b/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; + } + } } //执行 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java index de232e15..6fef3da1 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java +++ b/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 list = reportDashboardWidgetService.list( diff --git a/report-ui/config/dev.env.js b/report-ui/config/dev.env.js index f50fc84e..ee3d90dc 100644 --- a/report-ui/config/dev.env.js +++ b/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"' })