mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
feat(editor): provide yaml validation for docker compose in the portainer web editor [BE-11697] (#526)
This commit is contained in:
parent
0ebfe047d1
commit
81c5f4acc3
27 changed files with 2046 additions and 36 deletions
|
@ -1,3 +1,5 @@
|
|||
import { useDockerComposeSchema } from '@/react/hooks/useDockerComposeSchema/useDockerComposeSchema';
|
||||
|
||||
import { InlineLoader } from '@@/InlineLoader';
|
||||
import { WebEditorForm } from '@@/WebEditorForm';
|
||||
|
||||
|
@ -14,7 +16,9 @@ export function DockerContentField({
|
|||
readonly?: boolean;
|
||||
isLoading?: boolean;
|
||||
}) {
|
||||
if (isLoading) {
|
||||
const dockerComposeSchemaQuery = useDockerComposeSchema();
|
||||
|
||||
if (isLoading || dockerComposeSchemaQuery.isInitialLoading) {
|
||||
return <InlineLoader>Loading stack content...</InlineLoader>;
|
||||
}
|
||||
|
||||
|
@ -27,6 +31,7 @@ export function DockerContentField({
|
|||
placeholder="Define or paste the content of your docker compose file here"
|
||||
error={error}
|
||||
readonly={readonly}
|
||||
schema={dockerComposeSchemaQuery.data}
|
||||
data-cy="stack-creation-editor"
|
||||
>
|
||||
You can get more information about Compose file format in the{' '}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue