Merge pull request #1863 from dataease/v1.8

V1.8
This commit is contained in:
王嘉豪 2022-03-02 10:53:53 +08:00 committed by GitHub
commit 45767f75e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 8 deletions

View File

@ -71,7 +71,17 @@ public class PanelGroupController {
@ApiOperation("详细信息")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
@GetMapping("/findOne/{id}")
public PanelGroupWithBLOBs findOne(@PathVariable String id) throws Exception {
public PanelGroupDTO findOne(@PathVariable String id) throws Exception {
return panelGroupService.findOne(id);
}
@ApiIgnore
@ApiOperation("详细信息(分享人代理)")
@DePermissionProxy(paramIndex = 1)
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
@PostMapping("/proxy/findOne/{id}")
public PanelGroupWithBLOBs proxyFindOne(@PathVariable String id, @RequestBody PermissionProxy proxy)
throws Exception {
return panelGroupService.findOne(id);
}

View File

@ -200,12 +200,16 @@ public class PanelGroupService {
}
public PanelGroupWithBLOBs findOne(String panelId) {
PanelGroupWithBLOBs panelGroupWithBLOBs = extPanelGroupMapper.findOneWithPrivileges(panelId, String.valueOf(AuthUtils.getUser().getUserId()));
if (panelGroupWithBLOBs != null && StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())) {
return extPanelGroupMapper.findOneWithPrivileges(panelGroupWithBLOBs.getSource(), String.valueOf(AuthUtils.getUser().getUserId()));
public PanelGroupDTO findOne(String panelId) {
PanelGroupDTO panelGroup = extPanelGroupMapper.findOneWithPrivileges(panelId, String.valueOf(AuthUtils.getUser().getUserId()));
// 默认仪表板取源仪表板样式
if (panelGroup != null && StringUtils.isNotEmpty(panelGroup.getSource())) {
PanelGroupDTO sourcePanel = extPanelGroupMapper.findOneWithPrivileges(panelGroup.getSource(), String.valueOf(AuthUtils.getUser().getUserId()));
panelGroup.setPanelData(sourcePanel.getPanelData());
panelGroup.setPanelStyle(sourcePanel.getPanelStyle());
panelGroup.setSourcePanelName(sourcePanel.getName());
}
return panelGroupWithBLOBs;
return panelGroup;
}

View File

@ -142,7 +142,8 @@ export function initPanelData(panelId, callback) {
store.dispatch('panel/setPanelInfo', {
id: response.data.id,
name: response.data.name,
privileges: response.data.privileges
privileges: response.data.privileges,
sourcePanelName: response.data.sourcePanelName
})
// 刷新联动信息
getPanelAllLinkageInfo(panelId).then(rsp => {

View File

@ -413,7 +413,7 @@ export default {
},
{name: 'ck', label: 'ClickHouse', type: 'jdbc', extraParams: ''},
{name: 'redshift', label: 'AWS Redshift', type: 'jdbc'},
{name: 'mongo', label: 'MongoDB', type: 'jdbc', extraParams: ''},
{name: 'mongo', label: 'MongoDB', type: 'jdbc', extraParams: 'rebuildschema=true'},
{name: 'db2', label: 'Db2', type: 'jdbc', extraParams: ''},
{name: 'api', label: 'API', type: 'api', extraParams: ''}
],