devops
This commit is contained in:
parent
a411d2c111
commit
a09b81df3f
|
@ -120,7 +120,6 @@ function About(props, ref) {
|
|||
}else{
|
||||
s=step+num;
|
||||
}
|
||||
console.log(s);
|
||||
setStep(s);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ function Dispose(props){
|
|||
const [ info , setInfo ] = useState('.trustie-pipeline.yml');
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ ymlValue , setYmlValue ] = useState("");
|
||||
const [ sha , setSha ] = useState(undefined);
|
||||
const [ six , setSix ] = useState(undefined);
|
||||
const [ fileLanguage , setFileLanguage ] = useState(undefined);
|
||||
const [ first , setFirst ] = useState(false);
|
||||
|
@ -31,6 +32,7 @@ function Dispose(props){
|
|||
setInfo(result.data.name);
|
||||
setYmlValue(result.data.content);
|
||||
setFirst(true);
|
||||
setSha(result.data.sha);
|
||||
}else{
|
||||
setFirst(false);
|
||||
}
|
||||
|
@ -66,7 +68,7 @@ function Dispose(props){
|
|||
url = `/${owner}/${projectsId}/update_trustie_pipeline.json`;
|
||||
axios.put(url,{
|
||||
...params,
|
||||
sha:info && info.sha
|
||||
sha
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
setVisible(true);
|
||||
|
@ -86,6 +88,7 @@ function Dispose(props){
|
|||
}
|
||||
}
|
||||
function suresubmit(){
|
||||
setVisible(false);
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/list`);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ const Div = styled.div`{
|
|||
text-align:center;
|
||||
color:#333;
|
||||
}`
|
||||
export default (({visible , closeFunc , suresubmit})=>{
|
||||
export default (({visible , closeFunc , sureFunc})=>{
|
||||
return(
|
||||
<Modal
|
||||
title="提示"
|
||||
|
@ -17,7 +17,7 @@ export default (({visible , closeFunc , suresubmit})=>{
|
|||
footer={
|
||||
<div>
|
||||
<Button onClick={()=>closeFunc(false)}>取消</Button>
|
||||
<Button type={"primary"} onClick={suresubmit} style={{marginLeft:"20px"}}>确定</Button>
|
||||
<Button type={"primary"} onClick={()=>sureFunc()} style={{marginLeft:"20px"}}>确定</Button>
|
||||
</div>
|
||||
}
|
||||
onCancel={()=>closeFunc(false)}
|
||||
|
|
|
@ -39,7 +39,6 @@ export default (props) => {
|
|||
}
|
||||
}).then((result) => {
|
||||
if (result && result.data) {
|
||||
console.log(result);
|
||||
let list = result.data.builds && result.data.builds.map((item, key) => {
|
||||
return {
|
||||
...item,
|
||||
|
@ -192,7 +191,6 @@ export default (props) => {
|
|||
key: "number",
|
||||
width: "8%",
|
||||
render: ( value, item, key) => {
|
||||
console.log(item);
|
||||
return <span>#{value}</span>;
|
||||
},
|
||||
},
|
||||
|
|
|
@ -363,7 +363,7 @@ class Detail extends Component {
|
|||
const { projectDetail, watchers_count, praises_count,
|
||||
forked_count, firstSync , secondSync ,
|
||||
isManager, watched, praised,
|
||||
project , open_devops } = this.state;
|
||||
project , open_devops , author } = this.state;
|
||||
|
||||
const url = this.props.history.location.pathname;
|
||||
const urlArr = url.split("/");
|
||||
|
@ -487,12 +487,16 @@ class Detail extends Component {
|
|||
</Link>
|
||||
</li>
|
||||
}
|
||||
<li className={pathname==="devops" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}>
|
||||
<i className="iconfont icon-gongzuoliu font-13 mr8"></i>工作流
|
||||
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
|
||||
</Link>
|
||||
</li>
|
||||
{
|
||||
current_user && author && current_user.login === author.login ?
|
||||
<li className={pathname==="devops" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}>
|
||||
<i className="iconfont icon-gongzuoliu font-13 mr8"></i>工作流
|
||||
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
|
||||
</Link>
|
||||
</li>:""
|
||||
}
|
||||
|
||||
<li className={pathname==="milestones" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/milestones`, state }}>
|
||||
<img alt="" src={img_milepost} width="16" />里程碑
|
||||
|
|
Loading…
Reference in New Issue