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={[ - +