diff --git a/kontrol-frontend/src/components/CytoscapeGraph/Legend.tsx b/kontrol-frontend/src/components/CytoscapeGraph/Legend.tsx index 8bd153c..03a2251 100644 --- a/kontrol-frontend/src/components/CytoscapeGraph/Legend.tsx +++ b/kontrol-frontend/src/components/CytoscapeGraph/Legend.tsx @@ -77,17 +77,21 @@ const Legend = () => { {flowId} {isBaseline.toString()} - - {flowUrls[0].hostname} - - + {flowUrls[0]?.hostname != null ? ( + + {flowUrls[0].hostname} + + + ) : ( + "—" + )} {flowVisibility[flowId] === true ? ( diff --git a/kontrol-frontend/src/components/Navbar.tsx b/kontrol-frontend/src/components/Navbar.tsx index 4fe501f..f201ca2 100644 --- a/kontrol-frontend/src/components/Navbar.tsx +++ b/kontrol-frontend/src/components/Navbar.tsx @@ -7,9 +7,21 @@ import { Image, Spacer, AvatarBadge, + Menu, + MenuButton, + MenuList, + MenuItem, + Button, } from "@chakra-ui/react"; +import { useNavigate } from "react-router-dom"; const Navbar = () => { + const navigate = useNavigate(); + + const navigateToPlaceholder = () => { + navigate("profile"); + }; + return ( { borderBottomColor="gray.100" > - {/* Logo */} { - {/* User Profile */} - - - - - Charlie Brown - - ACME Corporation - - + + + + + + + + Profile + Settings + Log in + + diff --git a/kontrol-frontend/src/contexts/ApiContext.tsx b/kontrol-frontend/src/contexts/ApiContext.tsx index 93ce842..09676b9 100644 --- a/kontrol-frontend/src/contexts/ApiContext.tsx +++ b/kontrol-frontend/src/contexts/ApiContext.tsx @@ -43,10 +43,10 @@ export interface ApiContextType { const defaultContextValue: ApiContextType = { deleteFlow: async () => [], - deleteTemplate: async () => { }, + deleteTemplate: async () => {}, error: null, getFlows: async () => [], - getTemplates: async () => { }, + getTemplates: async () => {}, getTopology: async () => { return { nodes: [], edges: [] }; }, @@ -54,9 +54,10 @@ const defaultContextValue: ApiContextType = { postFlowCreate: async () => ({ "flow-id": "", "access-entry": [], + "flow-urls": [], isBaseline: false, }), - postTemplateCreate: async () => { }, + postTemplateCreate: async () => {}, templates: [], }; diff --git a/kontrol-frontend/src/main.tsx b/kontrol-frontend/src/main.tsx index 6c7eac2..38bc5c4 100644 --- a/kontrol-frontend/src/main.tsx +++ b/kontrol-frontend/src/main.tsx @@ -11,6 +11,7 @@ import FlowsCreate from "@/pages/FlowsCreate"; import FlowsIndex from "@/pages/FlowsIndex"; import MaturityGates from "@/pages/MaturityGates"; import TrafficConfiguration from "@/pages/TrafficConfiguration"; +import Profile from "@/pages/Profile"; import NotFound from "@/pages/NotFound"; import { ErrorBoundary } from "react-error-boundary"; @@ -60,6 +61,10 @@ const router = createBrowserRouter([ path: "data-configuration", element: , }, + { + path: "profile", + element: , + }, ], }, { diff --git a/kontrol-frontend/src/pages/Profile.tsx b/kontrol-frontend/src/pages/Profile.tsx new file mode 100644 index 0000000..12664bc --- /dev/null +++ b/kontrol-frontend/src/pages/Profile.tsx @@ -0,0 +1,19 @@ +import EmptyState from "@/components/EmptyState"; +import { BiChevronLeft } from "react-icons/bi"; +import { FiUser } from "react-icons/fi"; + +const Page = () => { + return ( + + We’re working on getting this functionality up and running. We’ll let you + know when it’s ready for you! + + ); +}; + +export default Page;