Unverified 提交 45767f75 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #1863 from dataease/v1.8

V1.8
...@@ -71,7 +71,17 @@ public class PanelGroupController { ...@@ -71,7 +71,17 @@ public class PanelGroupController {
@ApiOperation("详细信息") @ApiOperation("详细信息")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
@GetMapping("/findOne/{id}") @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); return panelGroupService.findOne(id);
} }
......
...@@ -200,12 +200,16 @@ public class PanelGroupService { ...@@ -200,12 +200,16 @@ public class PanelGroupService {
} }
public PanelGroupWithBLOBs findOne(String panelId) { public PanelGroupDTO findOne(String panelId) {
PanelGroupWithBLOBs panelGroupWithBLOBs = extPanelGroupMapper.findOneWithPrivileges(panelId, String.valueOf(AuthUtils.getUser().getUserId())); PanelGroupDTO panelGroup = 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())); 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) { ...@@ -142,7 +142,8 @@ export function initPanelData(panelId, callback) {
store.dispatch('panel/setPanelInfo', { store.dispatch('panel/setPanelInfo', {
id: response.data.id, id: response.data.id,
name: response.data.name, name: response.data.name,
privileges: response.data.privileges privileges: response.data.privileges,
sourcePanelName: response.data.sourcePanelName
}) })
// 刷新联动信息 // 刷新联动信息
getPanelAllLinkageInfo(panelId).then(rsp => { getPanelAllLinkageInfo(panelId).then(rsp => {
......
...@@ -413,7 +413,7 @@ export default { ...@@ -413,7 +413,7 @@ export default {
}, },
{name: 'ck', label: 'ClickHouse', type: 'jdbc', extraParams: ''}, {name: 'ck', label: 'ClickHouse', type: 'jdbc', extraParams: ''},
{name: 'redshift', label: 'AWS Redshift', type: 'jdbc'}, {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: 'db2', label: 'Db2', type: 'jdbc', extraParams: ''},
{name: 'api', label: 'API', type: 'api', extraParams: ''} {name: 'api', label: 'API', type: 'api', extraParams: ''}
], ],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论