issue修改

This commit is contained in:
谢思 2022-08-15 14:40:07 +08:00
parent 3e3a055b7d
commit e45b50356b
3 changed files with 13 additions and 6 deletions

View File

@ -46,7 +46,7 @@ function DeleteBox({owner, projectsId, visible, setVisible, createJobBy, branchO
>
<div className="itemBox mt10">
<label className="labelBox font-16"><i className="iconfont icon-a-bitian2x font-12"></i> {createJobBy}分支:</label>
<Input placeholder="请输入分支名称" className="inputBox" value={branchByOther} onChange={(e)=>setBranchByOther(e.target.value)}/>
<Input placeholder="请输入分支名称" className="inputBox" value={branchByOther} onChange={(e)=>setBranchByOther(e.target.value)} maxLength={50}/>
<div className="errorBox">{errorByOther}</div>
</div>
<div className="itemBox mt30 mb20">

View File

@ -8,10 +8,16 @@ import axios from "axios";
function EditStore(props){
const { form, history} = props;
const { owner , projectsId } = props.match.params;
const { getFieldDecorator, validateFields , setFieldsValue } = form;
const { getFieldDecorator, validateFields , setFieldsValue, setFields } = form;
function submit() {
validateFields((error,values)=>{
setFields({
'github_address':{value: values.github_address, errors: null},
'github_token':{value: values.github_token, errors: null},
'gitee_address':{value: values.gitee_address, errors: null},
'gitee_token':{value: values.gitee_token, errors: null}
})
if(!error){
//
for(let i in values){
@ -34,7 +40,7 @@ function EditStore(props){
message.success('绑定成功');
window.location.href = `/${owner}/${projectsId}/server/reposyncer`;
}else{
message.error('绑定失败');
// message.error('');
}
})
}

View File

@ -19,7 +19,7 @@ function RecordList(props){
// table
const [current, setCurrent] = useState(1);
const [total, setTotal] = useState(0);
const [pageSize, setPageSize] = useState(20);
const [pageSize, setPageSize] = useState(10);
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
const [deleteRecordId, setDeleteRecordId] = useState(undefined);
const [visible, setVisible] = useState(false);
@ -36,15 +36,16 @@ function RecordList(props){
useEffect(()=>{
//
axios.get(`/${owner}/${projectsId}/synchronizes/jobs.json`, {params: {type: type}}).then(res=>{
axios.get(`/${owner}/${projectsId}/synchronizes/jobs.json`, {params: {type: type, limit: pageSize, page: current}}).then(res=>{
if(res && res.data && res.data.message === "success"){
res.data.data.map(item=>{
item.create_time = item.create_time.replace('T', ' ')
})
setData(res.data.data);
setTotal(res.data.count);
}
})
},[reload])
},[reload, pageSize, current])
// errorBox
let columns = [