2022-04-19 18:43:36 +00:00
|
|
|
import { useRouter } from '@uirouter/react';
|
|
|
|
|
2022-10-23 06:53:25 +00:00
|
|
|
import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList';
|
|
|
|
import { EdgeTypes } from '@/react/portainer/environments/types';
|
2022-04-19 18:43:36 +00:00
|
|
|
|
2022-06-22 17:11:46 +00:00
|
|
|
import { InformationPanel } from '@@/InformationPanel';
|
|
|
|
import { TextTip } from '@@/Tip/TextTip';
|
2022-06-17 16:18:42 +00:00
|
|
|
import { PageHeader } from '@@/PageHeader';
|
|
|
|
|
2022-11-22 12:16:34 +00:00
|
|
|
import { Datatable } from './Datatable';
|
2022-04-19 18:43:36 +00:00
|
|
|
|
|
|
|
export function WaitingRoomView() {
|
|
|
|
const router = useRouter();
|
|
|
|
const { environments, isLoading, totalCount } = useEnvironmentList({
|
2022-07-19 16:00:45 +00:00
|
|
|
edgeDevice: true,
|
|
|
|
edgeDeviceUntrusted: true,
|
2022-09-22 20:05:10 +00:00
|
|
|
excludeSnapshots: true,
|
2022-07-19 16:00:45 +00:00
|
|
|
types: EdgeTypes,
|
2022-04-19 18:43:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
if (process.env.PORTAINER_EDITION !== 'BE') {
|
|
|
|
router.stateService.go('edge.devices');
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<PageHeader
|
|
|
|
title="Waiting Room"
|
|
|
|
breadcrumbs={[
|
|
|
|
{ label: 'Edge Devices', link: 'edge.devices' },
|
|
|
|
{ label: 'Waiting Room' },
|
|
|
|
]}
|
|
|
|
/>
|
2022-06-22 17:11:46 +00:00
|
|
|
|
|
|
|
<InformationPanel>
|
|
|
|
<TextTip color="blue">
|
|
|
|
Only environments generated from the AEEC script will appear here,
|
|
|
|
manually added environments and edge devices will bypass the waiting
|
|
|
|
room.
|
|
|
|
</TextTip>
|
|
|
|
</InformationPanel>
|
|
|
|
|
2022-11-22 12:16:34 +00:00
|
|
|
<Datatable
|
|
|
|
devices={environments}
|
|
|
|
totalCount={totalCount}
|
|
|
|
isLoading={isLoading}
|
|
|
|
/>
|
2022-04-19 18:43:36 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|