diff --git a/client/shared/model/group.ts b/client/shared/model/group.ts index 82be7091..0d1d2d2f 100644 --- a/client/shared/model/group.ts +++ b/client/shared/model/group.ts @@ -285,6 +285,7 @@ export async function modifyGroupPanel( panelId: string, options: { name: string; + type: number; parentId?: string; provider?: string; pluginPanelName?: string; diff --git a/client/web/plugins/com.msgbyte.posthog/manifest.json b/client/web/plugins/com.msgbyte.posthog/manifest.json index bb7a896a..0ed83a41 100644 --- a/client/web/plugins/com.msgbyte.posthog/manifest.json +++ b/client/web/plugins/com.msgbyte.posthog/manifest.json @@ -1,9 +1,9 @@ -{ - "label": "posthog", - "name": "com.msgbyte.posthog", - "url": "/plugins/com.msgbyte.posthog/index.js", - "version": "0.0.0", - "author": "moonrailgun", - "description": "Posthog 数据统计", - "requireRestart": true -} +{ + "label": "Posthog", + "name": "com.msgbyte.posthog", + "url": "/plugins/com.msgbyte.posthog/index.js", + "version": "0.0.0", + "author": "moonrailgun", + "description": "Posthog 数据统计", + "requireRestart": true +} diff --git a/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx b/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx index 50247c31..4d0d325c 100644 --- a/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx +++ b/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx @@ -42,7 +42,7 @@ export const ModalModifyGroupPanel: React.FC<{ await modifyGroupPanel( props.groupId, props.groupPanelId, - _omit(buildDataFromValues(values), 'type') // 发送时不传type + buildDataFromValues(values) ); showToasts(t('修改成功'), 'success'); typeof props.onSuccess === 'function' && props.onSuccess(); diff --git a/server/services/core/group/group.service.ts b/server/services/core/group/group.service.ts index 91d0d704..28a2264d 100644 --- a/server/services/core/group/group.service.ts +++ b/server/services/core/group/group.service.ts @@ -112,6 +112,7 @@ class GroupService extends TcService { groupId: 'string', panelId: 'string', name: 'string', + type: 'number', provider: { type: 'string', optional: true }, pluginPanelName: { type: 'string', optional: true }, meta: { type: 'object', optional: true }, @@ -640,12 +641,13 @@ class GroupService extends TcService { groupId: string; panelId: string; name: string; + type: number; provider?: string; pluginPanelName?: string; meta?: object; }> ) { - const { groupId, panelId, name, provider, pluginPanelName, meta } = + const { groupId, panelId, name, type, provider, pluginPanelName, meta } = ctx.params; const { t, userId } = ctx.meta; @@ -666,6 +668,7 @@ class GroupService extends TcService { { $set: { 'panels.$[element].name': name, + 'panels.$[element].type': type, 'panels.$[element].provider': provider, 'panels.$[element].pluginPanelName': pluginPanelName, 'panels.$[element].meta': meta,