You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2023/10/26 08:00:53 UTC

[incubator-devlake] branch fix-bugs created (now 0290bc9df)

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

mintsweet pushed a change to branch fix-bugs
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 0290bc9df fix(config-ui): disabled scope config save btn when has error

This branch includes the following new commits:

     new d294c56b2 fix(config-ui): adjust the copywriting for collect data
     new 13ee5577f fix(config-ui): the helptooltip error for bamboo transformation
     new 5afcb0d82 fix(config-ui): change icon for webhook view
     new f35ea7c52 feat(config-ui): support placeholder in data scope search
     new 0290bc9df fix(config-ui): disabled scope config save btn when has error

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-devlake] 03/05: fix(config-ui): change icon for webhook view

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5afcb0d82eded03d3cb93aba658292e16c3f0b0b
Author: mintsweet <0x...@gmail.com>
AuthorDate: Thu Oct 26 20:51:55 2023 +1300

    fix(config-ui): change icon for webhook view
---
 config-ui/src/plugins/register/webhook/connection.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config-ui/src/plugins/register/webhook/connection.tsx b/config-ui/src/plugins/register/webhook/connection.tsx
index 2a6f1a011..cdb8660e4 100644
--- a/config-ui/src/plugins/register/webhook/connection.tsx
+++ b/config-ui/src/plugins/register/webhook/connection.tsx
@@ -72,7 +72,7 @@ export const WebHookConnection = ({ filterIds, onCreateAfter, onDeleteAfter }: P
       align: 'center',
       render: (_, row) => (
         <S.Action>
-          <IconButton icon="array" tooltip="View" onClick={() => handleShowDialog('show', row)} />
+          <IconButton icon="eye-open" tooltip="View" onClick={() => handleShowDialog('show', row)} />
           <IconButton icon="annotation" tooltip="Edit" onClick={() => handleShowDialog('edit', row)} />
           <IconButton icon="trash" tooltip="Delete" onClick={() => handleShowDialog('delete', row)} />
         </S.Action>


[incubator-devlake] 05/05: fix(config-ui): disabled scope config save btn when has error

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0290bc9dfb83955eada543254b9f621a69718e72
Author: mintsweet <0x...@gmail.com>
AuthorDate: Thu Oct 26 21:00:42 2023 +1300

    fix(config-ui): disabled scope config save btn when has error
---
 config-ui/src/plugins/components/scope-config-form/index.tsx | 11 ++++++++++-
 config-ui/src/plugins/register/github/transformation.tsx     |  7 ++++++-
 config-ui/src/plugins/register/gitlab/transformation.tsx     |  7 ++++++-
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/config-ui/src/plugins/components/scope-config-form/index.tsx b/config-ui/src/plugins/components/scope-config-form/index.tsx
index a8aa0a028..757d3eac0 100644
--- a/config-ui/src/plugins/components/scope-config-form/index.tsx
+++ b/config-ui/src/plugins/components/scope-config-form/index.tsx
@@ -62,6 +62,7 @@ export const ScopeConfigForm = ({
   const [entities, setEntities] = useState<string[]>([]);
   const [transformation, setTransformation] = useState<any>({});
   const [hasRefDiff, setHasRefDiff] = useState(false);
+  const [hasError, setHasError] = useState(false);
   const [operating, setOperating] = useState(false);
 
   const config = useMemo(() => getPluginConfig(plugin), []);
@@ -187,6 +188,7 @@ export const ScopeConfigForm = ({
                 entities={entities}
                 transformation={transformation}
                 setTransformation={setTransformation}
+                setHasError={setHasError}
               />
             )}
 
@@ -204,6 +206,7 @@ export const ScopeConfigForm = ({
                 entities={entities}
                 transformation={transformation}
                 setTransformation={setTransformation}
+                setHasError={setHasError}
               />
             )}
 
@@ -253,7 +256,13 @@ export const ScopeConfigForm = ({
           </Card>
           <Buttons position="bottom" align="right">
             <Button outlined intent={Intent.PRIMARY} text="Prev" onClick={handlePrevStep} />
-            <Button loading={operating} intent={Intent.PRIMARY} text="Save" onClick={handleSubmit} />
+            <Button
+              loading={operating}
+              disabled={hasError}
+              intent={Intent.PRIMARY}
+              text="Save"
+              onClick={handleSubmit}
+            />
           </Buttons>
         </>
       )}
diff --git a/config-ui/src/plugins/register/github/transformation.tsx b/config-ui/src/plugins/register/github/transformation.tsx
index 93a184fd1..da0279c65 100644
--- a/config-ui/src/plugins/register/github/transformation.tsx
+++ b/config-ui/src/plugins/register/github/transformation.tsx
@@ -28,9 +28,10 @@ interface Props {
   entities: string[];
   transformation: any;
   setTransformation: React.Dispatch<React.SetStateAction<any>>;
+  setHasError: React.Dispatch<React.SetStateAction<boolean>>;
 }
 
-export const GitHubTransformation = ({ entities, transformation, setTransformation }: Props) => {
+export const GitHubTransformation = ({ entities, transformation, setTransformation, setHasError }: Props) => {
   const [useCustom, setUseCustom] = useState(false);
 
   useEffect(() => {
@@ -41,6 +42,10 @@ export const GitHubTransformation = ({ entities, transformation, setTransformati
     }
   }, [transformation]);
 
+  useEffect(() => {
+    setHasError(useCustom && !transformation.deploymentPattern);
+  }, [useCustom, transformation]);
+
   const handleChangeUseCustom = (e: React.FormEvent<HTMLInputElement>) => {
     const checked = (e.target as HTMLInputElement).checked;
 
diff --git a/config-ui/src/plugins/register/gitlab/transformation.tsx b/config-ui/src/plugins/register/gitlab/transformation.tsx
index e2505030e..217d1853d 100644
--- a/config-ui/src/plugins/register/gitlab/transformation.tsx
+++ b/config-ui/src/plugins/register/gitlab/transformation.tsx
@@ -28,9 +28,10 @@ interface Props {
   entities: string[];
   transformation: any;
   setTransformation: React.Dispatch<React.SetStateAction<any>>;
+  setHasError: React.Dispatch<React.SetStateAction<boolean>>;
 }
 
-export const GitLabTransformation = ({ entities, transformation, setTransformation }: Props) => {
+export const GitLabTransformation = ({ entities, transformation, setTransformation, setHasError }: Props) => {
   const [useCustom, setUseCustom] = useState(false);
 
   useEffect(() => {
@@ -41,6 +42,10 @@ export const GitLabTransformation = ({ entities, transformation, setTransformati
     }
   }, [transformation]);
 
+  useEffect(() => {
+    setHasError(useCustom && !transformation.deploymentPattern);
+  }, [useCustom, transformation]);
+
   const handleChangeUseCustom = (e: React.FormEvent<HTMLInputElement>) => {
     const checked = (e.target as HTMLInputElement).checked;
 


[incubator-devlake] 02/05: fix(config-ui): the helptooltip error for bamboo transformation

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 13ee5577f25ee0bd357c86ce9b6df8080697d847
Author: mintsweet <0x...@gmail.com>
AuthorDate: Thu Oct 26 20:51:36 2023 +1300

    fix(config-ui): the helptooltip error for bamboo transformation
---
 config-ui/src/plugins/register/bamboo/transformation.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config-ui/src/plugins/register/bamboo/transformation.tsx b/config-ui/src/plugins/register/bamboo/transformation.tsx
index 8bac35bf5..fc04d528e 100644
--- a/config-ui/src/plugins/register/bamboo/transformation.tsx
+++ b/config-ui/src/plugins/register/bamboo/transformation.tsx
@@ -110,7 +110,7 @@ export const BambooTransformation = ({ entities, transformation, setTransformati
               }
             />
             <span>.</span>
-            <HelpTooltip content="View your BitBucket Pipelines: https://support.atlassian.com/bitbucket-cloud/docs/view-your-pipeline/" />
+            <HelpTooltip content="View your Bamboo Builds: https://confluence.atlassian.com/bamboo/viewing-a-plan-s-build-information-289276861.html" />
           </div>
           <div className="sub-text">
             <span>If the name also matches</span>


[incubator-devlake] 04/05: feat(config-ui): support placeholder in data scope search

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f35ea7c52eb41cd82934d54899e92714de47b6b2
Author: mintsweet <0x...@gmail.com>
AuthorDate: Thu Oct 26 20:52:22 2023 +1300

    feat(config-ui): support placeholder in data scope search
---
 config-ui/src/plugins/components/data-scope-remote/search-remote.tsx | 1 +
 config-ui/src/plugins/register/bitbucket/config.tsx                  | 1 +
 config-ui/src/plugins/register/gitlab/config.tsx                     | 1 +
 config-ui/src/types/plugin.ts                                        | 1 +
 4 files changed, 4 insertions(+)

diff --git a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
index eb5777c5f..a543abafd 100644
--- a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
+++ b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
@@ -138,6 +138,7 @@ export const SearchRemote = ({ plugin, connectionId, config, disabledScope, sele
       <FormItem>
         <InputGroup
           leftIcon="search"
+          placeholder={config.searchPlaceholder}
           value={search.query}
           onChange={(e) => setSearch({ ...search, query: e.target.value })}
         />
diff --git a/config-ui/src/plugins/register/bitbucket/config.tsx b/config-ui/src/plugins/register/bitbucket/config.tsx
index 77131b890..31bf6b086 100644
--- a/config-ui/src/plugins/register/bitbucket/config.tsx
+++ b/config-ui/src/plugins/register/bitbucket/config.tsx
@@ -57,6 +57,7 @@ export const BitBucketConfig = {
     ],
   },
   dataScope: {
+    searchPlaceholder: 'Enter the keywords to search for repositories that you have read access',
     title: 'Repositories',
     millerColumn: {
       columnCount: 2,
diff --git a/config-ui/src/plugins/register/gitlab/config.tsx b/config-ui/src/plugins/register/gitlab/config.tsx
index d9ab98283..7a398b46a 100644
--- a/config-ui/src/plugins/register/gitlab/config.tsx
+++ b/config-ui/src/plugins/register/gitlab/config.tsx
@@ -64,6 +64,7 @@ export const GitLabConfig = {
     ],
   },
   dataScope: {
+    searchPlaceholder: 'Please enter at least 3 characters to search',
     title: 'Projects',
     millerColumn: {
       columnCount: 2.5,
diff --git a/config-ui/src/types/plugin.ts b/config-ui/src/types/plugin.ts
index e9153666e..141781e2f 100644
--- a/config-ui/src/types/plugin.ts
+++ b/config-ui/src/types/plugin.ts
@@ -29,6 +29,7 @@ export interface IPluginConfig {
   };
   dataScope: {
     localSearch?: boolean;
+    searchPlaceholder?: string;
     title?: string;
     millerColumn?: {
       columnCount?: number;


[incubator-devlake] 01/05: fix(config-ui): adjust the copywriting for collect data

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d294c56b2c9e8d9adee098c6f95c701fcdad4c89
Author: mintsweet <0x...@gmail.com>
AuthorDate: Thu Oct 26 20:51:05 2023 +1300

    fix(config-ui): adjust the copywriting for collect data
---
 config-ui/src/pages/blueprint/detail/status-panel.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config-ui/src/pages/blueprint/detail/status-panel.tsx b/config-ui/src/pages/blueprint/detail/status-panel.tsx
index 018a0de78..38c4a2456 100644
--- a/config-ui/src/pages/blueprint/detail/status-panel.tsx
+++ b/config-ui/src/pages/blueprint/detail/status-panel.tsx
@@ -143,13 +143,13 @@ export const StatusPanel = ({ from, blueprint, pipelineId, onRefresh }: Props) =
             disabled={!blueprint.enable}
             loading={operating}
             intent={Intent.PRIMARY}
-            text="Collect All Data"
+            text="Collect Data"
             onClick={() => handleRun({})}
           />
           <Popover
             content={
               <Menu>
-                <MenuItem text="Collect All Data in Full Sync Mode" onClick={() => setType('fullSync')} />
+                <MenuItem text="Collect All Data in Full Refresh Mode" onClick={() => setType('fullSync')} />
               </Menu>
             }
             placement="bottom"