forked from github/dataease
commit
45767f75e4
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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 => {
|
||||
|
@ -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: ''}
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user