forked from github/dataease
Merge branch 'v1.7' into dev
This commit is contained in:
commit
501d455e05
@ -175,7 +175,13 @@ public class JdbcProvider extends DatasourceProvider {
|
|||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
DataEaseException.throwException(e);
|
DataEaseException.throwException(e);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
DataEaseException.throwException(Translator.get("i18n_datasource_connect_error") + e.getMessage());
|
if(datasourceRequest.getDatasource().getType().equalsIgnoreCase("ds_doris")){
|
||||||
|
datasourceRequest.setQuery("select * from " + datasourceRequest.getTable());
|
||||||
|
return fetchResultField(datasourceRequest);
|
||||||
|
}else {
|
||||||
|
DataEaseException.throwException(Translator.get("i18n_datasource_connect_error") + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$route.params.reportId': function() {
|
||||||
|
this.restore()
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.restore()
|
this.restore()
|
||||||
},
|
},
|
||||||
|
@ -537,12 +537,19 @@ export default {
|
|||||||
getIncrementalConfig() {
|
getIncrementalConfig() {
|
||||||
post('/dataset/table/incrementalConfig', { tableId: this.table.id }).then(response => {
|
post('/dataset/table/incrementalConfig', { tableId: this.table.id }).then(response => {
|
||||||
this.incrementalConfig = response.data
|
this.incrementalConfig = response.data
|
||||||
this.incrementalUpdateType = 'incrementalAdd'
|
if (this.incrementalConfig.incrementalAdd.length === 0 && this.incrementalConfig.incrementalDelete.length === 0 ) {
|
||||||
if (this.incrementalConfig.incrementalAdd) {
|
this.incrementalUpdateType = 'incrementalAdd'
|
||||||
|
this.sql = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.incrementalConfig.incrementalAdd.length > 0) {
|
||||||
|
this.incrementalUpdateType = 'incrementalAdd'
|
||||||
this.sql = this.incrementalConfig.incrementalAdd
|
this.sql = this.incrementalConfig.incrementalAdd
|
||||||
} else {
|
} else {
|
||||||
this.sql = ''
|
this.incrementalUpdateType = 'incrementalDelete'
|
||||||
|
this.sql = this.incrementalConfig.incrementalDelete
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
saveIncrementalConfig() {
|
saveIncrementalConfig() {
|
||||||
|
@ -601,11 +601,18 @@ export default {
|
|||||||
getIncrementalConfig(tableId) {
|
getIncrementalConfig(tableId) {
|
||||||
post('/dataset/table/incrementalConfig', { tableId: tableId }).then(response => {
|
post('/dataset/table/incrementalConfig', { tableId: tableId }).then(response => {
|
||||||
this.incrementalConfig = response.data
|
this.incrementalConfig = response.data
|
||||||
this.incrementalUpdateType = 'incrementalAdd'
|
|
||||||
if (this.incrementalConfig.incrementalAdd) {
|
if (this.incrementalConfig.incrementalAdd.length === 0 && this.incrementalConfig.incrementalDelete.length === 0 ) {
|
||||||
|
this.incrementalUpdateType = 'incrementalAdd'
|
||||||
|
this.sql = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.incrementalConfig.incrementalAdd.length > 0) {
|
||||||
|
this.incrementalUpdateType = 'incrementalAdd'
|
||||||
this.sql = this.incrementalConfig.incrementalAdd
|
this.sql = this.incrementalConfig.incrementalAdd
|
||||||
} else {
|
} else {
|
||||||
this.sql = ''
|
this.incrementalUpdateType = 'incrementalDelete'
|
||||||
|
this.sql = this.incrementalConfig.incrementalDelete
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user