import { Disclosure, DisclosureButton, DisclosurePanel, } from '@headlessui/react'; import { ArrowTopRightOnSquareIcon, ChevronRightIcon, } from '@heroicons/react/20/solid'; import { useState } from 'react'; import Activity from './Activity'; const tabs = [ { key: 'successful', label: 'Successful logins' }, { key: 'failed', label: 'Failed logins' }, ]; interface ActivityPanelArgs { /** The firewall mode, 'off' | 'monitor' | 'protect' — decides how a ban reads */ mode: string; countries: string[]; languages: string[]; updateIsos: Function; removeDataOnUninstall: boolean; onRemoveDataChange: Function; onManageInCloud: () => void; } export default function ActivityPanel( { mode, countries, languages, updateIsos, removeDataOnUninstall, onRemoveDataChange, onManageInCloud, }: ActivityPanelArgs ) { // Plain buttons over local state. A Headless TabGroup keeps its own index, // so driving selection from the outside leaves the two out of step. const [ selected, setSelected ] = useState( 'successful' ); return ( Activity — review sign-ins, allow or block individual addresses
{ tabs.map( ( tab ) => ( ) ) }

This site keeps seven days of sign-in requests; the Firewall page for this domain in your Web-Engine cloud account holds the longer history, and can block or unblock an address when you cannot reach this page.

{ /* Remounted per tab, on purpose: the two read different rows with different sorts, and a shared instance would page one tab's list with the other's offset. */ }
{ /* ::TODO:: the blocked-attempt count since a given date goes here, once the cloud reports it. */ }

Protection levels, location rules and the full allow and blocked lists are managed in your Web-Engine cloud account.

{ /* Uninstall runs without a prompt, so consent to removing the recorded data lives here as a setting. */ }
); }