forked from Gitlink/forgeplus-react
同上-修改bug
This commit is contained in:
parent
f7698334ab
commit
2b47c1ff9a
|
@ -329,7 +329,7 @@ function New({ form , match , showNotification , history }) {
|
|||
}
|
||||
</Form>
|
||||
</div>
|
||||
{ id && <PushHistory id={id} owner={owner} projectsId={projectsId}/> }
|
||||
{ id && <PushHistory id={id} owner={owner} projectsId={projectsId} showNotification={showNotification}/> }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import Content from './historyContent';
|
|||
import Fault from '../images/fault.png';
|
||||
const { Panel } = Collapse;
|
||||
|
||||
function PushHistory({id,owner,projectsId}) {
|
||||
function PushHistory({id,owner,projectsId,showNotification}) {
|
||||
const [ list , setList ] = useState(undefined);
|
||||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
|
||||
|
@ -32,8 +32,8 @@ function PushHistory({id,owner,projectsId}) {
|
|||
const url = `/${owner}/${projectsId}/webhooks/${id}/test.json`;
|
||||
axios.post(url).then(result=>{
|
||||
if(result && result.data){
|
||||
Init();
|
||||
}else{
|
||||
// Init();
|
||||
showNotification("测试推送已经加入到队列,请耐心等待数秒再刷新推送记录!");
|
||||
setIsSpin(false);
|
||||
}
|
||||
}).catch(error=>{setIsSpin(false);})
|
||||
|
@ -43,7 +43,10 @@ function PushHistory({id,owner,projectsId}) {
|
|||
<div className="pt30">
|
||||
<div className="deschead">
|
||||
<span className="font-16">最近推送历史</span>
|
||||
<Button type="primary" onClick={testFunc} loading={isSpin}>测试推送</Button>
|
||||
<span>
|
||||
<a className="color-blue" onClick={Init}>刷新</a>
|
||||
<Button type="primary" className="ml20" onClick={testFunc} loading={isSpin}>测试推送</Button>
|
||||
</span>
|
||||
</div>
|
||||
{
|
||||
list && list.length>0 &&
|
||||
|
|
|
@ -262,8 +262,8 @@ form{
|
|||
border-color: #D0D0D0;
|
||||
}
|
||||
.ant-btn.ant-btn-background-ghost.ant-btn-primary:hover{
|
||||
background-color: #2A61FF!important;
|
||||
border-color: #2A61FF;
|
||||
background-color: #1890ff!important;
|
||||
border-color: #1890ff;
|
||||
color: #fff;
|
||||
}
|
||||
.ant-btn.ant-btn-background-ghost.ant-btn-danger:hover{
|
||||
|
|
Loading…
Reference in New Issue