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