feat(ui): implement simple Mutelist and add new view (#9577)

Co-authored-by: Alan Buscaglia <gentlemanprogramming@gmail.com>
This commit is contained in:
Alejandro Bailo
2025-12-18 16:06:45 +01:00
committed by GitHub
parent 4abead2787
commit d93c7dcc4d
40 changed files with 2349 additions and 616 deletions

View File

@@ -16,7 +16,6 @@ import {
VolumeX,
Warehouse,
} from "lucide-react";
import type { MouseEvent } from "react";
import { ProwlerShort } from "@/components/icons";
import {
@@ -30,17 +29,9 @@ import { GroupProps } from "@/types";
interface MenuListOptions {
pathname: string;
hasProviders?: boolean;
openMutelistModal?: () => void;
requestMutelistModalOpen?: () => void;
}
export const getMenuList = ({
pathname,
hasProviders,
openMutelistModal,
requestMutelistModalOpen,
}: MenuListOptions): GroupProps[] => {
export const getMenuList = ({ pathname }: MenuListOptions): GroupProps[] => {
return [
{
groupLabel: "",
@@ -79,7 +70,7 @@ export const getMenuList = ({
groupLabel: "",
menus: [
{
href: "/findings",
href: "/findings?filter[muted]=false",
label: "Findings",
icon: Tag,
},
@@ -105,28 +96,10 @@ export const getMenuList = ({
submenus: [
{ href: "/providers", label: "Cloud Providers", icon: CloudCog },
{
href: "/providers",
href: "/mutelist",
label: "Mutelist",
icon: VolumeX,
disabled: hasProviders === false,
active: false,
onClick: (event: MouseEvent<HTMLAnchorElement>) => {
if (hasProviders === false) {
event.preventDefault();
event.stopPropagation();
return;
}
requestMutelistModalOpen?.();
if (pathname !== "/providers") {
return;
}
event.preventDefault();
event.stopPropagation();
openMutelistModal?.();
},
active: pathname === "/mutelist",
},
{ href: "/manage-groups", label: "Provider Groups", icon: Group },
{ href: "/scans", label: "Scan Jobs", icon: Timer },