From 12ed7aafee9df714836958bae971f45dca469899 Mon Sep 17 00:00:00 2001 From: ningyv <1793599591@qq.com> Date: Fri, 14 Feb 2025 18:04:38 +0800 Subject: [PATCH] feat: feature/1.5-Data Integration --- frontend/packages/common/src/const/permissions.ts | 15 +++++++++++++++ .../common/src/contexts/GlobalStateContext.tsx | 2 +- .../core/src/pages/loadBalancing/index.tsx | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/packages/common/src/const/permissions.ts b/frontend/packages/common/src/const/permissions.ts index dbe2786e..132f9641 100644 --- a/frontend/packages/common/src/const/permissions.ts +++ b/frontend/packages/common/src/const/permissions.ts @@ -239,6 +239,21 @@ export const PERMISSION_DEFINITION = [ anyOf: [{ backend: ['system.settings.log_configuration.manager'] }] } }, + 'system.settings.ai_balance.view': { + granted: { + anyOf: [{ backend: ['system.settings.ai_balance.view'] }] + } + }, + 'system.settings.ai_balance.delete': { + granted: { + anyOf: [{ backend: ['system.settings.ai_balance.manager'] }] + } + }, + 'system.settings.ai_balance.add': { + granted: { + anyOf: [{ backend: ['system.settings.ai_balance.manager'] }] + } + }, 'system.devops.policy.view': { granted: { anyOf: [{ backend: ['system.settings.strategy.view'] }] diff --git a/frontend/packages/common/src/contexts/GlobalStateContext.tsx b/frontend/packages/common/src/contexts/GlobalStateContext.tsx index 1a3eb1ff..a1cfcd29 100644 --- a/frontend/packages/common/src/contexts/GlobalStateContext.tsx +++ b/frontend/packages/common/src/contexts/GlobalStateContext.tsx @@ -166,7 +166,7 @@ const mockData = [ key: 'loadBalancing', path: '/loadBalancing', icon: 'ph:network-x', - access: 'system.settings.data_source.view' + access: 'system.settings.ai_balance.view' } ] }, diff --git a/frontend/packages/core/src/pages/loadBalancing/index.tsx b/frontend/packages/core/src/pages/loadBalancing/index.tsx index 18d7b455..42f1b598 100644 --- a/frontend/packages/core/src/pages/loadBalancing/index.tsx +++ b/frontend/packages/core/src/pages/loadBalancing/index.tsx @@ -256,7 +256,7 @@ const LoadBalancingPage = () => { valueType: 'option', render: (_: React.ReactNode, entity: any) => [ handleDelete(entity.id as string)} @@ -285,7 +285,7 @@ const LoadBalancingPage = () => { ref={pageListRef} rowKey="id" afterNewBtn={[ - +