Merge branch 'dev' into v1.18
This commit is contained in:
commit
6b475b60ba
@ -787,7 +787,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
|
||||
if(redshiftConfiguration.getDataBase().length() > 64 || redshiftConfiguration.getDataBase().length() < 1){
|
||||
throw new Exception("Invalid database name");
|
||||
}
|
||||
if(!redshiftConfiguration.getDataBase().matches("\"^[a-z][a-z0-9_+.@-]*$\"")){
|
||||
if(!redshiftConfiguration.getDataBase().matches("^[a-z][a-z0-9_+.@-]*$")){
|
||||
throw new Exception("Invalid database name");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1121,8 +1121,7 @@ public class DataSetTableService {
|
||||
SelectBody selectBody = ((SubSelect) fromItem).getSelectBody();
|
||||
SubSelect subSelect = new SubSelect();
|
||||
Select subSelectTmp = (Select) CCJSqlParserUtil.parse(removeVariables(selectBody.toString(), dsType));
|
||||
PlainSelect subPlainSelect = ((PlainSelect) subSelectTmp.getSelectBody());
|
||||
subSelect.setSelectBody(subPlainSelect);
|
||||
subSelect.setSelectBody(subSelectTmp.getSelectBody());
|
||||
if (dsType.equals(DatasourceTypes.oracle.getType())) {
|
||||
subSelect.setAlias(new Alias(fromItem.getAlias().toString(), false));
|
||||
} else {
|
||||
@ -1279,7 +1278,7 @@ public class DataSetTableService {
|
||||
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
|
||||
String sqlAsTable = qp.createSQLPreview(sql, null);
|
||||
datasourceRequest.setQuery(sqlAsTable);
|
||||
|
||||
System.out.println(sqlAsTable);
|
||||
Map<String, List> result;
|
||||
try {
|
||||
datasetSqlLog.setStartTime(System.currentTimeMillis());
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
|
||||
<script>
|
||||
import { compareDayList, compareMonthList, compareYearList } from '@/views/chart/chart/compare'
|
||||
import { SUPPORT_Y_M } from '@/views/chart/chart/chart'
|
||||
|
||||
export default {
|
||||
name: 'CompareEdit',
|
||||
@ -95,6 +96,19 @@ export default {
|
||||
xAxis = JSON.parse(this.chart.xaxis)
|
||||
}
|
||||
const t1 = xAxis.filter(ele => { return ele.deType === 1 })
|
||||
|
||||
if (this.chart.type === 'table-pivot') {
|
||||
let xAxisExt = null
|
||||
if (Object.prototype.toString.call(this.chart.xaxisExt) === '[object Array]') {
|
||||
xAxisExt = JSON.parse(JSON.stringify(this.chart.xaxisExt))
|
||||
} else {
|
||||
xAxisExt = JSON.parse(this.chart.xaxisExt)
|
||||
}
|
||||
const t2 = xAxisExt.filter(ele => { return ele.deType === 1 })
|
||||
|
||||
t1.push(...t2)
|
||||
}
|
||||
|
||||
this.fieldList = t1
|
||||
// 如果没有选中字段,则默认选中第一个
|
||||
if ((!this.compareItem.compareCalc.field || this.compareItem.compareCalc.field === '') && this.fieldList.length > 0) {
|
||||
|
||||
@ -324,6 +324,21 @@ export default {
|
||||
const t1 = xAxis.filter(ele => {
|
||||
return ele.deType === 1 && SUPPORT_Y_M.includes(ele.dateStyle)
|
||||
})
|
||||
|
||||
if (this.chart.type === 'table-pivot') {
|
||||
let xAxisExt = null
|
||||
if (Object.prototype.toString.call(this.chart.xaxisExt) === '[object Array]') {
|
||||
xAxisExt = JSON.parse(JSON.stringify(this.chart.xaxisExt))
|
||||
} else {
|
||||
xAxisExt = JSON.parse(this.chart.xaxisExt)
|
||||
}
|
||||
const t2 = xAxisExt.filter(ele => {
|
||||
return ele.deType === 1 && SUPPORT_Y_M.includes(ele.dateStyle)
|
||||
})
|
||||
|
||||
t1.push(...t2)
|
||||
}
|
||||
|
||||
// 暂时只支持类别轴/维度的时间类型字段
|
||||
if (t1.length > 0 && this.chart.type !== 'text' && this.chart.type !== 'label' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
this.disableEditCompare = false
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
const path = require('path')
|
||||
const defaultSettings = require('./src/settings.js')
|
||||
|
||||
const pkg = require('./package.json')
|
||||
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
// const CompressionPlugin = require('compression-webpack-plugin')
|
||||
const webpack = require('webpack')
|
||||
@ -48,6 +50,11 @@ module.exports = {
|
||||
'@': resolve('src')
|
||||
}
|
||||
},
|
||||
output: {
|
||||
filename: `js/[name].[contenthash:8].${pkg.version}.js`,
|
||||
publicPath: '/',
|
||||
chunkFilename: `js/[name].[contenthash:8].${pkg.version}.js`
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user