Skip to content

Commit

Permalink
fix(common): pipeline switch branch bug (#2051) (#2066)
Browse files Browse the repository at this point in the history
Co-authored-by: hujiahao-hjh <82502479+hujiahao-hjh@users.noreply.github.com>
  • Loading branch information
erda-bot and hujiahao-hjh authored Nov 22, 2021
1 parent 521f74b commit 88fed11
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { useMount } from 'react-use';
import { get, isEmpty, find } from 'lodash';
import { WithAuth, usePerm } from 'user/common';
import appStore from 'application/stores/application';
import { useLoading } from 'core/stores/loading';
import commonStore from 'common/stores/common';

import { getBranchPath } from './config';
import i18n from 'i18n';
Expand Down Expand Up @@ -57,7 +59,7 @@ const PipelineDetail = (props: IProps) => {
const { clearExecuteRecords } = buildStore.reducers;
const [deployPerm, branchAuthObj] = usePerm((s) => [s.app.runtime, s.app.repo.branch]);
const [branchInfo, appBlockStatus] = appStore.useStore((s) => [s.branchInfo, s.detail?.blockStatus]);

const [loading] = useLoading(commonStore, ['getRenderPageLayout']);
const envBlocked = get(orgBlockoutConfig, envBlockKeyMap[env], false);

const [{ activeKey, runKey, canRunTest }, updater, update] = useUpdate({
Expand Down Expand Up @@ -172,7 +174,7 @@ const PipelineDetail = (props: IProps) => {
/>
</Tabs.TabPane>
) : null}
<Tabs.TabPane tab={i18n.t('execute detail')} key={'runDetail'}>
<Tabs.TabPane tab={i18n.t('execute detail')} key={'runDetail'} disabled={loading}>
<PipelineRunDetail key={runKey} deployAuth={deployAuthObj} isMobileInit={isMobileInit} />
</Tabs.TabPane>
</Tabs>
Expand Down

0 comments on commit 88fed11

Please sign in to comment.