SkyeYoung commented on code in PR #3008:
URL: https://github.com/apache/apisix-dashboard/pull/3008#discussion_r2068080851


##########
src/components/form-slice/FormPartRoute/index.tsx:
##########
@@ -0,0 +1,161 @@
+import { useFormContext } from 'react-hook-form';
+import { useTranslation } from 'react-i18next';
+import { FormItemNumberInput } from '@/components/form/NumberInput';
+import { FormItemSwitch } from '@/components/form/Switch';
+import { FormItemTagsInput } from '@/components/form/TagInput';
+import { FormItemTextarea } from '@/components/form/Textarea';
+import { FormItemTextInput } from '@/components/form/TextInput';
+import { NamePrefixProvider } from '@/utils/useNamePrefix';
+import { FormItemPlugins } from '../FormItemPlugins';
+import { FormPartBasic } from '../FormPartBasic';
+import { FormPartUpstream, FormSectionTimeout } from '../FormPartUpstream';
+import { FormSection } from '../FormSection';
+import { Divider, InputWrapper } from '@mantine/core';
+import type { RoutePostType } from './schema';
+import { FormItemSelect } from '@/components/form/Select';
+import { APISIX } from '@/types/schema/apisix';
+
+const FormPartBasicWithPriority = () => {
+  const { t } = useTranslation();
+  const { control } = useFormContext<RoutePostType>();
+  return (
+    <FormPartBasic>
+      <FormItemNumberInput
+        control={control}
+        name="priority"
+        label={t('form.route.priority')}
+      />
+      <FormItemSelect
+        control={control}
+        name="status"
+        label={t('form.route.status')}
+        data={APISIX.RouteStatus.options.map((v) => v.value.toString())}

Review Comment:
   After all, it's strictly aligned with the API now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to