You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by gu...@apache.org on 2022/08/22 09:57:44 UTC

[apisix-dashboard] branch master updated: chore: fix function name typo (#2599)

This is an automated email from the ASF dual-hosted git repository.

guoqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new a15fe353 chore: fix function name typo (#2599)
a15fe353 is described below

commit a15fe353e5018cd5f9c8b3fbe31e5795d92eb8b1
Author: 房森 <72...@users.noreply.github.com>
AuthorDate: Mon Aug 22 17:57:38 2022 +0800

    chore: fix function name typo (#2599)
---
 web/src/components/LabelsfDrawer/LabelsDrawer.tsx | 4 ++--
 web/src/helpers.tsx                               | 2 +-
 web/src/pages/PluginTemplate/Create.tsx           | 4 ++--
 web/src/pages/Route/transform.ts                  | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/web/src/components/LabelsfDrawer/LabelsDrawer.tsx b/web/src/components/LabelsfDrawer/LabelsDrawer.tsx
index 467a5977..7562e5a4 100644
--- a/web/src/components/LabelsfDrawer/LabelsDrawer.tsx
+++ b/web/src/components/LabelsfDrawer/LabelsDrawer.tsx
@@ -19,7 +19,7 @@ import { AutoComplete, Button, Col, Drawer, Form, notification, Row } from 'antd
 import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
 import { useIntl } from 'umi';
 
-import { transformLableValueToKeyValue } from '../../helpers';
+import { transformLabelValueToKeyValue } from '../../helpers';
 
 type Props = {
   title?: string;
@@ -122,7 +122,7 @@ const LabelsDrawer: React.FC<Props> = ({
   onClose,
   onChange = () => {},
 }) => {
-  const transformLabel = transformLableValueToKeyValue(dataSource);
+  const transformLabel = transformLabelValueToKeyValue(dataSource);
 
   const { formatMessage } = useIntl();
   const [form] = Form.useForm();
diff --git a/web/src/helpers.tsx b/web/src/helpers.tsx
index 3cfc8e8c..19978a70 100644
--- a/web/src/helpers.tsx
+++ b/web/src/helpers.tsx
@@ -176,7 +176,7 @@ export const yaml2json = (
   }
 };
 
-export const transformLableValueToKeyValue = (data: string[]) => {
+export const transformLabelValueToKeyValue = (data: string[]) => {
   return (data || []).map((item) => {
     const index = item.indexOf(':');
     const labelKey = item.substring(0, index);
diff --git a/web/src/pages/PluginTemplate/Create.tsx b/web/src/pages/PluginTemplate/Create.tsx
index 1d15e210..218f85c4 100644
--- a/web/src/pages/PluginTemplate/Create.tsx
+++ b/web/src/pages/PluginTemplate/Create.tsx
@@ -21,7 +21,7 @@ import { history, useIntl } from 'umi';
 
 import ActionBar from '@/components/ActionBar';
 import PluginPage from '@/components/Plugin';
-import { transformLableValueToKeyValue } from '@/helpers';
+import { transformLabelValueToKeyValue } from '@/helpers';
 
 import Step1 from './components/Step1';
 import Preview from './components/Preview';
@@ -51,7 +51,7 @@ const Page: React.FC = (props) => {
   const onSubmit = () => {
     const { desc, custom_normal_labels } = form1.getFieldsValue();
     const labels: Record<string, string> = {};
-    transformLableValueToKeyValue(custom_normal_labels || []).forEach(
+    transformLabelValueToKeyValue(custom_normal_labels || []).forEach(
       ({ labelKey, labelValue }) => {
         labels[labelKey] = labelValue;
       },
diff --git a/web/src/pages/Route/transform.ts b/web/src/pages/Route/transform.ts
index 9fa41bed..4261f637 100644
--- a/web/src/pages/Route/transform.ts
+++ b/web/src/pages/Route/transform.ts
@@ -16,7 +16,7 @@
  */
 import { omit, pick, cloneDeep, isEmpty, unset } from 'lodash';
 
-import { transformLableValueToKeyValue } from '@/helpers';
+import { transformLabelValueToKeyValue } from '@/helpers';
 import { SCHEME_REWRITE, URI_REWRITE_TYPE, HOST_REWRITE_TYPE } from '@/pages/Route/constants';
 import { convertToFormData } from '@/components/Upstream/service';
 
@@ -141,7 +141,7 @@ export const transformStepData = ({
   }
 
   const labels: Record<string, string> = {};
-  transformLableValueToKeyValue(custom_normal_labels).forEach(({ labelKey, labelValue }) => {
+  transformLabelValueToKeyValue(custom_normal_labels).forEach(({ labelKey, labelValue }) => {
     labels[labelKey] = labelValue;
   });