Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): hide deployment access sidebar tab (#38229)

Stephen Zhoubaf2191ee360
diff --git a/web/features/deployments/detail/deployment-sidebar.tsx b/web/features/deployments/detail/deployment-sidebar.tsx
index aef17bfabb0..afbfd18b440 100644
--- a/web/features/deployments/detail/deployment-sidebar.tsx
+++ b/web/features/deployments/detail/deployment-sidebar.tsx
@@ -26,6 +26,7 @@ type TabDef = {
key: InstanceDetailTabKey
icon: NavIcon
selectedIcon: NavIcon
+ hidden?: boolean
}
type TailwindNavIconProps = PropsWithoutRef<ComponentProps<'svg'>> & {
@@ -68,7 +69,7 @@ const DEPLOYMENT_TABS: TabDef[] = [
{ key: 'overview', icon: OverviewIcon, selectedIcon: OverviewSelectedIcon },
{ key: 'instances', icon: DeployIcon, selectedIcon: DeploySelectedIcon },
{ key: 'releases', icon: VersionsIcon, selectedIcon: VersionsSelectedIcon },
- { key: 'access', icon: AccessIcon, selectedIcon: AccessSelectedIcon },
+ { key: 'access', icon: AccessIcon, selectedIcon: AccessSelectedIcon, hidden: true },
{ key: 'api-tokens', icon: ApiIcon, selectedIcon: ApiSelectedIcon },
]
@@ -296,7 +297,7 @@ export function DeploymentDetailSection({
</div>
<nav className={cn('flex flex-col gap-y-0.5 py-1', expand ? 'px-1' : 'px-3')}>
- {DEPLOYMENT_TABS.map(tab => (
+ {DEPLOYMENT_TABS.filter(tab => !tab.hidden).map(tab => (
<NavLink
key={tab.key}
mode={expand ? 'expand' : 'collapse'}
diff --git a/web/features/deployments/detail/tabs.ts b/web/features/deployments/detail/tabs.ts
index 0653948987e..59820e9ca39 100644
--- a/web/features/deployments/detail/tabs.ts
+++ b/web/features/deployments/detail/tabs.ts
@@ -1,4 +1,4 @@
-export const INSTANCE_DETAIL_TAB_KEYS = ['overview', 'instances', 'releases', 'api-tokens'] as const as readonly ('overview' | 'instances' | 'releases' | 'access' | 'api-tokens')[]
+export const INSTANCE_DETAIL_TAB_KEYS = ['overview', 'instances', 'releases', 'access', 'api-tokens'] as const
export type InstanceDetailTabKey = typeof INSTANCE_DETAIL_TAB_KEYS[number]