commit
68d2c08b99
@ -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/
|
||||
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -53,8 +53,8 @@ public class CalciteProvider {
|
||||
private EngineServer engineServer;
|
||||
protected ExtendedJdbcClassLoader extendedJdbcClassLoader;
|
||||
private Map<Long, ExtendedJdbcClassLoader> 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
|
||||
|
||||
@ -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<List<TableField>> TableFieldListTypeReference = new TypeReference<List<TableField>>() {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<DatasourceDTO> 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<DatasetTableDTO> 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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 "管理员";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="icon_file-add_outlined">
|
||||
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M4.16667 2.50001H13.3333V4.59959C13.3333 4.7101 13.3772 4.81608 13.4554 4.89422C13.5335 4.97236 13.6395 5.01626 13.75 5.01626H15.8333V10.8333H17.5V4.09626C17.5001 3.87532 17.4124 3.66341 17.2563 3.50709L14.8275 1.07751C14.7501 1.00007 14.6582 0.938651 14.557 0.896756C14.4558 0.85486 14.3474 0.833312 14.2379 0.833344H3.33333C3.11232 0.833344 2.90036 0.921141 2.74408 1.07742C2.5878 1.2337 2.5 1.44566 2.5 1.66668V18.3333C2.5 18.5544 2.5878 18.7663 2.74408 18.9226C2.90036 19.0789 3.11232 19.1667 3.33333 19.1667H10V17.5H4.16667V2.50001Z"/>
|
||||
<path id="Vector" d="M14.5833 12.5C14.3532 12.5 14.1667 12.6865 14.1667 12.9167V15H12.0833C11.8532 15 11.6667 15.1865 11.6667 15.4167V16.25C11.6667 16.4801 11.8532 16.6667 12.0833 16.6667H14.1667V18.75C14.1667 18.9801 14.3532 19.1667 14.5833 19.1667H15.4167C15.6468 19.1667 15.8333 18.9801 15.8333 18.75V16.6667H17.9167C18.1468 16.6667 18.3333 16.4801 18.3333 16.25V15.4167C18.3333 15.1865 18.1468 15 17.9167 15H15.8333V12.9167C15.8333 12.6865 15.6468 12.5 15.4167 12.5H14.5833Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -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: '请从左侧选择',
|
||||
|
||||
@ -150,7 +150,7 @@ const update = (licKey: string) => {
|
||||
<div class="item">
|
||||
<div class="label">{{ $t('about.version') }}</div>
|
||||
<div class="value">
|
||||
{{ license.edition === 'Standard' ? $t('about.standard') : $t('about.enterprise') }}
|
||||
{{ !license?.edition ? $t('about.standard') : $t('about.enterprise') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
||||
@ -116,6 +116,7 @@ export class Bar extends G2PlotChartView<ColumnOptions, Column> {
|
||||
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) {
|
||||
|
||||
@ -164,11 +164,12 @@ export class HorizontalBar extends G2PlotChartView<BarOptions, Bar> {
|
||||
}
|
||||
|
||||
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<BarOptions, Bar> {
|
||||
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) {
|
||||
|
||||
@ -78,7 +78,7 @@ export class WordCloud extends G2PlotChartView<WordCloudOptions, G2WordCloud> {
|
||||
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
|
||||
}
|
||||
|
||||
@ -311,8 +311,7 @@ defineExpose({
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="newResourceLabel" placement="top" effect="dark">
|
||||
<el-icon class="custom-icon btn" @click="addOperation('newLeaf', null, 'leaf', true)">
|
||||
<Icon v-if="curCanvasType === 'dashboard'" name="dv-new"></Icon>
|
||||
<Icon v-else name="dv-screen-new" />
|
||||
<Icon name="icon_file-add_outlined" />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
@ -443,7 +443,7 @@ const filterNode = (value: string, data: BusiTreeNode) => {
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="新建数据集" placement="top">
|
||||
<el-icon class="custom-icon btn" @click="createDataset">
|
||||
<Icon name="icon_dataset_outlined" />
|
||||
<Icon name="icon_file-add_outlined" />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
@ -654,7 +654,7 @@ onMounted(() => {
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" :content="t('datasource.create')" placement="top">
|
||||
<el-icon class="custom-icon btn" @click="createDatasource">
|
||||
<Icon name="icon_dataset_outlined" />
|
||||
<Icon name="icon_file-add_outlined" />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit c2c4436bac4d300e5297ff1854fd6d45e01435ad
|
||||
Subproject commit 7a4f9a2de62a8ff0b544f2660bef3838cc09d6de
|
||||
@ -1,4 +1,4 @@
|
||||
pisix:
|
||||
apisix:
|
||||
node_listen: 9080 # APISIX listening port
|
||||
enable_ipv6: false
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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"]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -14,4 +14,4 @@ dataease:
|
||||
origin-list: localhost:8080,localhost:8100,localhost:9080
|
||||
apisix-api:
|
||||
domain: http://apisix:9180
|
||||
key: edd1c9f034335f136f87ad84b625c8f1
|
||||
key: DE_APISIX_KEY
|
||||
@ -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() {
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user