diff --git a/Dockerfile b/Dockerfile index 5e7123a861..f5118e68fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,9 @@ FROM registry.cn-qingdao.aliyuncs.com/dataease/alpine-openjdk17-jre ARG IMAGE_TAG -RUN mkdir -p /opt/apps/config /opt/dataease/drivers/ /opt/dataease2.0/cache/ /opt/dataease2.0/data/map /opt/dataease2.0/data/static-resource/ +RUN mkdir -p /opt/apps/config /opt/dataease2.0/drivers/ /opt/dataease2.0/cache/ /opt/dataease2.0/data/map /opt/dataease2.0/data/static-resource/ -ADD drivers/* /opt/dataease/drivers/ +ADD drivers/* /opt/dataease2.0/drivers/ ADD mapFiles/ /opt/dataease2.0/data/map/ ADD staticResource/ /opt/dataease2.0/data/static-resource/ diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java index 6be80e7fa5..85fb492f54 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java @@ -31,6 +31,7 @@ import io.dataease.license.config.XpackInteract; import io.dataease.model.BusiNodeRequest; import io.dataease.model.BusiNodeVO; import io.dataease.operation.manage.CoreOptRecentManage; +import io.dataease.system.manage.CoreUserManage; import io.dataease.utils.*; import jakarta.annotation.Resource; import org.apache.commons.lang3.ObjectUtils; @@ -71,6 +72,9 @@ public class DatasetGroupManage { @Autowired(required = false) private UserApi userApi; + @Resource + private CoreUserManage coreUserManage; + @Resource private CoreOptRecentManage coreOptRecentManage; @@ -232,13 +236,13 @@ public class DatasetGroupManage { DataSetBarVO dataSetBarVO = coreDataSetExtMapper.queryBarInfo(id); // get creator if (userApi != null) { - UserFormVO userFormVO = userApi.queryById(Long.valueOf(dataSetBarVO.getCreateBy())); - if (userFormVO != null) { - dataSetBarVO.setCreator(userFormVO.getName()); + String userName = coreUserManage.getUserName(Long.valueOf(dataSetBarVO.getCreateBy())); + if (StringUtils.isNotBlank(userName)) { + dataSetBarVO.setCreator(userName); } - UserFormVO userFormVOUpdateBy = userApi.queryById(Long.valueOf(dataSetBarVO.getUpdateBy())); - if (userFormVOUpdateBy != null) { - dataSetBarVO.setUpdater(userFormVOUpdateBy.getName()); + String updateUserName = coreUserManage.getUserName(Long.valueOf(dataSetBarVO.getUpdateBy())); + if (StringUtils.isNotBlank(updateUserName)) { + dataSetBarVO.setUpdater(updateUserName); } } dataSetBarVO.setDatasourceDTOList(getDatasource(id)); diff --git a/core/core-backend/src/main/java/io/dataease/datasource/provider/CalciteProvider.java b/core/core-backend/src/main/java/io/dataease/datasource/provider/CalciteProvider.java index a6a421b4a3..15c1e4a30d 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/provider/CalciteProvider.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/provider/CalciteProvider.java @@ -53,8 +53,8 @@ public class CalciteProvider { private EngineServer engineServer; protected ExtendedJdbcClassLoader extendedJdbcClassLoader; private Map customJdbcClassLoaders = new HashMap<>(); - private final String FILE_PATH = "/opt/dataease/drivers"; - private final String CUSTOM_PATH = "/opt/dataease/custom-drivers/"; + private final String FILE_PATH = "/opt/dataease2.0/drivers"; + private final String CUSTOM_PATH = "/opt/dataease2.0/custom-drivers/"; private static String split = "DE"; @Resource diff --git a/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java b/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java index b4c3059602..9fa6b85ca0 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java @@ -35,7 +35,7 @@ import java.util.stream.Collectors; public class ExcelUtils { public static final String UFEFF = "\uFEFF"; - private static String path = "/opt/dataease/data/excel/"; + private static String path = "/opt/dataease2.0/data/excel/"; private static ObjectMapper objectMapper = new ObjectMapper(); private static TypeReference> TableFieldListTypeReference = new TypeReference>() { diff --git a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceDriverServer.java b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceDriverServer.java index 52e6f48ae1..8e8cc6499d 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceDriverServer.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceDriverServer.java @@ -31,7 +31,7 @@ import java.util.*; @RequestMapping("/datasourceDriver") public class DatasourceDriverServer implements DatasourceDriverApi { - private final static String DRIVER_PATH = "/opt/dataease/custom-drivers/"; + private final static String DRIVER_PATH = "/opt/dataease2.0/custom-drivers/"; @Resource private CoreDriverMapper coreDriverMapper; diff --git a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java index 91a8a00ab3..0419d7a4d1 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java @@ -14,8 +14,6 @@ import io.dataease.api.ds.DatasourceApi; import io.dataease.api.ds.vo.*; import io.dataease.api.permissions.auth.api.InteractiveAuthApi; import io.dataease.api.permissions.auth.dto.BusiResourceEditor; -import io.dataease.api.permissions.user.api.UserApi; -import io.dataease.api.permissions.user.vo.UserFormVO; import io.dataease.commons.constants.TaskStatus; import io.dataease.commons.utils.CommonThreadPool; import io.dataease.constant.DataSourceType; @@ -34,13 +32,13 @@ import io.dataease.datasource.provider.ApiUtils; import io.dataease.datasource.provider.CalciteProvider; import io.dataease.datasource.provider.ExcelUtils; import io.dataease.datasource.request.DatasourceRequest; -import io.dataease.datasource.type.Pg; import io.dataease.engine.constant.SQLConstants; import io.dataease.exception.DEException; import io.dataease.i18n.Translator; import io.dataease.license.config.XpackInteract; import io.dataease.model.BusiNodeRequest; import io.dataease.model.BusiNodeVO; +import io.dataease.system.manage.CoreUserManage; import io.dataease.utils.*; import jakarta.annotation.Resource; import org.apache.commons.lang3.ObjectUtils; @@ -89,11 +87,13 @@ public class DatasourceServer implements DatasourceApi { private CoreDsFinishPageMapper coreDsFinishPageMapper; @Resource private DatasetDataManage datasetDataManage; - @Autowired(required = false) - private UserApi userApi; + @Autowired(required = false) private InteractiveAuthApi interactiveAuthApi; + @Resource + private CoreUserManage coreUserManage; + @Override public List query(String keyWord) { return null; @@ -311,16 +311,16 @@ public class DatasourceServer implements DatasourceApi { private static void checkParams(String configurationStr) { DatasourceConfiguration configuration = JsonUtil.parseObject(configurationStr, DatasourceConfiguration.class); - if(configuration.getInitialPoolSize() < configuration.getMinPoolSize()){ + if (configuration.getInitialPoolSize() < configuration.getMinPoolSize()) { DEException.throwException("初始连接数不能小于最小连接数!"); } - if(configuration.getInitialPoolSize() > configuration.getMaxPoolSize()){ + if (configuration.getInitialPoolSize() > configuration.getMaxPoolSize()) { DEException.throwException("初始连接数不能大于最大连接数!"); } - if(configuration.getMaxPoolSize() < configuration.getMinPoolSize()){ + if (configuration.getMaxPoolSize() < configuration.getMinPoolSize()) { DEException.throwException("最大连接数不能小于最小连接数!"); } - if(configuration.getQueryTimeout() < 0){ + if (configuration.getQueryTimeout() < 0) { DEException.throwException("查询超时不能小于0!"); } } @@ -540,12 +540,8 @@ public class DatasourceServer implements DatasourceApi { } datasourceDTO.setConfiguration(new String(Base64.getEncoder().encode(datasourceDTO.getConfiguration().getBytes()))); - if (userApi != null) { - UserFormVO userFormVO = userApi.queryById(Long.valueOf(datasourceDTO.getCreateBy())); - if (userFormVO != null) { - datasourceDTO.setCreator(userFormVO.getName()); - } - } + datasourceDTO.setCreator(coreUserManage.getUserName(Long.valueOf(datasourceDTO.getCreateBy()))); + return datasourceDTO; } @@ -882,7 +878,7 @@ public class DatasourceServer implements DatasourceApi { List datasetTableDTOS = ApiUtils.getTables(datasourceRequest); for (int i = 0; i < pager.getRecords().size(); i++) { for (int i1 = 0; i1 < datasetTableDTOS.size(); i1++) { - if(pager.getRecords().get(i).getTableName().equalsIgnoreCase(datasetTableDTOS.get(i1).getTableName())){ + if (pager.getRecords().get(i).getTableName().equalsIgnoreCase(datasetTableDTOS.get(i1).getTableName())) { pager.getRecords().get(i).setName(datasetTableDTOS.get(i1).getName()); } } diff --git a/core/core-backend/src/main/java/io/dataease/system/manage/CoreUserManage.java b/core/core-backend/src/main/java/io/dataease/system/manage/CoreUserManage.java new file mode 100644 index 0000000000..1c4e7273d1 --- /dev/null +++ b/core/core-backend/src/main/java/io/dataease/system/manage/CoreUserManage.java @@ -0,0 +1,14 @@ +package io.dataease.system.manage; + +import io.dataease.license.config.XpackInteract; +import org.springframework.stereotype.Component; + +@Component +public class CoreUserManage { + + + @XpackInteract(value = "coreUserManage", replace = true) + public String getUserName(Long uid) { + return "管理员"; + } +} diff --git a/core/core-frontend/src/assets/svg/icon_file-add_outlined.svg b/core/core-frontend/src/assets/svg/icon_file-add_outlined.svg new file mode 100644 index 0000000000..669ede9080 --- /dev/null +++ b/core/core-frontend/src/assets/svg/icon_file-add_outlined.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 65515fa7a5..84f59fd58d 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -264,7 +264,7 @@ export default { data_source_table: '数据源表', auth_method: '认证方式', passwd: '用户名密码', - kerbers_info: '请确保 krb5.Conf、Keytab Key,已经添加到路径:/opt/dataease/conf', + kerbers_info: '请确保 krb5.Conf、Keytab Key,已经添加到路径:/opt/dataease2.0/conf', client_principal: 'Client Principal', keytab_Key_path: 'Keytab Key Path', please_select_left: '请从左侧选择', diff --git a/core/core-frontend/src/views/about/index.vue b/core/core-frontend/src/views/about/index.vue index abb872e2ca..2cb88be0b9 100644 --- a/core/core-frontend/src/views/about/index.vue +++ b/core/core-frontend/src/views/about/index.vue @@ -150,7 +150,7 @@ const update = (licKey: string) => {
{{ $t('about.version') }}
- {{ license.edition === 'Standard' ? $t('about.standard') : $t('about.enterprise') }} + {{ !license?.edition ? $t('about.standard') : $t('about.enterprise') }}
diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts index 817ab36a17..ead63e3e82 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts @@ -116,6 +116,7 @@ export class Bar extends G2PlotChartView { pre[next.id] = next return pre }, {}) + // 默认是灰色 tmpOptions.label.style.fill = DEFAULT_LABEL.color const label = { fields: [], @@ -242,6 +243,7 @@ export class StackBar extends Bar { return baseOptions } const { label: labelAttr } = parseJson(chart.customAttr) + baseOptions.label.style.fill = labelAttr.color const label = { ...baseOptions.label, formatter: function (param: Datum) { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts index 2d7e5b9f3c..1ddc990762 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts @@ -164,11 +164,12 @@ export class HorizontalBar extends G2PlotChartView { } setupDefaultOptions(chart: ChartObj): ChartObj { - const { customAttr } = chart + const { customAttr, senior } = chart const { label } = customAttr if (!['left', 'middle', 'right'].includes(label.position)) { label.position = 'middle' } + senior.functionCfg.emptyDataStrategy = 'ignoreData' return chart } @@ -185,6 +186,7 @@ export class HorizontalBar extends G2PlotChartView { pre[next.id] = next return pre }, {}) + // 默认灰色 tmpOptions.label.style.fill = DEFAULT_LABEL.color const label = { fields: [], @@ -272,6 +274,7 @@ export class HorizontalStackBar extends HorizontalBar { return baseOptions } const { label: labelAttr } = parseJson(chart.customAttr) + baseOptions.label.style.fill = labelAttr.color const label = { ...baseOptions.label, formatter: function (param: Datum) { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts index e9acde25b3..0fdfb9cce3 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts @@ -78,7 +78,7 @@ export class WordCloud extends G2PlotChartView { const options = this.setupOptions(chart, initOptions) const newChart = new G2WordCloud(container, options) newChart.on('point:click', param => { - action({ data: { data: param.data.data.datum } }) + action({ x: param.x, y: param.y, data: { data: param.data.data.datum } }) }) return newChart } diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index 876d8e24d6..bbba4c9256 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -311,8 +311,7 @@ defineExpose({ - - +
diff --git a/core/core-frontend/src/views/visualized/data/dataset/index.vue b/core/core-frontend/src/views/visualized/data/dataset/index.vue index 8a844bbf93..68e58dd4c4 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/index.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/index.vue @@ -443,7 +443,7 @@ const filterNode = (value: string, data: BusiTreeNode) => { - + diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue index 59fcaf0680..7b0b1b2d7d 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue @@ -654,7 +654,7 @@ onMounted(() => { - + diff --git a/de-xpack b/de-xpack index c2c4436bac..7a4f9a2de6 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit c2c4436bac4d300e5297ff1854fd6d45e01435ad +Subproject commit 7a4f9a2de62a8ff0b544f2660bef3838cc09d6de diff --git a/installer/dataease/apisix/apisix_conf/config.yaml b/installer/dataease/apisix/apisix_conf/config.yaml index 3febcbe10a..1b4a894470 100644 --- a/installer/dataease/apisix/apisix_conf/config.yaml +++ b/installer/dataease/apisix/apisix_conf/config.yaml @@ -1,4 +1,4 @@ -pisix: +apisix: node_listen: 9080 # APISIX listening port enable_ipv6: false diff --git a/installer/dataease/docker-compose-apisix.yml b/installer/dataease/docker-compose-apisix.yml index e7e60626d7..231c894670 100644 --- a/installer/dataease/docker-compose-apisix.yml +++ b/installer/dataease/docker-compose-apisix.yml @@ -2,7 +2,7 @@ version: "3" services: apisix-dashboard: - image: apache/apisix-dashboard:3.0.1-alpine + image: registry.cn-qingdao.aliyuncs.com/dataease/apisix-dashboard:3.0.1-alpine container_name: apisix-dashboard restart: always volumes: @@ -13,7 +13,7 @@ services: dataease-network: apisix: - image: apache/apisix:3.4.1-debian + image: registry.cn-qingdao.aliyuncs.com/dataease/apisix:3.6.0-debian container_name: apisix environment: - TZ=Asia/Shanghai @@ -33,7 +33,7 @@ services: dataease-network: etcd: - image: bitnami/etcd:3.4.15 + image: registry.cn-qingdao.aliyuncs.com/dataease/etcd:3.5.10 container_name: apisix-etcd restart: always volumes: diff --git a/installer/dataease/docker-compose-mysql.yml b/installer/dataease/docker-compose-mysql.yml index 4813503de7..e0de6c26ce 100644 --- a/installer/dataease/docker-compose-mysql.yml +++ b/installer/dataease/docker-compose-mysql.yml @@ -2,7 +2,7 @@ version: '2.1' services: DE_MYSQL_HOST: - image: mysql:8.1.0 + image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:8.1.0 container_name: ${DE_MYSQL_HOST} healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u${DE_MYSQL_USER}", "-p${DE_MYSQL_PASSWORD}", "--protocol","tcp"] diff --git a/installer/dataease/docker-compose.yml b/installer/dataease/docker-compose.yml index 0793ad9c54..6ce1b2f606 100644 --- a/installer/dataease/docker-compose.yml +++ b/installer/dataease/docker-compose.yml @@ -2,7 +2,7 @@ version: '2.1' services: dataease: - image: registry.cn-qingdao.aliyuncs.com/dataease/dataease2.0:DE_TAG + image: registry.cn-qingdao.aliyuncs.com/dataease/dataease:DE_TAG container_name: dataease ports: - ${DE_PORT}:8100 diff --git a/installer/dataease/templates/application.yml b/installer/dataease/templates/application.yml index 39ccec0edf..df7293079e 100644 --- a/installer/dataease/templates/application.yml +++ b/installer/dataease/templates/application.yml @@ -14,4 +14,4 @@ dataease: origin-list: localhost:8080,localhost:8100,localhost:9080 apisix-api: domain: http://apisix:9180 - key: edd1c9f034335f136f87ad84b625c8f1 \ No newline at end of file + key: DE_APISIX_KEY \ No newline at end of file diff --git a/installer/dectl b/installer/dectl index 16d269957e..a05fdb5a03 100644 --- a/installer/dectl +++ b/installer/dectl @@ -56,7 +56,7 @@ function _prepare_apisix() { cd $DE_RUNNING_BASE env | grep DE_ >.env sed -i -e "s/DE_APISIX_KEY/${DE_APISIX_KEY}/g" $DE_RUNNING_BASE/apisix/apisix_conf/config.yaml - sed -i -e "s/key:.*/key: ${DE_APISIX_KEY}/g" $DE_RUNNING_BASE/conf/application.yml + sed -i -e "s/DE_APISIX_KEY/${DE_APISIX_KEY}/g" $DE_RUNNING_BASE/conf/application.yml fi compose_files="${compose_files} -f docker-compose-apisix.yml" } @@ -83,7 +83,7 @@ function _healthcheck() { echo } function _get_current_version() { - de_current_version=$(grep "^ image:.*dataease2.0:" ${DE_RUNNING_BASE}/docker-compose.yml | awk -F'dataease2.0:' '{print $2}') + de_current_version=$(grep "^ image:.*dataease:" ${DE_RUNNING_BASE}/docker-compose.yml | awk -F'dataease:' '{print $2}') echo $de_current_version } function status() { diff --git a/installer/install.sh b/installer/install.sh index 398f25a972..38271eecbc 100644 --- a/installer/install.sh +++ b/installer/install.sh @@ -258,5 +258,4 @@ if [[ $http_code != 200 ]];then fi echo -e "======================= 安装完成 =======================\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log -echo -e "请通过以下方式访问:\n URL: http://\$LOCAL_IP:$DE_PORT\n 用户名: admin\n 初始密码: dataease" 2>&1 | tee -a ${CURRENT_DIR}/install.log