Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cloud Security] Hide K8S Dashboard on Serverless ONLY #203639

Closed
wants to merge 3 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const allowedExperimentalValues = Object.freeze({
// FIXME:PT delete?
excludePoliciesInFilterEnabled: false,

kubernetesEnabled: false,
kubernetesEnabled: true,
donutChartEmbeddablesEnabled: false, // Depends on https://github.com/elastic/kibana/issues/136409 item 2 - 6

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import { createSettingsLinksFromManage } from './sections/settings_links';
export const solutionAppLinksSwitcher = (appLinks: AppLinkItems): AppLinkItems => {
const solutionAppLinks = cloneDeep(appLinks) as LinkItem[];

const dashboardApp = find(solutionAppLinks ?? [], { id: SecurityPageName.dashboards });

if (dashboardApp && dashboardApp.links) {
remove(dashboardApp.links, { id: SecurityPageName.kubernetes });
}

// Remove manage link
const [manageLinkItem] = remove(solutionAppLinks, { id: SecurityPageName.administration });

Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/security_solution/public/kubernetes/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
*/

import React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { allowedExperimentalValues } from '../../common';
import { KubernetesContainer } from './pages';

import type { SecuritySubPluginRoutes } from '../app/types';
import { SecurityPageName } from '../app/types';
import { KUBERNETES_PATH } from '../../common/constants';
import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper';
import { SecurityRoutePageWrapper } from '../common/components/security_route_page_wrapper';

export const KubernetesRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.kubernetes}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to track collection anymore with TrackApplicationView, or it is now being handled by the SecurityRoutePageWrapper?

Copy link
Contributor Author

@animehart animehart Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its already included internally :) , had a discussion with @semd

<SecurityRoutePageWrapper pageName={SecurityPageName.kubernetes} redirectOnMissing>
<KubernetesContainer />
</TrackApplicationView>
</SecurityRoutePageWrapper>
</PluginTemplateWrapper>
);

Expand Down