Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tavern/internal/www/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.48904a80.css",
"main.js": "/static/js/main.8ec47288.js",
"main.js": "/static/js/main.a0c00c89.js",
"react-syntax-highlighter/refractor-core-import.js": "/static/js/react-syntax-highlighter/refractor-core-import.d0cd1e85.chunk.js",
"react-syntax-highlighter_languages_refractor_abap.js": "/static/js/react-syntax-highlighter_languages_refractor_abap.a2bf84e3.chunk.js",
"react-syntax-highlighter_languages_refractor_actionscript.js": "/static/js/react-syntax-highlighter_languages_refractor_actionscript.fff5a604.chunk.js",
Expand Down Expand Up @@ -158,7 +158,7 @@
"static/media/eldrich.png": "/static/media/eldrich.a80c74e8249d2461e174.png",
"index.html": "/index.html",
"main.48904a80.css.map": "/static/css/main.48904a80.css.map",
"main.8ec47288.js.map": "/static/js/main.8ec47288.js.map",
"main.a0c00c89.js.map": "/static/js/main.a0c00c89.js.map",
"refractor-core-import.d0cd1e85.chunk.js.map": "/static/js/react-syntax-highlighter/refractor-core-import.d0cd1e85.chunk.js.map",
"react-syntax-highlighter_languages_refractor_abap.a2bf84e3.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_abap.a2bf84e3.chunk.js.map",
"react-syntax-highlighter_languages_refractor_actionscript.fff5a604.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_actionscript.fff5a604.chunk.js.map",
Expand Down Expand Up @@ -315,6 +315,6 @@
},
"entrypoints": [
"static/css/main.48904a80.css",
"static/js/main.8ec47288.js"
"static/js/main.a0c00c89.js"
]
}
2 changes: 1 addition & 1 deletion tavern/internal/www/build/index.html
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>Tavern - Red Team Engagement Platform</title><script defer="defer" src="/static/js/main.8ec47288.js"></script><link href="/static/css/main.48904a80.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>Tavern - Red Team Engagement Platform</title><script defer="defer" src="/static/js/main.a0c00c89.js"></script><link href="/static/css/main.48904a80.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
3 changes: 0 additions & 3 deletions tavern/internal/www/build/static/js/main.8ec47288.js

This file was deleted.

3 changes: 3 additions & 0 deletions tavern/internal/www/build/static/js/main.a0c00c89.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions tavern/internal/www/src/assets/graphql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 38 additions & 44 deletions tavern/internal/www/src/components/page-wrapper/PageWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
XMarkIcon,
ClipboardDocumentCheckIcon,
CommandLineIcon,
BookOpenIcon,
ClockIcon
ClockIcon,
WrenchScrewdriverIcon
} from '@heroicons/react/24/outline'

import logo from '../../assets/eldrich.png';
Expand All @@ -16,17 +16,11 @@ import { Link } from 'react-router-dom';
import { AccessGate } from '../access-gate';

const navigation = [
{ name: PageNavItem.createQuest, href:'/createQuest', icon:CommandLineIcon, internal: true },
{ name: PageNavItem.results, href: '/results', icon: ClipboardDocumentCheckIcon, internal: true},
{ name: PageNavItem.quests, href: '/quests', icon: ClockIcon, internal: true},
// { name: 'Beacons', href: '/beacons', icon: BugAntIcon, current: false },
// { name: 'Realm status', href: '#', icon: PresentationChartLineIcon, current: false },
{ name: PageNavItem.createQuest, href: '/createQuest', icon: CommandLineIcon, internal: true },
{ name: PageNavItem.results, href: '/results', icon: ClipboardDocumentCheckIcon, internal: true },
{ name: PageNavItem.quests, href: '/quests', icon: ClockIcon, internal: true },
{ name: PageNavItem.documentation, href: 'https://docs.realm.pub/', icon: DocumentDuplicateIcon, target: "__blank", internal: false },
]
const teams = [
{ id: 1, name: 'Heroicons', href: '#', initial: 'H', current: false },
{ id: 2, name: 'Tailwind Labs', href: '#', initial: 'T', current: false },
{ id: 3, name: 'Workcation', href: '#', initial: 'W', current: false },
{ name: PageNavItem.playground, href: '/playground', icon: WrenchScrewdriverIcon, target: "__blank", internal: false },
]

function classNames(...classes: string[]) {
Expand All @@ -38,7 +32,7 @@ type Props = {
currNavItem?: PageNavItem;
}
export const PageWrapper = (props: Props) => {
const {children, currNavItem} = props;
const { children, currNavItem } = props;
const [sidebarOpen, setSidebarOpen] = useState(false)

return (
Expand Down Expand Up @@ -101,7 +95,7 @@ export const PageWrapper = (props: Props) => {
{navigation.map((item) => (
<li key={item.name}>
{item.internal ? (
<Link
<Link
to={item.href}
className={classNames(
item.name === currNavItem
Expand All @@ -113,10 +107,10 @@ export const PageWrapper = (props: Props) => {
<item.icon className="h-6 w-6 shrink-0" aria-hidden="true" />
{item.name}
</Link>
): (
) : (
<a
href={item.href}
target={item?.target ? '__blank': undefined}
target={item?.target ? '__blank' : undefined}
className={classNames(
item.name === currNavItem
? 'bg-gray-800 text-white'
Expand Down Expand Up @@ -151,8 +145,8 @@ export const PageWrapper = (props: Props) => {
className="h-12 w-auto"
src={logo}
alt="Your Company"
/>
<div className="text-white text-2xl leading-6 font-semibold tracking-wide">Tavern</div>
/>
<div className="text-white text-2xl leading-6 font-semibold tracking-wide">Tavern</div>
</div>
</a>
<nav className="flex flex-1 flex-col">
Expand All @@ -162,32 +156,32 @@ export const PageWrapper = (props: Props) => {
{navigation.map((item) => (
<li key={item.name}>
{item.internal ? (
<Link
to={item.href}
className={classNames(
item.name === currNavItem
? 'bg-gray-800 text-white'
: 'text-gray-400 hover:text-white hover:bg-gray-800',
'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold'
)}
>
<item.icon className="h-6 w-6 shrink-0" aria-hidden="true" />
{item.name}
</Link>
): (
<Link
to={item.href}
className={classNames(
item.name === currNavItem
? 'bg-gray-800 text-white'
: 'text-gray-400 hover:text-white hover:bg-gray-800',
'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold'
)}
>
<item.icon className="h-6 w-6 shrink-0" aria-hidden="true" />
{item.name}
</Link>
) : (
<a
href={item.href}
target={item?.target ? '__blank': undefined}
className={classNames(
item.name === currNavItem
? 'bg-gray-800 text-white'
: 'text-gray-400 hover:text-white hover:bg-gray-800',
'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold'
)}
>
<item.icon className="h-6 w-6 shrink-0" aria-hidden="true" />
{item.name}
</a>
href={item.href}
target={item?.target ? '__blank' : undefined}
className={classNames(
item.name === currNavItem
? 'bg-gray-800 text-white'
: 'text-gray-400 hover:text-white hover:bg-gray-800',
'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold'
)}
>
<item.icon className="h-6 w-6 shrink-0" aria-hidden="true" />
{item.name}
</a>
)}
</li>
))}
Expand All @@ -213,4 +207,4 @@ export const PageWrapper = (props: Props) => {
</div>
</AccessGate>
)
}
}
14 changes: 7 additions & 7 deletions tavern/internal/www/src/pages/tasks/Tasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TaskOutput } from "../../components/task-output";
import TaskTable from "../../components/TaskTable";
import { EmptyState, EmptyStateType } from "../../components/tavern-base-ui/EmptyState";
import TablePagination from "../../components/tavern-base-ui/TablePagination";
import { TableRowLimit } from "../../utils/enums";
import { PageNavItem, TableRowLimit } from "../../utils/enums";
import FilterBar from "./FilterBar";
import { TaskPageHeader } from "./TaskPageHeader";
import { TASK_PAGE_TYPE, useTasks } from "./useTasks";
Expand All @@ -27,14 +27,14 @@ const Tasks = () => {
const [isOpen, setOpen] = useState(false);
const [selectedTask, setSelectedTask] = useState<any | null>(null);

const handleClick =(e: any) => {
const handleClick = (e: any) => {
const selectedTaskData = e?.original?.node;
setSelectedTask(selectedTaskData);
setOpen((state)=> !state);
setOpen((state) => !state);
}

return (
<PageWrapper>
<PageWrapper currNavItem={PageNavItem.results}>
<div className="border-b border-gray-200 pb-5 sm:flex sm:items-center sm:justify-between">
<TaskPageHeader />
</div>
Expand All @@ -50,7 +50,7 @@ const Tasks = () => {
<TaskTable tasks={data?.tasks?.edges} onToggle={handleClick} />
<TablePagination totalCount={data?.tasks?.totalCount} pageInfo={data?.tasks?.pageInfo} refetchTable={updateTaskList} page={page} setPage={setPage} rowLimit={TableRowLimit.TaskRowLimit} />
</div>
): (
) : (
<EmptyState label="No data found" details="Try creating a new quest or adjusting filters." type={EmptyStateType.noData}>
<Link to="/createQuest">
<button
Expand All @@ -64,8 +64,8 @@ const Tasks = () => {
)}
</div>
)}
<TaskOutput isOpen={isOpen} setOpen={setOpen} selectedTask={selectedTask}/>
<TaskOutput isOpen={isOpen} setOpen={setOpen} selectedTask={selectedTask} />
</PageWrapper>
);
};
export default Tasks;
export default Tasks;
3 changes: 2 additions & 1 deletion tavern/internal/www/src/utils/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum TaskStatus {
export enum PageNavItem {
quests='Quest history',
documentation='Documentation',
playground='API Playground',
results='Quest outputs',
createQuest= 'Create new quest',
}
Expand All @@ -23,4 +24,4 @@ export enum SupportedPlatforms {
}
export enum TableRowLimit {
TaskRowLimit=8
}
}