You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by li...@apache.org on 2023/05/17 02:48:49 UTC

[incubator-devlake] branch main updated: refactor(config-ui): remove the content about bp v100 upgrade (#5202)

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

likyh 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 93ffe7768 refactor(config-ui): remove the content about bp v100 upgrade (#5202)
93ffe7768 is described below

commit 93ffe7768e279e81d15fe7845bc3d534f0cbcb23
Author: 青湛 <0x...@gmail.com>
AuthorDate: Wed May 17 10:48:44 2023 +0800

    refactor(config-ui): remove the content about bp v100 upgrade (#5202)
    
    * chore(config-ui): remove console.log from plugins
    
    * refactor(config-ui): move error-boundary to component from error
    
    * refactor(config-ui): remove the content about bp v100
---
 .../error-boundary/index.tsx}                      |  38 ++++-
 .../{error => components/error-boundary}/styled.ts |   0
 config-ui/src/components/index.ts                  |   1 +
 config-ui/src/error/components/bp-upgrade/api.ts   |  45 ------
 .../src/error/components/bp-upgrade/index.tsx      |  48 ------
 .../error/components/bp-upgrade/use-bp-upgrade.ts  | 169 ---------------------
 config-ui/src/error/components/default/index.tsx   |  58 -------
 config-ui/src/error/components/index.ts            |  20 ---
 config-ui/src/error/index.ts                       |  21 ---
 config-ui/src/error/types.ts                       |  21 ---
 config-ui/src/error/utils.ts                       |  24 ---
 config-ui/src/main.tsx                             |   2 +-
 .../pages/blueprint/detail/blueprint-detail.tsx    |  12 +-
 config-ui/src/pages/blueprint/detail/styled.ts     |  17 ---
 config-ui/src/pages/blueprint/detail/use-detail.ts |   9 --
 .../register/jira/connection-fields/auth.tsx       |   2 -
 .../jira/transformation-fields/cross-domain.tsx    |   2 -
 17 files changed, 33 insertions(+), 456 deletions(-)

diff --git a/config-ui/src/error/error-boundary.tsx b/config-ui/src/components/error-boundary/index.tsx
similarity index 52%
rename from config-ui/src/error/error-boundary.tsx
rename to config-ui/src/components/error-boundary/index.tsx
index b6729da5b..5fb9bdd30 100644
--- a/config-ui/src/error/error-boundary.tsx
+++ b/config-ui/src/components/error-boundary/index.tsx
@@ -17,15 +17,16 @@
  */
 
 import React from 'react';
+import type { RouteComponentProps } from 'react-router';
+import { withRouter } from 'react-router-dom';
+import { Icon, ButtonGroup, Button, Intent, Colors } from '@blueprintjs/core';
 
-import { Logo } from '@/components';
-
-import { Error } from './types';
-import { Default, BPUpgrade } from './components';
+import { Logo } from '../logo';
+import { Card } from '../card';
 
 import * as S from './styled';
 
-type Props = {
+type Props = RouteComponentProps & {
   children: React.ReactNode;
 };
 
@@ -34,7 +35,7 @@ type State = {
   error?: any;
 };
 
-export class ErrorBoundary extends React.Component<Props, State> {
+class ErrorBoundary extends React.Component<Props, State> {
   constructor(props: Props) {
     super(props);
     this.state = { hasError: false };
@@ -56,6 +57,7 @@ export class ErrorBoundary extends React.Component<Props, State> {
 
   render() {
     const { hasError, error } = this.state;
+    const { history } = this.props;
 
     if (!hasError) {
       return this.props.children;
@@ -65,10 +67,30 @@ export class ErrorBoundary extends React.Component<Props, State> {
       <S.Wrapper>
         <Logo />
         <S.Inner>
-          {error === Error.BP_NEED_TO_UPGRADE && <BPUpgrade onResetError={this.handleResetError} />}
-          {!Object.keys(Error).includes(error) && <Default error={error} onResetError={this.handleResetError} />}
+          <Card>
+            <h2>
+              <Icon icon="error" color={Colors.RED5} size={20} />
+              <span>{error?.toString() || 'Unknown Error'}</span>
+            </h2>
+            <p>
+              Please try again, if the problem persists include the above error message when filing a bug report on{' '}
+              <strong>GitHub</strong>. You can also message us on <strong>Slack</strong> to engage with community
+              members for solutions to common issues.
+            </p>
+            <ButtonGroup>
+              <Button text="Continue" intent={Intent.PRIMARY} onClick={() => history.push('/')} />
+              <Button
+                text="Visit GitHub"
+                onClick={() =>
+                  window.open('https://github.com/apache/incubator-devlake', '_blank', 'noopener,noreferrer')
+                }
+              />
+            </ButtonGroup>
+          </Card>
         </S.Inner>
       </S.Wrapper>
     );
   }
 }
+
+export default withRouter(ErrorBoundary);
diff --git a/config-ui/src/error/styled.ts b/config-ui/src/components/error-boundary/styled.ts
similarity index 100%
rename from config-ui/src/error/styled.ts
rename to config-ui/src/components/error-boundary/styled.ts
diff --git a/config-ui/src/components/index.ts b/config-ui/src/components/index.ts
index c511defde..c5a8ae8e4 100644
--- a/config-ui/src/components/index.ts
+++ b/config-ui/src/components/index.ts
@@ -21,6 +21,7 @@ export * from './alert';
 export * from './card';
 export * from './dialog';
 export * from './divider';
+export { default as ErrorBoundary } from './error-boundary';
 export * from './inspector';
 export * from './loading';
 export * from './logo';
diff --git a/config-ui/src/error/components/bp-upgrade/api.ts b/config-ui/src/error/components/bp-upgrade/api.ts
deleted file mode 100644
index 9bd7dfb51..000000000
--- a/config-ui/src/error/components/bp-upgrade/api.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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 { request } from '@/utils';
-
-export const getBlueprint = (id: ID) => request(`/blueprints/${id}`);
-
-export const updateBlueprint = (id: ID, payload: any) =>
-  request(`/blueprints/${id}`, {
-    method: 'patch',
-    data: payload,
-  });
-
-export const createTransformation = (plugin: string, connectionId: ID, payload: any) =>
-  request(`/plugins/${plugin}/connections/${connectionId}/transformation_rules`, {
-    method: 'post',
-    data: payload,
-  });
-
-export const getGitHub = (prefix: string, owner: string, repo: string) => request(`${prefix}/repos/${owner}/${repo}`);
-
-export const getGitLab = (prefix: string, id: ID) => request(`${prefix}/projects/${id}`);
-
-export const getJira = (prefix: string, id: ID) => request(`${prefix}/agile/1.0/board/${id}`);
-
-export const updateDataScope = (plugin: string, connectionId: ID, repoId: ID, payload: any) =>
-  request(`/plugins/${plugin}/connections/${connectionId}/scopes/${repoId}`, {
-    method: 'patch',
-    data: payload,
-  });
diff --git a/config-ui/src/error/components/bp-upgrade/index.tsx b/config-ui/src/error/components/bp-upgrade/index.tsx
deleted file mode 100644
index 08c013e98..000000000
--- a/config-ui/src/error/components/bp-upgrade/index.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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 from 'react';
-import { Icon, ButtonGroup, Button, Colors, Intent } from '@blueprintjs/core';
-
-import { Card } from '@/components';
-
-import type { UseBPUpgradeProps } from './use-bp-upgrade';
-import { useBPUpgrade } from './use-bp-upgrade';
-
-interface Props extends Pick<UseBPUpgradeProps, 'onResetError'> {}
-
-export const BPUpgrade = ({ ...props }: Props) => {
-  const bpId = window.location.pathname.split('/').pop();
-  const { processing, onSubmit } = useBPUpgrade({ id: bpId, ...props });
-
-  return (
-    <Card>
-      <h2>
-        <Icon icon="outdated" color={Colors.ORANGE5} size={20} />
-        <span>Current Blueprint Need to Upgrade</span>
-      </h2>
-      <p>
-        If you have already started, please wait for database migrations to complete, do <strong>NOT</strong> close your
-        browser at this time.
-      </p>
-      <ButtonGroup>
-        <Button loading={processing} text="Proceed to Upgrade" intent={Intent.PRIMARY} onClick={onSubmit} />
-      </ButtonGroup>
-    </Card>
-  );
-};
diff --git a/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts b/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts
deleted file mode 100644
index 31365c5a5..000000000
--- a/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * 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 { useMemo, useState } from 'react';
-
-import { operator } from '@/utils';
-
-import * as API from './api';
-
-export interface UseBPUpgradeProps {
-  id?: ID;
-  onResetError: () => void;
-}
-
-export const useBPUpgrade = ({ id, onResetError }: UseBPUpgradeProps) => {
-  const [processing, setProcessing] = useState(false);
-
-  const getScopeId = (plugin: string, scope: any) => {
-    switch (plugin) {
-      case 'github':
-        return scope.githubId;
-      case 'gitlab':
-        return scope.gitlabId;
-      case 'jira':
-        return scope.boardId;
-    }
-  };
-
-  const getScopeDetail = async (plugin: string, connectionId: ID, options: any) => {
-    const prefix = `/plugins/${plugin}/connections/${connectionId}/proxy/rest`;
-
-    if (plugin === 'github') {
-      const res = await API.getGitHub(prefix, options.owner, options.repo);
-      return {
-        connectionId,
-        githubId: res.id,
-        name: `${res.owner.login}/${res.name}`,
-        ownerId: res.owner.id,
-        language: res.language,
-        description: res.description,
-        cloneUrl: res.clone_url,
-        HTMLUrl: res.html_url,
-      };
-    }
-
-    if (plugin === 'gitlab') {
-      const res = await API.getGitLab(prefix, options.projectId);
-      return {
-        connectionId,
-        gitlabId: res.id,
-        name: res.path_with_namespace,
-        pathWithNamespace: res.path_with_namespace,
-        creatorId: res.creator_id,
-        defaultBranch: res.default_branch,
-        description: res.description,
-        openIssuesCount: res.open_issues_count,
-        starCount: res.star_count,
-        visibility: res.visibility,
-        webUrl: res.web_url,
-        httpUrlToRepo: res.http_url_to_repo,
-      };
-    }
-
-    if (plugin === 'jira') {
-      const res = await API.getJira(prefix, options.boardId);
-      return {
-        connectionId,
-        boardId: res.id,
-        name: res.name,
-        self: res.self,
-        type: res.type,
-        projectId: res?.location?.projectId,
-      };
-    }
-  };
-
-  const upgradeScope = async (plugin: string, connectionId: ID, scope: any) => {
-    let transformationRule;
-
-    if (scope.transformation) {
-      // create transfromation template
-      transformationRule = await API.createTransformation(plugin, connectionId, {
-        ...scope.transformation,
-        name: `upgrade-${plugin}-${connectionId}-${new Date().getTime()}`,
-      });
-    }
-
-    // get data scope detail
-    const scopeDetail = await getScopeDetail(plugin, connectionId, scope.options);
-
-    // put data scope
-    await API.updateDataScope(plugin, connectionId, getScopeId(plugin, scopeDetail), {
-      ...scopeDetail,
-      transformationRuleId: transformationRule?.id,
-    });
-
-    return {
-      id: `${getScopeId(plugin, scopeDetail)}`,
-      entities: scope.entities,
-    };
-  };
-
-  const upgradeConnection = async (connection: any) => {
-    const { plugin, connectionId } = connection;
-
-    if (plugin == 'jenkins') {
-      return {
-        plugin,
-        connectionId,
-        scopes: [],
-      };
-    }
-    const scope = await Promise.all((connection.scope ?? []).map((sc: any) => upgradeScope(plugin, connectionId, sc)));
-
-    return {
-      plugin,
-      connectionId,
-      scopes: scope,
-    };
-  };
-
-  const handleUpgrade = async () => {
-    if (!id) return;
-
-    const bp = await API.getBlueprint(id);
-    const connections = await Promise.all(bp.settings.connections.map((cs: any) => upgradeConnection(cs)));
-
-    await API.updateBlueprint(id, {
-      ...bp,
-      settings: {
-        version: '2.0.0',
-        connections,
-      },
-    });
-  };
-
-  const handleSubmit = async () => {
-    const [success] = await operator(handleUpgrade, {
-      setOperating: setProcessing,
-    });
-
-    if (success) {
-      onResetError();
-    }
-  };
-
-  return useMemo(
-    () => ({
-      processing,
-      onSubmit: handleSubmit,
-    }),
-    [processing],
-  );
-};
diff --git a/config-ui/src/error/components/default/index.tsx b/config-ui/src/error/components/default/index.tsx
deleted file mode 100644
index afce790b9..000000000
--- a/config-ui/src/error/components/default/index.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 from 'react';
-import { useHistory } from 'react-router-dom';
-import { Icon, ButtonGroup, Button, Intent, Colors } from '@blueprintjs/core';
-
-import { Card } from '@/components';
-
-interface Props {
-  error: any;
-  onResetError: () => void;
-}
-
-export const Default = ({ error, onResetError }: Props) => {
-  const history = useHistory();
-
-  const handleContinue = () => {
-    onResetError();
-    history.push('/');
-  };
-
-  return (
-    <Card>
-      <h2>
-        <Icon icon="error" color={Colors.RED5} size={20} />
-        <span>{error?.toString() || 'Unknown Error'}</span>
-      </h2>
-      <p>
-        Please try again, if the problem persists include the above error message when filing a bug report on{' '}
-        <strong>GitHub</strong>. You can also message us on <strong>Slack</strong> to engage with community members for
-        solutions to common issues.
-      </p>
-      <ButtonGroup>
-        <Button text="Continue" intent={Intent.PRIMARY} onClick={handleContinue} />
-        <Button
-          text="Visit GitHub"
-          onClick={() => window.open('https://github.com/apache/incubator-devlake', '_blank', 'noopener,noreferrer')}
-        />
-      </ButtonGroup>
-    </Card>
-  );
-};
diff --git a/config-ui/src/error/components/index.ts b/config-ui/src/error/components/index.ts
deleted file mode 100644
index 9ca5fe3df..000000000
--- a/config-ui/src/error/components/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- *
- */
-
-export * from './default';
-export * from './bp-upgrade';
diff --git a/config-ui/src/error/index.ts b/config-ui/src/error/index.ts
deleted file mode 100644
index 51578604f..000000000
--- a/config-ui/src/error/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.
- *
- */
-
-export * from './types';
-export * from './utils';
-export * from './error-boundary';
diff --git a/config-ui/src/error/types.ts b/config-ui/src/error/types.ts
deleted file mode 100644
index 158aa7764..000000000
--- a/config-ui/src/error/types.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.
- *
- */
-
-export enum Error {
-  BP_NEED_TO_UPGRADE = 'BP_NEED_TO_UPGRADE',
-}
diff --git a/config-ui/src/error/utils.ts b/config-ui/src/error/utils.ts
deleted file mode 100644
index 8258fc984..000000000
--- a/config-ui/src/error/utils.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- *
- */
-
-export const transformError = (error: any) => {
-  switch (error?.response?.status) {
-    default:
-      return error;
-  }
-};
diff --git a/config-ui/src/main.tsx b/config-ui/src/main.tsx
index e0a5ecf5c..96e41f49b 100644
--- a/config-ui/src/main.tsx
+++ b/config-ui/src/main.tsx
@@ -19,7 +19,7 @@
 import ReactDOM from 'react-dom';
 import { BrowserRouter } from 'react-router-dom';
 
-import { ErrorBoundary } from '@/error';
+import { ErrorBoundary } from '@/components';
 
 import App from './App';
 
diff --git a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
index e7e3381ff..75d06b626 100644
--- a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
+++ b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
@@ -16,7 +16,7 @@
  *
  */
 
-import React, { useState, useMemo } from 'react';
+import { useState, useMemo } from 'react';
 import type { TabId } from '@blueprintjs/core';
 import { Tabs, Tab } from '@blueprintjs/core';
 
@@ -53,11 +53,6 @@ export const BlueprintDetail = ({ from = FromEnum.project, pname, id }: Props) =
     id,
   });
 
-  const showJenkinsTips = useMemo(() => {
-    const jenkins = blueprint && blueprint.settings?.connections.find((cs) => cs.plugin === 'jenkins');
-    return jenkins && !jenkins.scopes.length;
-  }, [blueprint]);
-
   if (loading || !blueprint) {
     return <PageLoading />;
   }
@@ -76,11 +71,6 @@ export const BlueprintDetail = ({ from = FromEnum.project, pname, id }: Props) =
           panel={<Configuration paths={paths} blueprint={blueprint} operating={operating} onUpdate={onUpdate} />}
         />
       </Tabs>
-      {showJenkinsTips && (
-        <S.JenkinsTips>
-          <p>Please add the "Jenkins jobs" to collect before this Blueprint can run again.</p>
-        </S.JenkinsTips>
-      )}
     </S.Wrapper>
   );
 };
diff --git a/config-ui/src/pages/blueprint/detail/styled.ts b/config-ui/src/pages/blueprint/detail/styled.ts
index b1a6d8453..28e67fef9 100644
--- a/config-ui/src/pages/blueprint/detail/styled.ts
+++ b/config-ui/src/pages/blueprint/detail/styled.ts
@@ -108,20 +108,3 @@ export const StatusPanel = styled.div`
     margin-top: 32px;
   }
 `;
-
-export const JenkinsTips = styled.div`
-  position: fixed;
-  right: 0;
-  bottom: 0;
-  left: 200px;
-  background-color: #3c5088;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  height: 36px;
-
-  p {
-    margin: 0;
-    color: #fff;
-  }
-`;
diff --git a/config-ui/src/pages/blueprint/detail/use-detail.ts b/config-ui/src/pages/blueprint/detail/use-detail.ts
index 8c7987eca..7837c02ec 100644
--- a/config-ui/src/pages/blueprint/detail/use-detail.ts
+++ b/config-ui/src/pages/blueprint/detail/use-detail.ts
@@ -18,7 +18,6 @@
 
 import { useState, useEffect, useMemo } from 'react';
 
-import { Error } from '@/error';
 import { operator } from '@/utils';
 
 import type { BlueprintType } from '@/pages';
@@ -33,20 +32,12 @@ export const useDetail = ({ id }: UseDetailProps) => {
   const [operating, setOperating] = useState(false);
   const [blueprint, setBlueprint] = useState<BlueprintType>();
   const [pipelineId, setPipelineId] = useState<ID>();
-  const [, setError] = useState();
 
   const getBlueprint = async () => {
     setLoading(true);
     try {
       const [bpRes, plRes] = await Promise.all([API.getBlueprint(id), API.getBlueprintPipelines(id)]);
 
-      // need to upgrade 2.0.0
-      if (bpRes.settings?.version === '1.0.0') {
-        setError(() => {
-          throw Error.BP_NEED_TO_UPGRADE;
-        });
-      }
-
       setBlueprint(bpRes);
       setPipelineId(plRes.pipelines?.[0]?.id);
     } finally {
diff --git a/config-ui/src/plugins/register/jira/connection-fields/auth.tsx b/config-ui/src/plugins/register/jira/connection-fields/auth.tsx
index 76ec2417b..b82f9aa21 100644
--- a/config-ui/src/plugins/register/jira/connection-fields/auth.tsx
+++ b/config-ui/src/plugins/register/jira/connection-fields/auth.tsx
@@ -109,8 +109,6 @@ export const Auth = ({ initialValues, values, errors, setValues, setErrors }: Pr
     });
   };
 
-  console.log(errors);
-
   return (
     <>
       <FormGroup label={<S.Label>Jira Version</S.Label>} labelInfo={<S.LabelInfo>*</S.LabelInfo>}>
diff --git a/config-ui/src/plugins/register/jira/transformation-fields/cross-domain.tsx b/config-ui/src/plugins/register/jira/transformation-fields/cross-domain.tsx
index bb6cdaf27..f27065ab8 100644
--- a/config-ui/src/plugins/register/jira/transformation-fields/cross-domain.tsx
+++ b/config-ui/src/plugins/register/jira/transformation-fields/cross-domain.tsx
@@ -34,8 +34,6 @@ export const CrossDomain = ({ transformation, setTransformation }: Props) => {
   const [repoTips, setRepoTips] = useState(false);
   const [repoLinks, setRepoLinks] = useState([]);
 
-  // console.log(transformation);
-
   useEffect(() => {
     if (transformation.remotelinkCommitShaPattern) {
       setRadio('commitSha');