Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frontend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export type SetConfigArguments = {
setSidebarItems?: (items: SidebarItem[]) => void;
setBreadcrumbs?: (items: Breadcrumb[]) => void;
isServerless?: boolean;
isAdpEnabled?: boolean;
featureFlags?: Record<keyof typeof FEATURE_FLAGS, boolean>;
};

Expand Down Expand Up @@ -173,6 +174,7 @@ type Config = {
setSidebarItems: (items: SidebarItem[]) => void;
setBreadcrumbs: (items: Breadcrumb[]) => void;
isServerless: boolean;
isAdpEnabled: boolean;
featureFlags: Record<keyof typeof FEATURE_FLAGS, boolean>;
};

Expand All @@ -193,6 +195,7 @@ export const config: Config = observable({
// no op - set by parent application
},
isServerless: false,
isAdpEnabled: false,
featureFlags: FEATURE_FLAGS,
});

Expand All @@ -201,6 +204,7 @@ const setConfig = ({
urlOverride,
jwt,
isServerless: isServerlessMode,
isAdpEnabled: isAdpEnabledMode,
featureFlags,
...args
}: SetConfigArguments) => {
Expand Down Expand Up @@ -246,6 +250,7 @@ const setConfig = ({
jwt,
dataplaneTransport,
isServerless: isServerlessMode,
isAdpEnabled: isAdpEnabledMode ?? false,
restBasePath: getRestBasePath(urlOverride?.rest),
grpcBasePath: getGrpcBasePath(urlOverride?.grpc),
controlplaneUrl: config.controlplaneUrl,
Expand Down Expand Up @@ -348,6 +353,10 @@ export function isServerless() {
return config.isServerless;
}

export function isAdpEnabled() {
return config.isAdpEnabled;
}

export const embeddedAvailableRoutesObservable = observable({
get routes() {
return getEmbeddedAvailableRoutes();
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/utils/route-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
UserCircleIcon,
} from '../components/icons';
import { MCPIcon } from '../components/redpanda-ui/components/icons';
import { isEmbedded, isFeatureFlagEnabled, isServerless } from '../config';
import { isAdpEnabled, isEmbedded, isFeatureFlagEnabled, isServerless } from '../config';
import { api } from '../state/backend-api';
import { Feature, isSupported, shouldHideIfNotSupported } from '../state/supported-features';

Expand Down Expand Up @@ -220,7 +220,7 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
title: 'Knowledge Bases',
icon: BookOpenIcon,
visibilityCheck: routeVisibility(
() => isFeatureFlagEnabled('enableKnowledgeBaseInConsoleUi'),
() => isAdpEnabled() && isFeatureFlagEnabled('enableKnowledgeBaseInConsoleUi'),
[Feature.PipelineService]
),
},
Expand Down Expand Up @@ -261,7 +261,7 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
title: 'Transcripts',
icon: ActivityIcon,
visibilityCheck: routeVisibility(
() => isEmbedded() && isFeatureFlagEnabled('enableTranscriptsInConsole'),
() => isEmbedded() && isAdpEnabled() && isFeatureFlagEnabled('enableTranscriptsInConsole'),
[Feature.TracingService]
),
},
Expand Down Expand Up @@ -300,6 +300,7 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
visibilityCheck: routeVisibility(
() =>
isEmbedded() &&
isAdpEnabled() &&
(!isServerless() || isFeatureFlagEnabled('enableAiAgentsInConsoleServerless')) &&
isFeatureFlagEnabled('enableAiAgentsInConsole')
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test.describe('ACL User Management', () => {

// Wait for API initialization to complete and button to be enabled
// This handles timing differences between local and CI environments
await expect(page.getByTestId('create-user-button')).toBeEnabled({ timeout: 10000 });
await expect(page.getByTestId('create-user-button')).toBeEnabled({ timeout: 10_000 });
});

test('should create a new user with special characters in password', async ({ page }) => {
Expand Down Expand Up @@ -367,7 +367,7 @@ test.describe('ACL User Management', () => {
});

await test.step('6. Verify redirect to users list', async () => {
await page.waitForURL('/security/users', { timeout: 10000 });
await page.waitForURL('/security/users', { timeout: 10_000 });
});
});
});
Loading