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 2024/09/20 03:05:20 UTC

(incubator-devlake) branch feat-dora-config updated: fix: error default value in deployment

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

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


The following commit(s) were added to refs/heads/feat-dora-config by this push:
     new 8987f1902 fix: error default value in deployment
8987f1902 is described below

commit 8987f19027c95dfbbe86b517ab4350cf5548d250
Author: mintsweet <0x...@gmail.com>
AuthorDate: Fri Sep 20 15:05:08 2024 +1200

    fix: error default value in deployment
---
 config-ui/src/plugins/components/deployments/index.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/config-ui/src/plugins/components/deployments/index.tsx b/config-ui/src/plugins/components/deployments/index.tsx
index 4ed690cc4..ff7efc3d7 100644
--- a/config-ui/src/plugins/components/deployments/index.tsx
+++ b/config-ui/src/plugins/components/deployments/index.tsx
@@ -32,12 +32,14 @@ interface Props {
 }
 
 export const Deployments = ({ style, plugin, connectionId, transformation, setTransformation }: Props) => {
-  const [type, setType] = useState('regex');
+  const [type, setType] = useState('select');
 
   const { loading, data } = useRequest(() => API.scopeConfig.deployments(plugin, connectionId), [plugin, connectionId]);
 
   useEffect(() => {
-    if (transformation.envNamePattern) {
+    if (transformation.envNameList.length) {
+      setType('select');
+    } else {
       setType('regex');
     }
   }, [transformation]);