Skip to content

Commit

Permalink
mutationMode=pessimistic in all Edits; fullWidth=true in CRS create/edit
Browse files Browse the repository at this point in the history
  • Loading branch information
alb-car committed Jun 4, 2024
1 parent 57505dd commit 1b37d9e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion frontend/src/resources/cr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const CrEdit = () => {
<>
<Breadcrumb />
<PageTitle pageType="edit" crId={record.id} />
<Edit actions={<EditTopToolbar hasYaml />}>
<Edit actions={<EditTopToolbar hasYaml />} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />}>
{jsonSchema ? (
<JsonSchemaInput
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/resources/crs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export const SchemaCreate = () => {
mode="json"
source="schema"
theme="monokai"
fullWidth={true}
/>
</SimpleForm>
</Create>
Expand All @@ -132,7 +133,7 @@ export const SchemaEdit = () => {
recordRepresentation: record.id,
})}
</Typography>
<Edit actions={<EditTopToolbar />}>
<Edit actions={<EditTopToolbar />} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />}>
<TextInput source="id" disabled sx={{ width: '22em' }} />
<TextInput source="crdId" disabled sx={{ width: '22em' }} />
Expand All @@ -141,6 +142,7 @@ export const SchemaEdit = () => {
mode="json"
source="schema"
theme="monokai"
fullWidth={true}
/>
</SimpleForm>
</Edit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const CrEdit = () => {
<>
<Breadcrumb />
<SimplePageTitle pageType="create" crName={CR_APIGATEWAYS} />
<Edit redirect="list" actions={<EditTopToolbar />} transform={transform} >
<Edit redirect="list" actions={<EditTopToolbar />} transform={transform} mutationMode='pessimistic'>
<SimpleForm validate={validate} >
<ApiGWForm/>
</SimpleForm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const CrEdit = () => {
crName={CR_MINIO_BUCKETS}
crId={record.spec.database}
/>
<Edit actions={<EditTopToolbar hasYaml/>} transform={transform}>
<Edit actions={<EditTopToolbar hasYaml/>} transform={transform} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />} validate={validateData} >
<Grid container alignItems="center" spacing={2}>
<Grid item xs={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const CrEdit = () => {
crName={CR_DREMIOREST}
crId={record.spec.database}
/>
<Edit actions={<EditTopToolbar hasYaml />} transform={transform}>
<Edit actions={<EditTopToolbar hasYaml />} transform={transform} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />} validate={validateData}>
<Grid container alignItems="center" spacing={2}>
<Grid item xs={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const CrEdit = () => {
<>
<Breadcrumb />
<SimplePageTitle pageType="edit" crName={CR_NUCLIO_APIGATEWAYS} />
<Edit actions={<EditTopToolbar hasYaml />} transform={transform}>
<Edit actions={<EditTopToolbar hasYaml />} transform={transform} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />} validate={validate}>
<Grid container spacing={2}>
<Grid item xs={2}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const CrEdit = () => {
crName={CR_MINIO_POLICIES}
crId={record.spec.database}
/>
<Edit actions={false}>
<Edit actions={false} mutationMode='pessimistic'>
<TopToolbar>
<InspectButton/>
<ShowButton/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const CrEdit = () => {
crName={CR_POSTGRES_DB}
crId={record.spec.database}
/>
<Edit actions={<EditTopToolbar hasYaml />}>
<Edit actions={<EditTopToolbar hasYaml />} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />}>
<Grid container alignItems="center" spacing={2}>
<Grid item xs={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ const CrEdit = () => {
crName={CR_POSTGREST}
crId={record.spec.database}
/>
<Edit actions={<EditTopToolbar hasYaml />} transform={transform}>
<Edit actions={<EditTopToolbar hasYaml />} transform={transform} mutationMode='pessimistic'>
<SimpleForm toolbar={<ViewToolbar />} validate={validateData}>
<Grid container alignItems="center" spacing={2}>
<Grid item xs={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const CrEdit = () => {
/>
<Edit
mutationOptions={{ onSuccess }}
mutationMode='pessimistic'
actions={
<UserTopToolbar
redirect={`${CR_POSTGRES_DB}/${record.spec.database}/show`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const CrEdit = () => {
crName={CR_MINIO_USERS}
crId={record.spec.database}
/>
<Edit actions={false}>
<Edit actions={false} mutationMode='pessimistic'>
<TopToolbar>
<ShowButton/>
<InspectButton/>
Expand Down

0 comments on commit 1b37d9e

Please sign in to comment.