-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(hostview): Add beacon table to host view * fix(hostview): Add quest button to beacons list * fix(build): Rebuild UI
- Loading branch information
Showing
21 changed files
with
263 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Realm - Red Team Engagement Platform</title><script defer="defer" src="/static/js/main.1b7bbb76.js"></script><link href="/static/css/main.15b8222e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Realm - Red Team Engagement Platform</title><script defer="defer" src="/static/js/main.3fe7b832.js"></script><link href="/static/css/main.01f32014.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> |
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ww/build/static/css/main.15b8222e.css.map → ...ww/build/static/css/main.01f32014.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
123 changes: 0 additions & 123 deletions
123
tavern/internal/www/build/static/js/main.1b7bbb76.js.LICENSE.txt
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...rnal/www/build/static/js/main.1b7bbb76.js → ...rnal/www/build/static/js/main.3fe7b832.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../www/build/static/js/main.1b7bbb76.js.map → .../www/build/static/js/main.3fe7b832.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tavern/internal/www/src/components/empty-states/EmptyStateNoBeacon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { EmptyState, EmptyStateType } from "../tavern-base-ui/EmptyState"; | ||
|
||
const EmptyStateNoBeacon = () => { | ||
return ( | ||
<EmptyState type={EmptyStateType.noData} label="No beacons found" details="Get started by deploying an imix agent on your target system."> | ||
<button | ||
type="button" | ||
className="inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700" | ||
onClick={() => window.open("https://docs.realm.pub/user-guide/getting-started#start-the-agent", '_blank')} | ||
> | ||
See imix docs | ||
</button> | ||
</EmptyState> | ||
); | ||
} | ||
export default EmptyStateNoBeacon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tavern/internal/www/src/pages/host-details/components/BeaconAccordion.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ApolloError } from "@apollo/client"; | ||
import { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box } from "@chakra-ui/react"; | ||
import EmptyStateNoBeacon from "../../../components/empty-states/EmptyStateNoBeacon"; | ||
import { EmptyState, EmptyStateType } from "../../../components/tavern-base-ui/EmptyState"; | ||
import { HostType } from "../../../utils/consts"; | ||
import BeaconTable from "./BeaconTable"; | ||
|
||
type Props = { | ||
loading: boolean; | ||
error: ApolloError | undefined; | ||
host: HostType | null; | ||
} | ||
const BeaconAccordion = (props: Props) => { | ||
const { loading, error, host } = props; | ||
return ( | ||
<Accordion allowToggle className='w-full'> | ||
<AccordionItem> | ||
<AccordionButton> | ||
<Box as="span" flex='1' textAlign='left'> | ||
<h2 className="text-lg font-semibold text-gray-900">Beacons</h2> | ||
</Box> | ||
<AccordionIcon /> | ||
</AccordionButton> | ||
<AccordionPanel> | ||
{loading ? ( | ||
<EmptyState type={EmptyStateType.loading} label="Loading beacons..." /> | ||
) : error ? ( | ||
<EmptyState type={EmptyStateType.error} label="Error loading beacons..." /> | ||
) : ( | ||
<div> | ||
{host?.beacons && host?.beacons?.length > 0 ? ( | ||
<BeaconTable beacons={host.beacons} /> | ||
) | ||
: ( | ||
<EmptyStateNoBeacon /> | ||
)} | ||
</div> | ||
)} | ||
</AccordionPanel> | ||
</AccordionItem> | ||
</Accordion> | ||
); | ||
} | ||
export default BeaconAccordion; |
Oops, something went wrong.