mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(kubernetes): edit yaml support EE-2855 (#8016)
This commit is contained in:
parent
7006c17ce4
commit
0f0513c684
11 changed files with 195 additions and 0 deletions
|
@ -4,6 +4,7 @@ import { r2a } from '@/react-tools/react2angular';
|
|||
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
||||
import { withReactQuery } from '@/react-tools/withReactQuery';
|
||||
import { withUIRouter } from '@/react-tools/withUIRouter';
|
||||
import { YAMLReplace } from '@/kubernetes/react/views/yamlReplace';
|
||||
import { IngressesDatatableView } from '@/react/kubernetes/ingresses/IngressDatatable';
|
||||
import { CreateIngressView } from '@/react/kubernetes/ingresses/CreateIngressView';
|
||||
|
||||
|
@ -19,4 +20,10 @@ export const viewsModule = angular
|
|||
.component(
|
||||
'kubernetesIngressesCreateView',
|
||||
r2a(withUIRouter(withReactQuery(withCurrentUser(CreateIngressView))), [])
|
||||
)
|
||||
.component(
|
||||
'yamlReplace',
|
||||
r2a(withUIRouter(withReactQuery(withCurrentUser(YAMLReplace))), [
|
||||
'featureId',
|
||||
])
|
||||
).name;
|
||||
|
|
28
app/kubernetes/react/views/yamlReplace/index.tsx
Normal file
28
app/kubernetes/react/views/yamlReplace/index.tsx
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { FeatureId } from '@/react/portainer/feature-flags/enums';
|
||||
|
||||
import { Button } from '@@/buttons';
|
||||
import { TooltipWithChildren } from '@@/Tip/TooltipWithChildren';
|
||||
|
||||
interface Props {
|
||||
featureId: FeatureId;
|
||||
}
|
||||
export function YAMLReplace({ featureId }: Props) {
|
||||
return (
|
||||
<TooltipWithChildren
|
||||
className="float-right"
|
||||
heading="Apply YAML changes"
|
||||
BEFeatureID={featureId}
|
||||
message="Applies any changes that you make in the YAML editor by calling the Kubernetes API to patch the relevant resources. Any resource removals or unexpected resource additions that you make in the YAML will be ignored. Note that editing is disabled for resources in namespaces marked as system."
|
||||
>
|
||||
<Button
|
||||
type="button"
|
||||
color="warninglight"
|
||||
size="small"
|
||||
onClick={() => {}}
|
||||
disabled
|
||||
>
|
||||
Apply changes
|
||||
</Button>
|
||||
</TooltipWithChildren>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue