forked from github/dataease
Merge branch 'dev' into pr@dev_memory_component
This commit is contained in:
commit
4c0d2b0820
@ -1,9 +1,12 @@
|
||||
package io.dataease.controller.panel;
|
||||
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.auth.annotation.DePermission;
|
||||
import io.dataease.auth.annotation.DePermissionProxy;
|
||||
import io.dataease.auth.annotation.DePermissions;
|
||||
import io.dataease.auth.filter.F2CLinkFilter;
|
||||
import io.dataease.auth.service.impl.ExtAuthServiceImpl;
|
||||
import io.dataease.commons.constants.DePermissionType;
|
||||
import io.dataease.commons.constants.PanelConstants;
|
||||
@ -21,9 +24,12 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.pentaho.di.core.util.UUIDUtil;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@ -141,6 +147,12 @@ public class PanelGroupController {
|
||||
@PostMapping("/exportDetails")
|
||||
@I18n
|
||||
public void exportDetails(@RequestBody PanelViewDetailsRequest request, HttpServletResponse response) throws IOException {
|
||||
HttpServletRequest httpServletRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
String linkToken = httpServletRequest.getHeader(F2CLinkFilter.LINK_TOKEN_KEY);
|
||||
DecodedJWT jwt = JWT.decode(linkToken);
|
||||
Long userId = jwt.getClaim("userId").asLong();
|
||||
request.setUserId(userId);
|
||||
panelGroupService.exportPanelViewDetails(request, response);
|
||||
}
|
||||
|
||||
|
@ -40,4 +40,6 @@ public class PanelViewDetailsRequest {
|
||||
@ApiModelProperty(hidden = true)
|
||||
private PermissionProxy proxy;
|
||||
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -147,7 +147,7 @@ public class DataSetTableService {
|
||||
public static final String regex = "\\$\\{(.*?)\\}";
|
||||
private static final String SubstitutedParams = "DATAEASE_PATAMS_BI";
|
||||
private static final String SubstitutedSql = " 'BI' = 'BI' ";
|
||||
private static final String SubstitutedSqlVirtualData = " 1 < 2 ";
|
||||
private static final String SubstitutedSqlVirtualData = " 1 > 2 ";
|
||||
|
||||
@Value("${upload.file.path}")
|
||||
private String path;
|
||||
@ -1272,7 +1272,7 @@ public class DataSetTableService {
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
|
||||
sql = realData ? handleVariableDefaultValue(sql, dataSetTableRequest.getSqlVariableDetails(), ds.getType(), true) : removeVariables(sql, ds.getType()).replaceAll(SubstitutedSql, SubstitutedSqlVirtualData);
|
||||
sql = realData ? handleVariableDefaultValue(sql, dataSetTableRequest.getSqlVariableDetails(), ds.getType(), true) : removeVariables(sql, ds.getType()).replaceAll(SubstitutedSql.trim(), SubstitutedSqlVirtualData);
|
||||
if (StringUtils.isEmpty(sql)) {
|
||||
DataEaseException.throwException(Translator.get("i18n_sql_not_empty"));
|
||||
}
|
||||
@ -1942,7 +1942,7 @@ public class DataSetTableService {
|
||||
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
|
||||
DataTableInfoDTO dataTableInfo = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
||||
String sql = dataTableInfo.isBase64Encryption() ? new String(java.util.Base64.getDecoder().decode(dataTableInfo.getSql())) : dataTableInfo.getSql();
|
||||
sql = removeVariables(sql, ds.getType()).replaceAll(SubstitutedSql, SubstitutedSqlVirtualData);
|
||||
sql = removeVariables(sql, ds.getType()).replaceAll(SubstitutedSql.trim(), SubstitutedSqlVirtualData);
|
||||
String sqlAsTable = qp.createSQLPreview(sql, null);
|
||||
datasourceRequest.setQuery(sqlAsTable);
|
||||
fields = datasourceProvider.fetchResultField(datasourceRequest);
|
||||
|
@ -1161,6 +1161,8 @@ public class PanelGroupService {
|
||||
componentFilterInfo.setGoPage(1l);
|
||||
componentFilterInfo.setPageSize(1000000l);
|
||||
componentFilterInfo.setExcelExportFlag(true);
|
||||
componentFilterInfo.setProxy(request.getProxy());
|
||||
componentFilterInfo.setUser(request.getUserId());
|
||||
ChartViewDTO chartViewInfo = chartViewService.getData(request.getViewId(), componentFilterInfo);
|
||||
List<Map> tableRow = (List) chartViewInfo.getData().get("tableRow");
|
||||
List<Object[]> result = new ArrayList<>();
|
||||
|
4
backend/src/main/resources/db/migration/V53__1.18.6.sql
Normal file
4
backend/src/main/resources/db/migration/V53__1.18.6.sql
Normal file
@ -0,0 +1,4 @@
|
||||
UPDATE `my_plugin`
|
||||
SET `version` = '1.18.6'
|
||||
where `plugin_id` > 0
|
||||
and `version` = '1.18.5';
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dataease",
|
||||
"version": "1.18.5",
|
||||
"version": "1.18.6",
|
||||
"description": "dataease front",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -373,7 +373,12 @@ export function insertBatchTreeNode(nodeInfoArray, tree) {
|
||||
}
|
||||
}
|
||||
|
||||
export function updateCacheTree(opt, treeName, nodeInfo, tree) {
|
||||
export function updateCacheTree(opt, treeName, nodeInfoFull, tree) {
|
||||
const nodeInfo = {
|
||||
...nodeInfoFull,
|
||||
panelData: null,
|
||||
panelStyle: null
|
||||
}
|
||||
if (opt === 'new' || opt === 'copy') {
|
||||
insertTreeNode(nodeInfo, tree)
|
||||
} else if (opt === 'move') {
|
||||
|
@ -607,7 +607,8 @@ export default {
|
||||
oidc: 'OIDC Setting',
|
||||
theme: 'Theme Setting',
|
||||
cas: 'CAS Setting',
|
||||
map: 'MAP Setting'
|
||||
map: 'MAP Setting',
|
||||
select_left: 'Please select a region on the left'
|
||||
},
|
||||
license: {
|
||||
i18n_no_license_record: 'No License Record',
|
||||
|
@ -607,7 +607,8 @@ export default {
|
||||
oidc: 'OIDC設置',
|
||||
theme: '主題設置',
|
||||
cas: 'CAS設置',
|
||||
map: '地圖設置'
|
||||
map: '地圖設置',
|
||||
select_left: '請在左側選擇區域'
|
||||
},
|
||||
license: {
|
||||
i18n_no_license_record: '沒有 License 記錄',
|
||||
|
@ -608,7 +608,8 @@ export default {
|
||||
oidc: 'OIDC设置',
|
||||
theme: '主题设置',
|
||||
cas: 'CAS设置',
|
||||
map: '地图设置'
|
||||
map: '地图设置',
|
||||
select_left: '请在左侧选择区域'
|
||||
},
|
||||
license: {
|
||||
i18n_no_license_record: '没有 License 记录',
|
||||
|
@ -138,7 +138,7 @@
|
||||
|
||||
<el-empty
|
||||
v-else-if="status === 'empty'"
|
||||
description="请在左侧选择区域"
|
||||
:description="$t('sysParams.select_left')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dataease-mobile",
|
||||
"version": "1.18.5",
|
||||
"version": "1.18.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "npm run dev:h5",
|
||||
|
Loading…
Reference in New Issue
Block a user