Skip to content

Commit 7359dcc

Browse files
calycekrclaude
andcommitted
fix: improve form default values and remove unnecessary placeholder
- Set sensible defaults for upstream node: port=80, weight=1 - Remove placeholder from Service ID field Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 17bc56b commit 7359dcc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/components/form-slice/FormPartRoute/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ export const FormSectionService = () => {
181181
control={control}
182182
name="service_id"
183183
label={t('form.upstreams.serviceId')}
184-
placeholder="00000000000000000001"
185184
/>
186185
</FormSection>
187186
);

src/types/schema/apisix/upstreams.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ const UpstreamPassHost = z.union([
5858

5959
const UpstreamNode = z.object({
6060
host: z.string().min(1),
61-
port: z.number().int().gte(1).lte(65535),
62-
weight: z.number().int(),
61+
port: z.number().int().gte(1).lte(65535).default(80),
62+
weight: z.number().int().default(1),
6363
priority: z.number().int().optional(),
6464
});
6565

0 commit comments

Comments
 (0)