You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "coldgust (via GitHub)" <gi...@apache.org> on 2023/03/25 16:51:44 UTC

[GitHub] [incubator-devlake] coldgust opened a new pull request, #4777: feat(config-ui): support teambition connection config

coldgust opened a new pull request, #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777

   ### Summary
   Let config ui support teambition connection. Since there is no teambition logo, I use tapd logo instead temporarily.
   
   ### Does this close any open issues?
   Closes #4774
   
   ### Screenshots
   ![Snipaste_2023-03-26_00-28-44](https://user-images.githubusercontent.com/115207009/227730801-8c4f7076-5958-47fb-8f57-fe5984aed775.png)
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] coldgust commented on pull request #4777: feat(config-ui): support teambition connection config

Posted by "coldgust (via GitHub)" <gi...@apache.org>.
coldgust commented on PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#issuecomment-1486915674

   Hi, @JoshuaPoddoku I have joined slack. Thank you for the certificate.


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mintsweet commented on a diff in pull request #4777: feat(config-ui): support teambition connection config

Posted by "mintsweet (via GitHub)" <gi...@apache.org>.
mintsweet commented on code in PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#discussion_r1148749048


##########
config-ui/src/plugins/components/connection-form/operate/test.tsx:
##########
@@ -39,7 +39,8 @@ export const Test = ({ plugin, values, errors }: Props) => {
 
   const handleSubmit = () => {
     onSubmit(
-      pick(values, ['endpoint', 'token', 'username', 'password', 'app_id', 'secret_key', 'proxy', 'authMethod']),
+      pick(values, ['endpoint', 'token', 'username', 'password', 'app_id', 'secret_key', 'proxy', 'authMethod',

Review Comment:
   Can you remove the two fields `app_id` and `secret_key`



##########
config-ui/src/plugins/register/teambition/assets/icon.svg:
##########


Review Comment:
   @yumengwang03 Can you provide an icon?



##########
config-ui/src/plugins/register/teambition/connection-fields/tenant-id.tsx:
##########
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import React, { useEffect } from 'react';
+import { FormGroup, InputGroup } from '@blueprintjs/core';
+
+import * as S from './styled';
+
+interface Props {
+  label?: string;
+  subLabel?: string;
+  placeholder?: string;
+  name: string;
+  initialValue: string;
+  value: string;
+  error: string;
+  setValue: (value: string) => void;
+  setError: (error: string) => void;
+}
+
+export const ConnectionTenantId = ({
+                                     label,
+                                     subLabel,
+                                     placeholder,
+                                     initialValue,
+                                     value,
+                                     setValue,
+                                     setError,
+                                   }: Props) => {
+  useEffect(() => {
+    setValue(initialValue);
+  }, [initialValue]);
+
+  useEffect(() => {
+    setError(value ? '' : 'TenantId is required');
+  }, [value]);
+
+  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    setValue(e.target.value);
+  };
+
+  return (
+    <FormGroup
+      label={<S.Label>{label ?? 'TenantId'}</S.Label>}

Review Comment:
   `tenant-id.tsx`, only applies to this plugin, so there is no need to `lable` these fields.
   You can use it.
   
   ```
   <S.Label>TenantId<S.Label>
   ```



##########
config-ui/src/plugins/register/teambition/connection-fields/tenant-type.tsx:
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import React, { useEffect } from 'react';
+import { FormGroup, InputGroup } from '@blueprintjs/core';
+
+import * as S from './styled';
+
+interface Props {
+  label?: string;
+  subLabel?: string;
+  disabled?: boolean;
+  placeholder?: string;

Review Comment:
   These fields are also.



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] yumengwang03 commented on a diff in pull request #4777: feat(config-ui): support teambition connection config

Posted by "yumengwang03 (via GitHub)" <gi...@apache.org>.
yumengwang03 commented on code in PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#discussion_r1149108664


##########
config-ui/src/plugins/register/teambition/assets/icon.svg:
##########


Review Comment:
   Yes, will do.



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] yumengwang03 commented on pull request #4777: feat(config-ui): support teambition connection config

Posted by "yumengwang03 (via GitHub)" <gi...@apache.org>.
yumengwang03 commented on PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#issuecomment-1484934732

   ![Teamabition](https://user-images.githubusercontent.com/9535430/227922819-8918575e-9113-4c45-af3d-c130bf9f9c40.svg)
   @coldgust Here's the icon~


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] JoshuaPoddoku commented on pull request #4777: feat(config-ui): support teambition connection config

Posted by "JoshuaPoddoku (via GitHub)" <gi...@apache.org>.
JoshuaPoddoku commented on PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#issuecomment-1489748801

   Hi @coldgust Thanks for joining slack! I wanted to know your "full name" so we can process the certificate. I tried reaching out to you on slack. Please let us know. Thanks! 


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] likyh commented on pull request #4777: feat(config-ui): support teambition connection config

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh commented on PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#issuecomment-1484556891

   Wow, Full Stack Developer~


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] JoshuaPoddoku commented on pull request #4777: feat(config-ui): support teambition connection config

Posted by "JoshuaPoddoku (via GitHub)" <gi...@apache.org>.
JoshuaPoddoku commented on PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777#issuecomment-1485742363

   Thank you for your contribution. Please join our slack: https://join.slack.com/t/devlake-io/shared_invite/zt-18uayb6ut-cHOjiYcBwERQ8VVPZ9cQQw 
   and @coldgust, we want to issue you a certificate to honor your contribution.


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] likyh merged pull request #4777: feat(config-ui): support teambition connection config

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh merged PR #4777:
URL: https://github.com/apache/incubator-devlake/pull/4777


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org