Skip to content

Commit

Permalink
fix: added download collectors and changed order (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
specter-flq authored Feb 4, 2025
1 parent 9847889 commit 9cec2d5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 7 deletions.
14 changes: 10 additions & 4 deletions cmd/ui/src/components/MainNav/MainNavData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export const useMainNavSecondaryListData = () => {
testId: 'global_nav-my-profile',
},
{
label: 'Docs and Support',
icon: <AppIcon.FileMagnifyingGlass size={24} />,
functionHandler: handleGoToSupport,
testId: 'global_nav-support',
label: 'Download Collectors',
icon: <AppIcon.Download size={24} />,
route: routes.ROUTE_DOWNLOAD_COLLECTORS,
testId: 'global_nav-download-collectors',
},
{
label: 'Administration',
Expand All @@ -104,6 +104,12 @@ export const useMainNavSecondaryListData = () => {
route: routes.ROUTE_API_EXPLORER,
testId: 'global_nav-api-explorer',
},
{
label: 'Docs and Support',
icon: <AppIcon.FileMagnifyingGlass size={24} />,
functionHandler: handleGoToSupport,
testId: 'global_nav-support',
},
{
label: (
<>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright 2025 Specter Ops, Inc.
//
// Licensed under the Apache License, Version 2.0
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { BasePath, BaseSVG, BaseSVGProps } from './utils';

export const Download: React.FC<BaseSVGProps> = (props) => {
return (
<BaseSVG
name='download'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
{...props}>
<BasePath d='M18 15V18H6V15H4V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V15H18ZM17 11L15.59 9.59L13 12.17V4H11V12.17L8.41 9.59L7 11L12 16L17 11Z' />
</BaseSVG>
);
};

export default Download;
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export * from './CaretDown';
export * from './CaretUp';
export * from './Compass';
export * from './Diamond';
export * from './Download';
export * from './EclipseCircle';
export * from './Equals';
export * from './FileMagnifyingGlass';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ const MainNav: FC<{ mainNavData: MainNavData }> = ({ mainNavData }) => {
/>
</MainNavItemLink>
{/* Note: min height here is to keep the version number in bottom of nav */}
<div className='h-full min-h-[600px] w-full flex flex-col justify-between mt-6'>
<ul className='flex flex-col gap-6 mt-8' data-testid='global_nav-primary-list'>
<div className='h-full min-h-[625px] w-full flex flex-col justify-between mt-6'>
<ul className='flex flex-col gap-4 mt-8' data-testid='global_nav-primary-list'>
{mainNavData.primaryList.map((listDataItem: MainNavDataListItem, itemIndex: number) => (
<MainNavListItem
key={itemIndex}
Expand All @@ -217,7 +217,7 @@ const MainNav: FC<{ mainNavData: MainNavData }> = ({ mainNavData }) => {
</MainNavListItem>
))}
</ul>
<ul className='flex flex-col gap-4 mt-6' data-testid='global_nav-secondary-list'>
<ul className='flex flex-col gap-4 mt-4' data-testid='global_nav-secondary-list'>
{mainNavData.secondaryList.map((listDataItem: MainNavDataListItem, itemIndex: number) =>
listDataItem.route ? (
<MainNavListItem
Expand Down

0 comments on commit 9cec2d5

Please sign in to comment.