You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/11/21 09:29:01 UTC

[GitHub] [incubator-devlake] mintsweet opened a new pull request, #3770: feat(config-ui): encapsulate base layout component

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

   ### Summary
   1. encapsulate **base layout** component.
   
   ### Related Issues
   
   
   ### Screenshots
   
   
   ### Other Information
   
   


-- 
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 #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
likyh merged PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770


-- 
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 a diff in pull request #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770#discussion_r1029387703


##########
config-ui/src/App.js:
##########
@@ -57,66 +63,104 @@ function App(props) {
 
   return (
     <Router>
-      <Route exact path='/'>
-        <ErrorBoundary>
-          <Integration />
-        </ErrorBoundary>
-      </Route>
-      <Route path='/integrations/:providerId'>
-        <ErrorBoundary>
-          <ManageIntegration />
-        </ErrorBoundary>
-      </Route>
-      <Route path='/connections/add/:providerId'>
-        <ErrorBoundary>
-          <AddConnection />
-        </ErrorBoundary>
-      </Route>
-      <Route path='/connections/configure/:providerId/:connectionId'>
-        <ErrorBoundary>
-          <ConfigureConnection />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/integrations'>
-        <ErrorBoundary>
-          <Integration />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints/create'>
-        <ErrorBoundary>
-          <CreateBlueprint />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints/detail/:bId'>
-        <ErrorBoundary>
-          <BlueprintDetail />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints/settings/:bId'>
-        <ErrorBoundary>
-          <BlueprintSettings />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints'>
-        <ErrorBoundary>
-          <Blueprints />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/connections/incoming-webhook'>
-        <IncomingWebhookConnection />
-      </Route>
-      <Route exact path='/offline'>
-        <Offline />
-      </Route>
-      <MigrationAlertDialog
-        isOpen={migrationAlertOpened}
-        onClose={handleMigrationDialogClose}
-        onCancel={handleCancelMigration}
-        onConfirm={handleConfirmMigration}
-        isMigrating={isProcessing}
-        wasSuccessful={wasMigrationSuccessful}
-        hasFailed={hasMigrationFailed}
-      />
+      <Switch>
+        <Route exact path='/offline' component={() => <Offline />} />
+
+        <Route>
+          <BaseLayout>
+            <Switch>
+              <Route
+                path='/'
+                exact
+                component={() => <Redirect to='/integrations' />}

Review Comment:
   Is it the same that writing in component and children?



-- 
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 #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
mintsweet commented on code in PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770#discussion_r1029969524


##########
config-ui/src/registry/index.ts:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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 { default as AE } from './plugins/ae.json'
+import { default as Azure } from './plugins/azure.json'
+import { default as BitBucket } from './plugins/bitbucket.json'
+import { default as DBT } from './plugins/dbt.json'
+import { default as DORA } from './plugins/dora.json'
+import { default as Feishu } from './plugins/feishu.json'
+import { default as Gitee } from './plugins/gitee.json'
+import { default as GitExtractor } from './plugins/gitextractor.json'
+import { default as GitHub } from './plugins/github.json'
+import { default as GitLab } from './plugins/gitlab.json'
+import { default as Jenkins } from './plugins/jenkins.json'
+import { default as JIRA } from './plugins/jira.json'
+import { default as Refdiff } from './plugins/refdiff.json'
+import { default as Starrocks } from './plugins/starrocks.json'
+import { default as TAPD } from './plugins/tapd.json'

Review Comment:
   hhhh, It's the same.
   
   My original plan was to use `export { default as xx } from 'xx',` but later I found it was still inconvenient, so I changed it directly to `import`.
   
   Updated.



-- 
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 #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
likyh commented on PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770#issuecomment-1323754478

   It becomes thinner, right?
   ![image](https://user-images.githubusercontent.com/3294100/203337767-f32049bc-de1a-42b9-849c-6a29d40dea1a.png)
   


-- 
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 #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
mintsweet commented on code in PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770#discussion_r1029967994


##########
config-ui/src/App.js:
##########
@@ -57,66 +63,104 @@ function App(props) {
 
   return (
     <Router>
-      <Route exact path='/'>
-        <ErrorBoundary>
-          <Integration />
-        </ErrorBoundary>
-      </Route>
-      <Route path='/integrations/:providerId'>
-        <ErrorBoundary>
-          <ManageIntegration />
-        </ErrorBoundary>
-      </Route>
-      <Route path='/connections/add/:providerId'>
-        <ErrorBoundary>
-          <AddConnection />
-        </ErrorBoundary>
-      </Route>
-      <Route path='/connections/configure/:providerId/:connectionId'>
-        <ErrorBoundary>
-          <ConfigureConnection />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/integrations'>
-        <ErrorBoundary>
-          <Integration />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints/create'>
-        <ErrorBoundary>
-          <CreateBlueprint />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints/detail/:bId'>
-        <ErrorBoundary>
-          <BlueprintDetail />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints/settings/:bId'>
-        <ErrorBoundary>
-          <BlueprintSettings />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/blueprints'>
-        <ErrorBoundary>
-          <Blueprints />
-        </ErrorBoundary>
-      </Route>
-      <Route exact path='/connections/incoming-webhook'>
-        <IncomingWebhookConnection />
-      </Route>
-      <Route exact path='/offline'>
-        <Offline />
-      </Route>
-      <MigrationAlertDialog
-        isOpen={migrationAlertOpened}
-        onClose={handleMigrationDialogClose}
-        onCancel={handleCancelMigration}
-        onConfirm={handleConfirmMigration}
-        isMigrating={isProcessing}
-        wasSuccessful={wasMigrationSuccessful}
-        hasFailed={hasMigrationFailed}
-      />
+      <Switch>
+        <Route exact path='/offline' component={() => <Offline />} />
+
+        <Route>
+          <BaseLayout>
+            <Switch>
+              <Route
+                path='/'
+                exact
+                component={() => <Redirect to='/integrations' />}

Review Comment:
   This way of writing is the same, but what I want is `component={<XXX />}`
   
   However, there is a problem with the export of the current page. It can only be compatible with the writing method and will be improved in the future.



-- 
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 pull request #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
mintsweet commented on PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770#issuecomment-1324460532

   > It becomes thinner, right? ![image](https://user-images.githubusercontent.com/3294100/203337767-f32049bc-de1a-42b9-849c-6a29d40dea1a.png)
   
   Yes, unify the display range of the whole.


-- 
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 a diff in pull request #3770: feat(config-ui): encapsulate base layout component

Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #3770:
URL: https://github.com/apache/incubator-devlake/pull/3770#discussion_r1029385116


##########
config-ui/src/registry/index.ts:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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 { default as AE } from './plugins/ae.json'
+import { default as Azure } from './plugins/azure.json'
+import { default as BitBucket } from './plugins/bitbucket.json'
+import { default as DBT } from './plugins/dbt.json'
+import { default as DORA } from './plugins/dora.json'
+import { default as Feishu } from './plugins/feishu.json'
+import { default as Gitee } from './plugins/gitee.json'
+import { default as GitExtractor } from './plugins/gitextractor.json'
+import { default as GitHub } from './plugins/github.json'
+import { default as GitLab } from './plugins/gitlab.json'
+import { default as Jenkins } from './plugins/jenkins.json'
+import { default as JIRA } from './plugins/jira.json'
+import { default as Refdiff } from './plugins/refdiff.json'
+import { default as Starrocks } from './plugins/starrocks.json'
+import { default as TAPD } from './plugins/tapd.json'

Review Comment:
   It's same to `import TAPD from './plugins/tapd.json'` ?



-- 
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