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

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 8cac2b60 fix(config-ui): rename 'webhook' to 'incoming webhook' (#3276)
8cac2b60 is described below

commit 8cac2b60cd174f703a57a55a5c20ac274afb27bb
Author: 青湛 <[email protected]>
AuthorDate: Fri Sep 30 10:04:38 2022 +0800

    fix(config-ui): rename 'webhook' to 'incoming webhook' (#3276)
---
 config-ui/src/App.js                                       |  6 +++---
 config-ui/src/components/Sidebar/MenuConfiguration.jsx     |  6 +++---
 .../integrations/{webhook.svg => incoming-webhook.svg}     |  0
 config-ui/src/pages/configure/integration/index.jsx        |  8 +++++---
 .../{webhook => incoming-webhook}/add-modal.jsx            | 10 +++++-----
 .../{webhook => incoming-webhook}/delete-modal.jsx         |  8 ++++++--
 .../connections/{webhook => incoming-webhook}/index.jsx    | 14 +++++++-------
 .../connections/{webhook => incoming-webhook}/styled.js    |  0
 .../{webhook => incoming-webhook}/view-or-edit-modal.jsx   | 10 +++++-----
 9 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/config-ui/src/App.js b/config-ui/src/App.js
index c745e5e7..d837bf0a 100644
--- a/config-ui/src/App.js
+++ b/config-ui/src/App.js
@@ -42,7 +42,7 @@ import CreateBlueprint from 
'@/pages/blueprints/create-blueprint'
 import BlueprintDetail from '@/pages/blueprints/blueprint-detail'
 import BlueprintSettings from '@/pages/blueprints/blueprint-settings'
 import Connections from '@/pages/connections/index'
-import { Webhook as WebhookConnection } from '@/pages/connections/webhook'
+import { IncomingWebhook as IncomingWebhookConnection } from 
'@/pages/connections/incoming-webhook'
 import MigrationAlertDialog from '@/components/MigrationAlertDialog'
 
 function App(props) {
@@ -107,8 +107,8 @@ function App(props) {
       <Route exact path='/connections'>
         <Connections />
       </Route>
-      <Route exact path='/connections/webhook'>
-        <WebhookConnection />
+      <Route exact path='/connections/incoming-webhook'>
+        <IncomingWebhookConnection />
       </Route>
       <Route exact path='/offline'>
         <Offline />
diff --git a/config-ui/src/components/Sidebar/MenuConfiguration.jsx 
b/config-ui/src/components/Sidebar/MenuConfiguration.jsx
index cd3df331..7b3528a4 100644
--- a/config-ui/src/components/Sidebar/MenuConfiguration.jsx
+++ b/config-ui/src/components/Sidebar/MenuConfiguration.jsx
@@ -82,10 +82,10 @@ const MenuConfiguration = (activeRoute) => {
         },
         {
           id: 5,
-          label: 'Webhook',
-          route: '/connections/webhook',
+          label: 'Incoming Webhook',
+          route: '/connections/incoming-webhook',
           active:
-            activeRoute.url.endsWith('/connections/webhook') ||
+            activeRoute.url.endsWith('/connections/incoming-webhook') ||
             activeRoute.url.endsWith('/webhook'),
           icon: 'layers',
           classNames: []
diff --git a/config-ui/src/images/integrations/webhook.svg 
b/config-ui/src/images/integrations/incoming-webhook.svg
similarity index 100%
rename from config-ui/src/images/integrations/webhook.svg
rename to config-ui/src/images/integrations/incoming-webhook.svg
diff --git a/config-ui/src/pages/configure/integration/index.jsx 
b/config-ui/src/pages/configure/integration/index.jsx
index 584f1f8c..80ee4d96 100644
--- a/config-ui/src/pages/configure/integration/index.jsx
+++ b/config-ui/src/pages/configure/integration/index.jsx
@@ -22,7 +22,7 @@ import Sidebar from '@/components/Sidebar'
 import AppCrumbs from '@/components/Breadcrumbs'
 import Content from '@/components/Content'
 import { integrationsData } from '@/data/integrations'
-import { ReactComponent as WebHookProviderIcon } from 
'@/images/integrations/webhook.svg'
+import { ReactComponent as WebHookProviderIcon } from 
'@/images/integrations/incoming-webhook.svg'
 
 import '@/styles/integration.scss'
 
@@ -105,7 +105,7 @@ export default function Integration() {
               <div
                 className='iProvider'
                 style={{ width: 130 }}
-                onClick={() => history.push('/connections/webhook')}
+                onClick={() => history.push('/connections/incoming-webhook')}
               >
                 <div className='providerIcon'>
                   <WebHookProviderIcon
@@ -114,7 +114,9 @@ export default function Integration() {
                     height='40'
                   />
                 </div>
-                <div className='providerName'>Issue/Deployment Webhook</div>
+                <div className='providerName'>
+                  Issue/Deployment Incoming Webhook
+                </div>
               </div>
             </div>
           </main>
diff --git a/config-ui/src/pages/connections/webhook/add-modal.jsx 
b/config-ui/src/pages/connections/incoming-webhook/add-modal.jsx
similarity index 95%
rename from config-ui/src/pages/connections/webhook/add-modal.jsx
rename to config-ui/src/pages/connections/incoming-webhook/add-modal.jsx
index 0edaf23f..a835824d 100644
--- a/config-ui/src/pages/connections/webhook/add-modal.jsx
+++ b/config-ui/src/pages/connections/incoming-webhook/add-modal.jsx
@@ -62,7 +62,7 @@ export const AddModal = ({ onSubmit, onCancel }) => {
   return (
     <Dialog
       isOpen={true}
-      title='Add a New Webhook'
+      title='Add a New Incoming Webhook'
       style={{ width: 640 }}
       onClose={onCancel}
     >
@@ -70,14 +70,14 @@ export const AddModal = ({ onSubmit, onCancel }) => {
         {step === 1 && (
           <>
             <div className='form'>
-              <h2>Webhook Name *</h2>
+              <h2>Incoming Webhook Name *</h2>
               <p>
-                Give your Webhook a unique name to help you identify it in the
-                future.
+                Give your Incoming Webhook a unique name to help you identify 
it
+                in the future.
               </p>
               <input
                 type='text'
-                placeholder='Your Webhook Name'
+                placeholder='Your Incoming Webhook Name'
                 className={error ? 'has-error' : ''}
                 value={name || ''}
                 onChange={handleInputChange}
diff --git a/config-ui/src/pages/connections/webhook/delete-modal.jsx 
b/config-ui/src/pages/connections/incoming-webhook/delete-modal.jsx
similarity index 88%
rename from config-ui/src/pages/connections/webhook/delete-modal.jsx
rename to config-ui/src/pages/connections/incoming-webhook/delete-modal.jsx
index b713334c..a4e97d78 100644
--- a/config-ui/src/pages/connections/webhook/delete-modal.jsx
+++ b/config-ui/src/pages/connections/incoming-webhook/delete-modal.jsx
@@ -28,10 +28,14 @@ export const DeleteModal = ({ record, onSubmit, onCancel }) 
=> {
   }
 
   return (
-    <Dialog isOpen={true} title='Delete this Webhook?' onClose={onCancel}>
+    <Dialog
+      isOpen={true}
+      title='Delete this Incoming Webhook?'
+      onClose={onCancel}
+    >
       <S.FormWrapper>
         <div className='message'>
-          <p>This Webhook cannot be recovered once it’s deleted.</p>
+          <p>This Incoming Webhook cannot be recovered once it’s deleted.</p>
         </div>
         <div className='btns'>
           <Button onClick={onCancel}>Cancel</Button>
diff --git a/config-ui/src/pages/connections/webhook/index.jsx 
b/config-ui/src/pages/connections/incoming-webhook/index.jsx
similarity index 94%
rename from config-ui/src/pages/connections/webhook/index.jsx
rename to config-ui/src/pages/connections/incoming-webhook/index.jsx
index ecb5f303..bbbe59c9 100644
--- a/config-ui/src/pages/connections/webhook/index.jsx
+++ b/config-ui/src/pages/connections/incoming-webhook/index.jsx
@@ -25,7 +25,7 @@ import Sidebar from '@/components/Sidebar'
 import Content from '@/components/Content'
 import AppCrumbs from '@/components/Breadcrumbs'
 import { useWebhookManager } from '@/hooks/useWebhookManager'
-import { ReactComponent as WebHookProviderIcon } from 
'@/images/integrations/webhook.svg'
+import { ReactComponent as WebHookProviderIcon } from 
'@/images/integrations/incoming-webhook.svg'
 import { ReactComponent as EditIcon } from '@/images/icons/setting-con.svg'
 import { ReactComponent as DeleteIcon } from '@/images/icons/delete.svg'
 
@@ -36,7 +36,7 @@ import * as S from './styled'
 
 const postUrlPrefix = `${window.location.origin}/api`
 
-export const Webhook = () => {
+export const IncomingWebhook = () => {
   // defined the form modal is add | edit | delete
   const [modalType, setModalType] = useState()
   // defined the edit or delete record
@@ -77,9 +77,9 @@ export const Webhook = () => {
               // use /connections replace here
               { href: '/integrations', icon: false, text: 'Integrations' },
               {
-                href: '/connections/webhook',
+                href: '/connections/incoming-webhook',
                 icon: false,
-                text: 'Webhook',
+                text: 'Incoming Webhook',
                 current: true
               }
             ]}
@@ -99,7 +99,7 @@ export const Webhook = () => {
                   width='30'
                   height='30'
                 />
-                <h1 style={{ margin: '0 0 0 8px' }}>Webhook</h1>
+                <h1 style={{ margin: '0 0 0 8px' }}>Incoming Webhook</h1>
               </div>
               <Link style={{ color: '#777777' }} to='/integrations'>
                 <Icon icon='undo' size={16} /> Go Back
@@ -115,7 +115,7 @@ export const Webhook = () => {
               <span>
                 <Button
                   intent='primary'
-                  text='Add Webhook'
+                  text='Add Incoming Webhook'
                   loading={operating}
                   onClick={() => handleShowModal('add')}
                 />
@@ -123,7 +123,7 @@ export const Webhook = () => {
               <S.Wrapper>
                 <S.Grid className='title'>
                   <li>ID</li>
-                  <li>Webhook Name</li>
+                  <li>Incoming Webhook Name</li>
                   <li />
                 </S.Grid>
                 {loading ? (
diff --git a/config-ui/src/pages/connections/webhook/styled.js 
b/config-ui/src/pages/connections/incoming-webhook/styled.js
similarity index 100%
rename from config-ui/src/pages/connections/webhook/styled.js
rename to config-ui/src/pages/connections/incoming-webhook/styled.js
diff --git a/config-ui/src/pages/connections/webhook/view-or-edit-modal.jsx 
b/config-ui/src/pages/connections/incoming-webhook/view-or-edit-modal.jsx
similarity index 94%
rename from config-ui/src/pages/connections/webhook/view-or-edit-modal.jsx
rename to 
config-ui/src/pages/connections/incoming-webhook/view-or-edit-modal.jsx
index f8033090..8f608189 100644
--- a/config-ui/src/pages/connections/webhook/view-or-edit-modal.jsx
+++ b/config-ui/src/pages/connections/incoming-webhook/view-or-edit-modal.jsx
@@ -59,20 +59,20 @@ export const ViewOrEditModal = ({ record, onSubmit, 
onCancel }) => {
   return (
     <Dialog
       isOpen={true}
-      title='View or Edit Webhook'
+      title='View or Edit Incoming Webhook'
       style={{ width: 640 }}
       onClose={handleCancel}
     >
       <S.FormWrapper>
         <div className='form'>
-          <h2>Webhook Name *</h2>
+          <h2>Incoming Webhook Name *</h2>
           <p>
-            Give your Webhook a unique name to help you identify it in the
-            future.
+            Give your Incoming Webhook a unique name to help you identify it in
+            the future.
           </p>
           <input
             type='text'
-            placeholder='Your Webhook Name'
+            placeholder='Your Incoming Webhook Name'
             className={error ? 'has-error' : ''}
             value={name || ''}
             onChange={handleInputChange}

Reply via email to