Merge branch 'dev' into v1.14
This commit is contained in:
commit
074ca0f23c
@ -3,9 +3,9 @@
|
||||
## Create pull request
|
||||
PR are always welcome, even if they only contain small fixes like typos or a few lines of code. If there will be a significant effort, please document it as an issue and get a discussion going before starting to work on it.
|
||||
|
||||
Please submit a PR broken down into small changes bit by bit. A PR consisting of a lot features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.
|
||||
Please submit a PR broken down into small changes' bit by bit. A PR consisting of a lot of features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.
|
||||
|
||||
This [development guideline](https://dataease.io/docs/dev_manual/dev_manual/) contains information about repository structure, how to setup development environment, how to run it, and more.
|
||||
This [development guideline](https://dataease.io/docs/dev_manual/dev_manual/) contains information about repository structure, how to set up development environment, how to run it, and more.
|
||||
|
||||
Note: If you split your pull request to small changes, please make sure any of the changes goes to master will not break anything. Otherwise, it can not be merged until this feature complete.
|
||||
|
||||
@ -21,5 +21,5 @@ When reporting issues, always include:
|
||||
* Steps to reproduce the issue.
|
||||
* Snapshots or log files if needed
|
||||
|
||||
Because the issues are open to the public, when submitting files, be sure to remove any sensitive information, e.g. user name, password, IP address, and company name. You can
|
||||
Because the issues are open to the public, when submitting files, be sure to remove any sensitive information, e.g. username, password, IP address, and company name. You can
|
||||
replace those parts with "REDACTED" or other strings like "****".
|
||||
|
||||
@ -72,8 +72,8 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
|
||||
|
||||
仅需两步快速安装 DataEase:
|
||||
|
||||
1. 准备一台不小于 8 G内存的 64位 Linux 主机;
|
||||
2. 以 root 用户执行如下命令一键安装 DataEase。
|
||||
1. 准备一台不小于 8 G内存的 64位 Linux 主机;
|
||||
2. 以 root 用户执行如下命令一键安装 DataEase。
|
||||
|
||||
```sh
|
||||
curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_start.sh | sh
|
||||
|
||||
@ -16,4 +16,4 @@ All security bugs should be reported to the contact as below:
|
||||
- support@fit2cloud.com
|
||||
- 400-052-0755
|
||||
|
||||
Thanks for you support!
|
||||
Thanks for your support!
|
||||
|
||||
@ -616,6 +616,9 @@ public class DataSetTableService {
|
||||
// check doris table
|
||||
if (!checkEngineTableIsExists(dataSetTableRequest.getId())) {
|
||||
if (dataSetTableRequest.isPreviewForTask()) {
|
||||
map.put("fields", fields);
|
||||
map.put("data", new ArrayList<>());
|
||||
map.put("page", new DataSetPreviewPage());
|
||||
return map;
|
||||
} else {
|
||||
throw new RuntimeException(Translator.get("i18n_data_not_sync"));
|
||||
@ -2591,38 +2594,62 @@ public class DataSetTableService {
|
||||
visitBinaryExpr(andExpression, "AND");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Between between) {
|
||||
if(hasVarible(between.getBetweenExpressionStart().toString()) || hasVarible(between.getBetweenExpressionEnd().toString())){
|
||||
getBuffer().append(SubstitutedSql);
|
||||
}else {
|
||||
getBuffer().append(between.getLeftExpression()).append(" BETWEEN ").append(between.getBetweenExpressionStart()).append(" AND ").append(between.getBetweenExpressionEnd());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(MinorThan minorThan) {
|
||||
if(hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())){
|
||||
getBuffer().append(SubstitutedSql);
|
||||
return;
|
||||
}
|
||||
getBuffer().append(minorThan.getLeftExpression());
|
||||
getBuffer().append(" < ");
|
||||
getBuffer().append(minorThan.getRightExpression());
|
||||
getBuffer().append( minorThan.getRightExpression());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(MinorThanEquals minorThan) {
|
||||
if(hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())){
|
||||
getBuffer().append(SubstitutedSql);
|
||||
return;
|
||||
}
|
||||
getBuffer().append(minorThan.getLeftExpression());
|
||||
getBuffer().append(" <= ");
|
||||
getBuffer().append(minorThan.getRightExpression());
|
||||
getBuffer().append( minorThan.getRightExpression());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GreaterThanEquals minorThan) {
|
||||
if(hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())){
|
||||
getBuffer().append(SubstitutedSql);
|
||||
return;
|
||||
}
|
||||
getBuffer().append(minorThan.getLeftExpression());
|
||||
getBuffer().append(" >= ");
|
||||
getBuffer().append(minorThan.getRightExpression());
|
||||
getBuffer().append( minorThan.getRightExpression());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GreaterThan minorThan) {
|
||||
getBuffer().append(minorThan.getLeftExpression());
|
||||
public void visit(GreaterThan greaterThan) {
|
||||
if(hasVarible(greaterThan.getLeftExpression().toString()) || hasVarible(greaterThan.getRightExpression().toString())){
|
||||
getBuffer().append(SubstitutedSql);
|
||||
return;
|
||||
}
|
||||
getBuffer().append(greaterThan.getLeftExpression());
|
||||
getBuffer().append(" > ");
|
||||
getBuffer().append(minorThan.getRightExpression());
|
||||
getBuffer().append( greaterThan.getRightExpression());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExpressionList expressionList) {
|
||||
for (Iterator<Expression> iter = expressionList.getExpressions().iterator(); iter.hasNext(); ) {
|
||||
for (Iterator<Expression> iter = expressionList.getExpressions().iterator(); iter.hasNext();) {
|
||||
Expression expression = iter.next();
|
||||
expression.accept(this);
|
||||
if (iter.hasNext()) {
|
||||
@ -2631,15 +2658,6 @@ public class DataSetTableService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Between between) {
|
||||
if (hasVarible(between.getBetweenExpressionStart().toString()) || hasVarible(between.getBetweenExpressionEnd().toString())) {
|
||||
getBuffer().append(SubstitutedSql);
|
||||
} else {
|
||||
getBuffer().append(between.getLeftExpression()).append(" BETWEEN ").append(between.getBetweenExpressionStart()).append(" AND ").append(between.getBetweenExpressionEnd());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(LikeExpression likeExpression) {
|
||||
if (hasVarible(likeExpression.toString())) {
|
||||
@ -2703,33 +2721,29 @@ public class DataSetTableService {
|
||||
|
||||
|
||||
private void visitBinaryExpr(BinaryExpression expr, String operator) {
|
||||
boolean hasBinaryExpression = false;
|
||||
boolean hasSubBinaryExpression = false;
|
||||
try {
|
||||
BinaryExpression leftBinaryExpression = (BinaryExpression) expr.getLeftExpression();
|
||||
hasBinaryExpression = leftBinaryExpression.getLeftExpression() instanceof BinaryExpression;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
hasSubBinaryExpression = leftBinaryExpression.getLeftExpression() instanceof Expression;
|
||||
} catch (Exception e) {e.printStackTrace();}
|
||||
|
||||
if (expr.getLeftExpression() instanceof BinaryExpression && !hasBinaryExpression && hasVarible(expr.getLeftExpression().toString())) {
|
||||
if (expr.getLeftExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVarible(expr.getLeftExpression().toString())) {
|
||||
getBuffer().append(SubstitutedSql);
|
||||
} else {
|
||||
expr.getLeftExpression().accept(this);
|
||||
}
|
||||
|
||||
getBuffer().append(" " + operator + " ");
|
||||
|
||||
hasBinaryExpression = false;
|
||||
hasSubBinaryExpression = false;
|
||||
try {
|
||||
BinaryExpression rightBinaryExpression = (BinaryExpression) expr.getRightExpression();
|
||||
hasBinaryExpression = rightBinaryExpression.getRightExpression() instanceof BinaryExpression;
|
||||
hasSubBinaryExpression = rightBinaryExpression.getRightExpression() instanceof BinaryExpression;
|
||||
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
if (expr.getRightExpression() instanceof BinaryExpression && !hasBinaryExpression && hasVarible(expr.getRightExpression().toString())) {
|
||||
if (expr.getRightExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVarible(expr.getRightExpression().toString())) {
|
||||
getBuffer().append(SubstitutedSql);
|
||||
} else if (expr.getRightExpression() instanceof InExpression && !hasBinaryExpression && hasVarible(expr.getRightExpression().toString())) {
|
||||
getBuffer().append(SubstitutedSql);
|
||||
} else {
|
||||
} else {
|
||||
expr.getRightExpression().accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,10 @@ public class DatasourceService {
|
||||
JsonObject apiItemStatuses = JsonParser.parseString(datasourceDTO.getStatus()).getAsJsonObject();
|
||||
|
||||
for (int i = 0; i < apiDefinitionList.size(); i++) {
|
||||
String status = apiItemStatuses.get(apiDefinitionList.get(i).getName()).getAsString();
|
||||
String status = null;
|
||||
if(apiItemStatuses.get(apiDefinitionList.get(i).getName()) != null){
|
||||
status = apiItemStatuses.get(apiDefinitionList.get(i).getName()).getAsString();
|
||||
}
|
||||
apiDefinitionList.get(i).setStatus(status);
|
||||
apiDefinitionList.get(i).setSerialNumber(i);
|
||||
apiDefinitionListWithStatus.add(apiDefinitionList.get(i));
|
||||
|
||||
@ -196,7 +196,7 @@ public class SysUserService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户密码清楚缓存
|
||||
* 修改用户密码清除缓存
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
|
||||
@ -148,7 +148,7 @@ export default {
|
||||
if (on) {
|
||||
on.forEach(itm => {
|
||||
const ele = itm.slice(1, -1)
|
||||
content = content.replace(itm, _this.dataRowNameSelect[ele] ? _this.dataRowNameSelect[ele] : '[无法获取字段值]')
|
||||
content = content.replace(itm, _this.dataRowNameSelect[ele] !== undefined ? _this.dataRowNameSelect[ele] : '[无法获取字段值]')
|
||||
})
|
||||
}
|
||||
content = content.replace('class="base-selected"','')
|
||||
|
||||
@ -64,6 +64,9 @@ export default {
|
||||
state.changeTimes = 0
|
||||
state.lastSaveSnapshotIndex = deepCopy(state.snapshotIndex)
|
||||
},
|
||||
recordChangeTimes(state) {
|
||||
state.changeTimes++
|
||||
},
|
||||
recordStyleChange(state) {
|
||||
state.styleChangeTimes++
|
||||
}
|
||||
|
||||
@ -1412,7 +1412,7 @@ export default {
|
||||
edit_field: 'Edit Field',
|
||||
preview_100_data: 'Show 100 lines data',
|
||||
invalid_table_check: 'Please sync data first.',
|
||||
parse_error: 'Parse failed,please check.Reference:https://dataease.io/docs/faq/dataset_faq/',
|
||||
parse_error: 'Parse failed,please check.Reference:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
|
||||
origin_field_type: 'Origin Type',
|
||||
edit_excel_table: 'Edit Excel Dataset',
|
||||
edit_excel: 'Edit Excel',
|
||||
@ -1641,6 +1641,7 @@ export default {
|
||||
has_repeat_name: 'Duplicate API data table name',
|
||||
has_repeat_field_name: 'The field name is duplicate, please modify it before selecting',
|
||||
api_field_not_empty: 'Field cannot be empty',
|
||||
success_copy: 'Copy succeeded',
|
||||
valid: 'Valid',
|
||||
invalid: 'Invalid',
|
||||
api_step_1: 'Connection API',
|
||||
@ -2341,7 +2342,7 @@ export default {
|
||||
teaching_video_bottom_hint: 'More videos',
|
||||
enterprise_edition_hint1: 'Provide enterprise application scenario X-Pack enhancement package',
|
||||
enterprise_edition_hint2: 'Provide high-level original factory service support',
|
||||
enterprise_edition_hint3: 'Provide DateEase best practice recommendations',
|
||||
enterprise_edition_hint3: 'Provide DataEase best practice recommendations',
|
||||
open_source_community: 'Open source community',
|
||||
click_show: 'Click To View',
|
||||
show_more: 'Show More',
|
||||
|
||||
@ -1411,7 +1411,7 @@ export default {
|
||||
edit_field: '編輯字段',
|
||||
preview_100_data: '顯示前100行數據',
|
||||
invalid_table_check: '非直連數據集請先完成數據同步',
|
||||
parse_error: 'Excel解析失敗,請檢查格式、字段等信息。具體參考:https://dataease.io/docs/faq/dataset_faq/',
|
||||
parse_error: 'Excel解析失敗,請檢查格式、字段等信息。具體參考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
|
||||
origin_field_type: '原始類型',
|
||||
edit_excel_table: '編輯Excel數據集',
|
||||
edit_excel: '編輯Excel',
|
||||
@ -1641,6 +1641,7 @@ export default {
|
||||
has_repeat_name: 'API 數據表名稱重複',
|
||||
has_repeat_field_name: '欄位名重複,請修改後再選擇',
|
||||
api_field_not_empty: '欄位不能為空',
|
||||
success_copy: '複製成功',
|
||||
valid: '有效',
|
||||
invalid: '無效',
|
||||
api_step_1: '連接API',
|
||||
|
||||
@ -1412,7 +1412,7 @@ export default {
|
||||
edit_field: '编辑字段',
|
||||
preview_100_data: '显示前100行数据',
|
||||
invalid_table_check: '非直连数据集请先完成数据同步',
|
||||
parse_error: 'Excel解析失败,请检查格式、字段等信息。具体参考:https://dataease.io/docs/faq/dataset_faq/',
|
||||
parse_error: 'Excel解析失败,请检查格式、字段等信息。具体参考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
|
||||
origin_field_type: '原始类型',
|
||||
edit_excel_table: '编辑Excel数据集',
|
||||
edit_excel: '编辑Excel',
|
||||
@ -1649,6 +1649,7 @@ export default {
|
||||
has_repeat_name: 'API 数据表名称重复',
|
||||
has_repeat_field_name: '字段名重复,请修改后再选择',
|
||||
api_field_not_empty: '字段不能为空',
|
||||
success_copy: '复制成功',
|
||||
valid: '有效',
|
||||
invalid: '无效',
|
||||
api_step_1: '连接API',
|
||||
|
||||
@ -783,6 +783,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
if (useCache) {
|
||||
_this.$store.commit('recordSnapshot', 'cache')
|
||||
_this.$store.commit('recordChangeTimes' )
|
||||
} else {
|
||||
_this.$store.commit('refreshSaveStatus')
|
||||
}
|
||||
|
||||
@ -1010,8 +1010,21 @@ export default {
|
||||
copyItem(item){
|
||||
var newItem = JSON.parse(JSON.stringify(item))
|
||||
newItem.serialNumber = this.form.apiConfiguration[this.form.apiConfiguration.length - 1].serialNumber + 1
|
||||
newItem.name = item.name + '_copy'
|
||||
var reg = new RegExp(item.name + '_copy_' + '([0-9]*)', "gim");
|
||||
var number = 0
|
||||
for(var i =1;i<this.form.apiConfiguration.length;i++){
|
||||
var match = this.form.apiConfiguration[i].name.match(reg);
|
||||
if (match !== null) {
|
||||
var num = match[0].substring(this.form.apiConfiguration[i].name.length + 5, match[0].length - 1)
|
||||
if( parseInt(num) != NaN && parseInt(num) > number){
|
||||
number = parseInt(num)
|
||||
}
|
||||
}
|
||||
}
|
||||
number = number + 1
|
||||
newItem.name = item.name + '_copy_' + number
|
||||
this.form.apiConfiguration.push(newItem)
|
||||
this.$message.success(i18n.t('datasource.success_copy'))
|
||||
},
|
||||
addApiItem(item) {
|
||||
if (item) {
|
||||
@ -1021,7 +1034,7 @@ export default {
|
||||
} else {
|
||||
this.add_api_item = true;
|
||||
this.apiItem = JSON.parse(JSON.stringify(this.defaultApiItem));
|
||||
this.apiItem.serialNumber = this.form.apiConfiguration[this.form.apiConfiguration.length - 1].serialNumber + 1
|
||||
this.apiItem.serialNumber = this.form.apiConfiguration.length > 0 ? this.form.apiConfiguration[this.form.apiConfiguration.length - 1].serialNumber + 1 : 0
|
||||
this.api_table_title = this.$t("datasource.add_api_table");
|
||||
}
|
||||
this.active = 1;
|
||||
|
||||
@ -138,7 +138,6 @@ export default {
|
||||
table: [],
|
||||
filterText: "",
|
||||
fields: [],
|
||||
tableName: "",
|
||||
dataLoading: false,
|
||||
treeLoading: false,
|
||||
};
|
||||
@ -184,6 +183,7 @@ export default {
|
||||
initData(table) {
|
||||
this.dataLoading = true;
|
||||
table.row = 100;
|
||||
table.previewForTask = true
|
||||
post("/dataset/table/getPreviewData/1/100", table, false, 30000)
|
||||
.then((response) => {
|
||||
this.fields = response.data.fields;
|
||||
@ -263,4 +263,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -341,7 +341,10 @@ export default {
|
||||
created() {
|
||||
const { datasetName, id } = this.$route.query;
|
||||
this.taskDetail = { datasetName, id };
|
||||
if (!id) return;
|
||||
if (!id) {
|
||||
this.taskForm.startTime = new Date()
|
||||
return;
|
||||
};
|
||||
this.getTaskDetail(id);
|
||||
},
|
||||
methods: {
|
||||
@ -638,4 +641,4 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user