issue
This commit is contained in:
parent
ea77a13b6f
commit
c71d8512df
|
@ -73,20 +73,18 @@ function Dispose(props){
|
||||||
let eventA = event.split(",");
|
let eventA = event.split(",");
|
||||||
let l = {pipeline_name,id,branch,event:eventA}
|
let l = {pipeline_name,id,branch,event:eventA}
|
||||||
setUpdateInfo(l);
|
setUpdateInfo(l);
|
||||||
|
}else{
|
||||||
|
setUpdateInfo(undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onOk(pipeline_name,updateId,branch,event){
|
function onOk(pipeline_name,updateId,branch,event){
|
||||||
if(pipeline_name){
|
if(pipeline_name){
|
||||||
let eventStr = "";
|
let eventStr = "";
|
||||||
if(event.indexOf(",")>-1){
|
for(var i = 0;i<event.length;i++){
|
||||||
for(var i = 0;i<event.length;i++){
|
eventStr +=event[i]+",";
|
||||||
eventStr +=event[i]+",";
|
|
||||||
}
|
|
||||||
eventStr = eventStr.substring(0,eventStr.length-1);
|
|
||||||
}else{
|
|
||||||
eventStr = event;
|
|
||||||
}
|
}
|
||||||
|
eventStr = eventStr.substring(0,eventStr.length-1);
|
||||||
if(!updateId){
|
if(!updateId){
|
||||||
// 新增
|
// 新增
|
||||||
const url = `/ci/pipelines.json`;
|
const url = `/ci/pipelines.json`;
|
||||||
|
@ -136,7 +134,7 @@ function Dispose(props){
|
||||||
|
|
||||||
// 模板管理
|
// 模板管理
|
||||||
function toModalManage(){
|
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");
|
const operate = current_user && (permission && permission !== "Reporter");
|
||||||
|
|
|
@ -6,7 +6,7 @@ const EVENT = ["push","pull_request","tag","cron","custom","promote","rollback"]
|
||||||
function PipelineName({visible,onCancel,onOk,value ,branchList}){
|
function PipelineName({visible,onCancel,onOk,value ,branchList}){
|
||||||
const [ name , setName ] = useState(undefined);
|
const [ name , setName ] = useState(undefined);
|
||||||
const [ branchValue , setBranchValue ] = useState(undefined);
|
const [ branchValue , setBranchValue ] = useState(undefined);
|
||||||
const [ eventValue , setEventValue ] = useState(EVENT[0]);
|
const [ eventValue , setEventValue ] = useState([EVENT[0]]);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(branchList && branchList.length>0){
|
if(branchList && branchList.length>0){
|
||||||
|
@ -19,6 +19,8 @@ function PipelineName({visible,onCancel,onOk,value ,branchList}){
|
||||||
setName(value.pipeline_name);
|
setName(value.pipeline_name);
|
||||||
setBranchValue(value.branch);
|
setBranchValue(value.branch);
|
||||||
setEventValue(value.event);
|
setEventValue(value.event);
|
||||||
|
}else{
|
||||||
|
setName(undefined);
|
||||||
}
|
}
|
||||||
},[value])
|
},[value])
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ function CIList(props){
|
||||||
return(
|
return(
|
||||||
<li key={key}>
|
<li key={key}>
|
||||||
<span>
|
<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 ?
|
{ item.open_devops ?
|
||||||
<span className="authTag green ml20">已激活</span>
|
<span className="authTag green ml20">已激活</span>
|
||||||
:
|
:
|
||||||
|
|
Loading…
Reference in New Issue