2023-09-05 16:06:36 +00:00
|
|
|
import { useCurrentEnvironment } from '@/react/hooks/useCurrentEnvironment';
|
2023-10-11 19:32:02 +00:00
|
|
|
import { useUnauthorizedRedirect } from '@/react/hooks/useUnauthorizedRedirect';
|
2023-09-05 16:06:36 +00:00
|
|
|
|
|
|
|
import { PageHeader } from '@@/PageHeader';
|
|
|
|
import { Widget, WidgetBody } from '@@/Widget';
|
|
|
|
|
|
|
|
import { ConfigureForm } from './ConfigureForm';
|
|
|
|
|
|
|
|
export function ConfigureView() {
|
|
|
|
const { data: environment } = useCurrentEnvironment();
|
|
|
|
|
2023-10-11 19:32:02 +00:00
|
|
|
useUnauthorizedRedirect(
|
|
|
|
{
|
|
|
|
authorizations: 'K8sClusterW',
|
|
|
|
forceEnvironmentId: environment?.Id,
|
|
|
|
adminOnlyCE: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
params: {
|
|
|
|
id: environment?.Id,
|
|
|
|
},
|
|
|
|
to: 'kubernetes.dashboard',
|
|
|
|
}
|
|
|
|
);
|
2023-09-05 16:06:36 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<PageHeader
|
|
|
|
title="Kubernetes features configuration"
|
|
|
|
breadcrumbs={[
|
|
|
|
{ label: 'Environments', link: 'portainer.endpoints' },
|
|
|
|
{
|
|
|
|
label: environment?.Name || '',
|
|
|
|
link: 'portainer.endpoints.endpoint',
|
|
|
|
linkParams: { id: environment?.Id },
|
|
|
|
},
|
|
|
|
'Kubernetes configuration',
|
|
|
|
]}
|
2023-11-22 01:21:07 +00:00
|
|
|
reload
|
2023-09-05 16:06:36 +00:00
|
|
|
/>
|
|
|
|
<div className="row">
|
|
|
|
<div className="col-sm-12">
|
|
|
|
<Widget>
|
|
|
|
<WidgetBody>
|
|
|
|
<ConfigureForm />
|
|
|
|
</WidgetBody>
|
|
|
|
</Widget>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|