Skip to content

Commit

Permalink
1. 集群发布失败,发布进度条在页面停留
Browse files Browse the repository at this point in the history
2. 编辑应用时,默认list出50条Git分支
  • Loading branch information
iamyeka committed Nov 25, 2021
1 parent 76bd96c commit c241c1c
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/components/PageWithBreadcrumb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default (props: any) => {
if (alert.message) {
clearAlert()
}
}, 4000);
}, 3000);

return () => timer && clearTimeout(timer);
});
Expand Down
9 changes: 8 additions & 1 deletion src/pages/applications/NewOrEdit/Basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import styles from '../index.less';
import {useIntl} from "@@/plugin-locale/localeExports";
import {listBranch} from '@/services/code/code'
import HForm from '@/components/HForm'
import {useEffect} from "react";

const {TextArea} = Input;
const {Option} = Select;
Expand All @@ -25,6 +26,12 @@ export default (props: any) => {
debounceInterval: 500,
})

useEffect(() => {
if (props.editing) {
refreshBranchList(props.form.getFieldValue('url'), '')
}
}, [props.editing, props.form, refreshBranchList])

const formatMessage = (suffix: string, defaultMsg?: string) => {
return intl.formatMessage({id: `pages.applicationNew.basic.${suffix}`, defaultMessage: defaultMsg})
}
Expand Down Expand Up @@ -139,7 +146,7 @@ export default (props: any) => {
}}>
{
branchList.map((item: string) => {
return <Option value={item}>{item}</Option>
return <Option key={item} value={item}>{item}</Option>
})
}
</Select>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/clusters/NewOrEdit/Basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default (props: any) => {
}}>
{
branchList.map((item: string) => {
return <Option value={item}>{item}</Option>
return <Option key={item} value={item}>{item}</Option>
})
}
</Select>
Expand Down
84 changes: 40 additions & 44 deletions src/pages/clusters/Pods/index.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c241c1c

Please sign in to comment.