This commit is contained in:
caishi 2021-02-02 09:49:03 +08:00
parent ea77a13b6f
commit c71d8512df
3 changed files with 10 additions and 10 deletions

View File

@ -73,20 +73,18 @@ function Dispose(props){
let eventA = event.split(",");
let l = {pipeline_name,id,branch,event:eventA}
setUpdateInfo(l);
}else{
setUpdateInfo(undefined);
}
}
function onOk(pipeline_name,updateId,branch,event){
if(pipeline_name){
let eventStr = "";
if(event.indexOf(",")>-1){
for(var i = 0;i<event.length;i++){
eventStr +=event[i]+",";
}
eventStr = eventStr.substring(0,eventStr.length-1);
}else{
eventStr = event;
for(var i = 0;i<event.length;i++){
eventStr +=event[i]+",";
}
eventStr = eventStr.substring(0,eventStr.length-1);
if(!updateId){
//
const url = `/ci/pipelines.json`;
@ -136,7 +134,7 @@ function Dispose(props){
//
function toModalManage(){
props.history.push(`/projects/cxt/DevOps-mo/devops/mould`);
props.history.push(`/projects/${owner}/${projectsId}/devops/mould`);
}
const operate = current_user && (permission && permission !== "Reporter");

View File

@ -6,7 +6,7 @@ const EVENT = ["push","pull_request","tag","cron","custom","promote","rollback"]
function PipelineName({visible,onCancel,onOk,value ,branchList}){
const [ name , setName ] = useState(undefined);
const [ branchValue , setBranchValue ] = useState(undefined);
const [ eventValue , setEventValue ] = useState(EVENT[0]);
const [ eventValue , setEventValue ] = useState([EVENT[0]]);
useEffect(()=>{
if(branchList && branchList.length>0){
@ -19,6 +19,8 @@ function PipelineName({visible,onCancel,onOk,value ,branchList}){
setName(value.pipeline_name);
setBranchValue(value.branch);
setEventValue(value.event);
}else{
setName(undefined);
}
},[value])

View File

@ -62,7 +62,7 @@ function CIList(props){
return(
<li key={key}>
<span>
<Link to={`/projects/${item.author && item.author.login}/${item.identifier}${ item.open_devops ? "/devops/list":""}`}>{item.name}</Link>
<Link to={`/projects/${item.author && item.author.login}/${item.identifier}${ item.open_devops ? "/devops/dispose":""}`}>{item.name}</Link>
{ item.open_devops ?
<span className="authTag green ml20">已激活</span>
: