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
12 changes: 6 additions & 6 deletions tavern/internal/www/build/asset-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tavern/internal/www/build/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tavern/internal/www/build/static/css/main.0de78947.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tavern/internal/www/build/static/css/main.0de78947.css.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions tavern/internal/www/build/static/css/main.302d2dcd.css

This file was deleted.

1 change: 0 additions & 1 deletion tavern/internal/www/build/static/css/main.302d2dcd.css.map

This file was deleted.

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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

This file was deleted.

20 changes: 0 additions & 20 deletions tavern/internal/www/src/features/task-output/ErrorWrapper.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions tavern/internal/www/src/features/task-output/ExpandedDetails.tsx

This file was deleted.

85 changes: 0 additions & 85 deletions tavern/internal/www/src/features/task-output/ShellTable.tsx

This file was deleted.

125 changes: 0 additions & 125 deletions tavern/internal/www/src/features/task-output/TaskOutput.tsx

This file was deleted.

1 change: 0 additions & 1 deletion tavern/internal/www/src/features/task-output/index.tsx

This file was deleted.

50 changes: 47 additions & 3 deletions tavern/internal/www/src/pages/host-details/HostDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,57 @@
import { PageWrapper } from "../../components/page-wrapper";
import { PageNavItem } from "../../utils/enums";
import HostTasks from "./components/HostTasks";
import HostContent from "./components/HostContent";
import { Tab } from '@headlessui/react'
import { useQuery } from "@apollo/client";
import { useParams } from "react-router-dom";
import { GET_HOST_QUERY, GET_HOST_TASK_SUMMARY } from "../../utils/queries";
import EditableHostHeader from "./components/EditableHostHeader";
import { HostType } from "../../utils/consts";
import HostStatistics from "./components/HostStatistics";
import BeaconTableWrapper from "./components/BeaconTableWrapper";

const HostDetails = () => {
const { hostId } = useParams();
const { loading, data, error } = useQuery(GET_HOST_QUERY, {
variables: {
"where": {
"id": hostId
}
}
});

const { loading: taskLoading, data: taskData, error: taskError } = useQuery(GET_HOST_TASK_SUMMARY, {
variables: {
"where": {
"hasBeaconWith": {
"hasHostWith": {
"id": hostId
}
}
}
}
});

const host = data?.hosts && data?.hosts.length > 0 ? data.hosts[0] : null as HostType | null;

return (
<PageWrapper currNavItem={PageNavItem.hosts}>
<HostContent />
<HostTasks />
<EditableHostHeader hostId={hostId} loading={loading} error={error} hostData={host} />
<HostStatistics host={host} taskLoading={taskLoading} taskError={taskError} taskData={taskData} />
<Tab.Group>
<Tab.List className="flex flex-row space-x-4 border-b border-gray-200 w-full">
<Tab className={({ selected }) => `border-b-2 py-2 px-4 text-sm font-semibold ${selected ? 'border-purple-700 text-purple-800' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}`}>Beacons</Tab>
<Tab className={({ selected }) => `border-b-2 py-2 px-4 text-sm font-semibold ${selected ? 'border-purple-700 text-purple-800' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}`}>Tasks</Tab>
</Tab.List>
<Tab.Panels>
<Tab.Panel>
<BeaconTableWrapper loading={loading} error={error} host={host} />
</Tab.Panel>
<Tab.Panel>
<HostTasks />
</Tab.Panel>
</Tab.Panels>
</Tab.Group>
</PageWrapper>
);
}
Expand Down
Loading