Skip to content

Commit 9c2e1a3

Browse files
authored
Merge pull request #2616 from akto-api-security/feature/mcp_security_ui
Feature/mcp security UI
2 parents 85ec8aa + 6c87917 commit 9c2e1a3

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/layouts/leftnav/LeftNav.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Box, Navigation, Text} from "@shopify/polaris";
1+
import {Box, Navigation, Text, Banner, Badge} from "@shopify/polaris";
22
import {
33
AppsFilledMajor,
44
InventoryFilledMajor,
@@ -7,6 +7,7 @@ import {
77
DiamondAlertMinor,
88
StarFilledMinor,
99
FinancesMinor,
10+
LockFilledMajor,
1011
} from "@shopify/polaris-icons";
1112
import {useLocation, useNavigate} from "react-router-dom";
1213

@@ -26,6 +27,7 @@ export default function LeftNav() {
2627
const currPathString = func.transformString(location.pathname);
2728

2829
const [leftNavSelected, setLeftNavSelected] = useState(currPathString);
30+
const [showMcpBanner, setShowMcpBanner] = useState(false);
2931

3032
const active = PersistStore((state) => state.active);
3133
const setActive = PersistStore((state) => state.setActive);
@@ -303,6 +305,21 @@ export default function LeftNav() {
303305
subNavigationItems: reportsSubNavigationItems,
304306
key: "6",
305307
},
308+
{
309+
label: (
310+
<Text variant="bodyMd" fontWeight="medium">
311+
MCP Security
312+
</Text>
313+
),
314+
icon: LockFilledMajor,
315+
onClick: () => {
316+
handleSelect("dashboard_mcp_security");
317+
navigate("/dashboard/mcp-security");
318+
setActive("normal");
319+
},
320+
selected: leftNavSelected === "dashboard_mcp_security",
321+
key: "mcp_security",
322+
},
306323
...(window?.STIGG_FEATURE_WISE_ALLOWED?.THREAT_DETECTION?.isGranted ? [{
307324
label: (
308325
<Text variant="bodyMd" fontWeight="medium">
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Page, Box, Button } from '@shopify/polaris';
2+
import EmptyScreensLayout from '../../components/banners/EmptyScreensLayout';
3+
4+
function McpSecurityPage() {
5+
return (
6+
<Page title="MCP Security" fullWidth>
7+
<Box width="100%">
8+
<EmptyScreensLayout
9+
iconSrc={"/public/mcp.svg"}
10+
headingText={"MCP Security is in beta"}
11+
description={"MCP Security is currently in beta. Contact our sales team to learn more about this feature and get access."}
12+
bodyComponent={<Button url="https://www.akto.io/api-security-demo" target="_blank" primary>Contact sales</Button>}
13+
/>
14+
</Box>
15+
</Page>
16+
);
17+
}
18+
19+
export default McpSecurityPage;

apps/dashboard/web/polaris_web/web/src/apps/main/App.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ import CloudflareWaf from "../dashboard/pages/settings/integrations/CloudflareWa
9696
import UndoDemergedApis from "../dashboard/pages/settings/undo_demerged_apis/UndoDemergedApis";
9797
import GmailWebhookCore from "../dashboard/pages/settings/integrations/gmailWebhooks/GmailWebhookCore";
9898
import GmailWebhook from "../dashboard/pages/settings/integrations/gmailWebhooks/GmailWebhook";
99+
import McpSecurityPage from "../dashboard/pages/mcp-security/McpSecurityPage.jsx";
99100

100101
// if you add a component in a new path, please verify the search implementation in function -> 'getSearchItemsArr' in func.js
101102

@@ -245,6 +246,10 @@ const router = createBrowserRouter([
245246
}
246247
]
247248
},
249+
{
250+
path: "mcp-security",
251+
element: <McpSecurityPage/>,
252+
},
248253
]
249254
},
250255
{

apps/dashboard/web/public/mcp.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)