This commit is contained in:
caishi 2021-01-20 10:47:59 +08:00
parent ef22be7e96
commit c53de4ad15
4 changed files with 10 additions and 9 deletions

View File

@ -46,7 +46,7 @@ function List({ list, permission , projectsId , owner , showModal , deleteFunc }
<a className="ml10 color-grey-6"><i className="iconfont iconlajitong font-13 mr3"></i>删除</a>
</Popconfirm>
}
<Link to={`/projects/${owner}/${projectsId}/devops/list`} className="ml10 color-grey-6">查看运行记录</Link>
<Link to={`/projects/${owner}/${projectsId}/devops/list`} className="ml10 color-grey-6"><i className="iconfont iconyunhang font-13 mr3"></i>查看运行记录</Link>
</span>
)
}

View File

@ -27,7 +27,7 @@ function Menus({step,changeStep, menuList , renameFunc , checkDatas , addFunc })
<i className={`iconfont ${typeIcon[`${item.stage_type}`]}`}></i>
<MenusRename renameFunc={renameFunc} id={item.id} name={item.stage_name} edit={item.stage_type !== "init" && item.stage_type !== "confirm"}/>
</li>
{ key !== (menuList.length-1) && menuList.length <= 7 ?
{ key !== (menuList.length-1) && menuList.length < 7 ?
<MenusAdd checkDatas={checkDatas} k={key+2} getName={getName}/>:""
}
</React.Fragment>

View File

@ -24,6 +24,7 @@ function menusAdd ({ getName , checkDatas , k }){
if(value){
getName(value , index);
}
setValue(undefined);
setShow(false);
setPut(false);
}

View File

@ -7,7 +7,6 @@ import Init from './Dispose/Init';
import Sure from './Dispose/Sure';
import Stage from './Dispose/Stage';
import axios from 'axios';
import { data } from 'autoprefixer';
function disposePipeline(props){
const [ spining , setSpining ] = useState(true);
@ -185,16 +184,16 @@ function disposePipeline(props){
//
function enters(btn){
let s;
let s = stage;
if(btn === "next"){
//
s = stage+1;
s = s+1;
}else{
//
s = stage-1;
s = s-1;
}
let item = menuList && menuList.filter(i=>i.show_index === (s));
setStage(item[0].show_index);
setStage(s);
setStageType(item[0].stage_type);
setStageId(item[0].id);
setStepName(pipeLineName+`-`+item[0].stage_name);
@ -247,12 +246,13 @@ function disposePipeline(props){
let nextStageType = next && next.length>0 && next[0].stage_type;
const url = `/ci/pipelines/${disposeId}/${stageId}/delete_stage.json`;
axios.delete(url,{
show_index:stage
params:{show_index:stage}
}).then(result=>{
if(result && result.data){
props.showNotification("阶段删除成功!");
getData(stage-1);
setStageType(nextStageType);
}else{
props.showNotification("阶段删除失败!");
}
}).catch(error=>{})
}