From fb975e70eed66897a40941602334b44af574c21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Wed, 15 Mar 2023 13:41:23 +0800 Subject: [PATCH 1/5] issue --- src/forge/Issues/Component/comments/list.jsx | 2 +- src/forge/users/Index.scss | 2 +- src/forge/users/Infos.js | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/forge/Issues/Component/comments/list.jsx b/src/forge/Issues/Component/comments/list.jsx index 00ea776fc..b62902c45 100644 --- a/src/forge/Issues/Component/comments/list.jsx +++ b/src/forge/Issues/Component/comments/list.jsx @@ -200,7 +200,7 @@ function IssueCommentList(props){ {login &&
{/* 平台管理员/仓库管理员/发布评论者/回复评论者/issue创建者 */} - {(admin || isManager || login === i.user.login || login === i.reply_user.login || user_id === author.id) && :"" } - { + {/* { current_user && current_user.login && current_user.login === username ? DevOps引擎 :"" - } + } */} 参与组织 @@ -434,7 +434,7 @@ class Infos extends Component { return ; }} > - { return ; @@ -445,7 +445,7 @@ class Infos extends Component { render={() => { return ; }} - > + > */} { From 63c2e8ba8eed2b3dd56c5281736e7c3af8ae6d00 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 15 Mar 2023 14:54:17 +0800 Subject: [PATCH 2/5] =?UTF-8?q?issue=E5=88=97=E8=A1=A8=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Issues/Pages/list.jsx | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/forge/Issues/Pages/list.jsx b/src/forge/Issues/Pages/list.jsx index 1a217f2a0..1cc6f590d 100644 --- a/src/forge/Issues/Pages/list.jsx +++ b/src/forge/Issues/Pages/list.jsx @@ -63,6 +63,7 @@ function List(props){ useEffect(()=>{ const datas = cookie.load('issuestates'); let states = datas === "undefined" ? undefined : datas; + console.log(states); if(states){ setAboutMe(states.participant_category); setCategory(states.category); @@ -72,8 +73,8 @@ function List(props){ setNames(states.names); setBegin(states.begin_date); setEnd(states.end_date); - if(states.participant_category ==="all" && states.category === "opened" && states.page === 1 && states.limit===defaultLimit) - Init({...states},states.page,states.names); + // if(states.participant_category ==="all" && states.category === "opened" && states.page === 1 && states.limit===defaultLimit) + // Init({...states},states.page,states.names); }else{ Init(); } @@ -102,7 +103,7 @@ function List(props){ } // 使用自定义hook - useUpdateEffect(handleAllDisabled, [aboutMe,keyword,category,limit,begin_date,end_date]); + useUpdateEffect(handleAllDisabled, [aboutMe,keyword,category,limit,end_date,updateIds]); function getDirection(id){ @@ -128,6 +129,7 @@ function List(props){ // 获取issue列表数据 function Init(params,p,names){ + setTotal(undefined); const datas = cookie.load('issuestates'); let states = datas === "undefined" ? undefined : datas; if(states){ @@ -179,7 +181,7 @@ function List(props){ ) function chooseAboutMe(e){ setPage(1); - setCategory("opened"); + // setCategory("opened"); setAboutMe(e.key); } @@ -188,14 +190,16 @@ function List(props){ setKeyword(undefined); setAboutMe("all"); setCategory("opened"); - setTotal(undefined); setUpdateIds(undefined); setAllValue([]); + setPage(1); setValue(undefined); setNames(undefined); setEnd(undefined); setBegin(undefined); - (!value || begin_date || end_date ) && Init(); + // if(!value){ + // Init(); + // } // 清除下拉选项 menuRef.current && menuRef.current.clearChoose(); } @@ -290,7 +294,7 @@ function List(props){ }else{ setUpdateIds(ids); setTotal(undefined); - Init(ids,1,n); + // Init(ids,1,n); } } @@ -316,8 +320,8 @@ function List(props){ // 选择搜索时间 function changeBeginTime(data, value){ setPage(1); - setBegin(value[0] || undefined); - setEnd(value[1] || undefined); + setBegin(value[0] || ''); + setEnd(value[1] || ''); } return(
@@ -348,14 +352,7 @@ function List(props){ }
- - {/* - */} + { permission && permission !== "Reporter" && 标记管理 From f6dbcaf1b28c83d02469720bc97f6aa4df6866b6 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 15 Mar 2023 15:21:57 +0800 Subject: [PATCH 3/5] issue #2598 --- src/forge/Issues/Component/allMenus.jsx | 1 + src/forge/Issues/Pages/list.jsx | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/forge/Issues/Component/allMenus.jsx b/src/forge/Issues/Component/allMenus.jsx index 740fb0301..302f27faf 100644 --- a/src/forge/Issues/Component/allMenus.jsx +++ b/src/forge/Issues/Component/allMenus.jsx @@ -44,6 +44,7 @@ function AllMenus({owner,projectsId,chooseFunc,update,defaultNames,defaultIds,op useEffect(()=>{ if(defaultIds){ + console.log("defaule:",defaultIds); setIds(defaultIds); } },[defaultIds]) diff --git a/src/forge/Issues/Pages/list.jsx b/src/forge/Issues/Pages/list.jsx index 1cc6f590d..e3488ac81 100644 --- a/src/forge/Issues/Pages/list.jsx +++ b/src/forge/Issues/Pages/list.jsx @@ -146,7 +146,7 @@ function List(props){ limit, begin_date,end_date, sort_direction:getDirection(params && params.sort_by), - sort_by:getBy(params && params.sort_by), + sort_by:getBy(params && params.sort_by),names:undefined } }).then(result=>{ if(result){ @@ -292,6 +292,11 @@ function List(props){ // setUpdateIds(ids); setUpdateChooseIds(ids); }else{ + if(ids.status_id === "5"){ + setCategory("closed"); + }else{ + setCategory("opened"); + } setUpdateIds(ids); setTotal(undefined); // Init(ids,1,n); @@ -304,6 +309,19 @@ function List(props){ } function changeCategory(value){ if(value !== category){ + let ids = {...updateIds}; + let ns = {...names}; + if(value === "closed"){ + ns = {...ns,status_name:"关闭"} + ids = {...ids,status_id:'5'}; + setNames(ns) + setUpdateIds(ids); + }else{ + ns = {...ns,status_name:undefined} + ids = {...ids,status_id:undefined}; + setNames(ns) + setUpdateIds(ids); + } setCategory(value); setPage(1); setTotal(undefined); From 4910bbcfeaf7299dabc461ebd7f66423cf41f9c0 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 15 Mar 2023 15:22:51 +0800 Subject: [PATCH 4/5] remove console --- src/forge/Issues/Component/menus.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/forge/Issues/Component/menus.jsx b/src/forge/Issues/Component/menus.jsx index 40370a071..10f6fd1ff 100644 --- a/src/forge/Issues/Component/menus.jsx +++ b/src/forge/Issues/Component/menus.jsx @@ -22,7 +22,6 @@ function Menus({name, ids , lists , size , imgControl , searchFunc , chooseFunc useEffect(()=>{ setChooseValue(ids); - console.log(ids); setShowValue(names); },[ids,names]) @@ -44,7 +43,6 @@ function Menus({name, ids , lists , size , imgControl , searchFunc , chooseFunc setChooseValue(l); setShowValue(nameArr.join(",")); chooseFunc(l,nameArr.join(",")); - console.log("choosed:",l); }else{ if(l && l.indexOf(id)>=0){ setChooseValue([]); From bdecf6f136deb8d0f0763eb40b87e1233876041f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 16 Mar 2023 09:32:13 +0800 Subject: [PATCH 5/5] bot issue --- src/forge/SecuritySetting/bot/disposition/detail.jsx | 2 +- src/forge/SecuritySetting/bot/disposition/index.jsx | 1 + .../exploit/configuration/compenent/advancedInformation.jsx | 3 +++ .../bot/exploit/configuration/compenent/basicInformation.jsx | 3 +-- src/forge/SecuritySetting/bot/exploit/index.jsx | 1 + src/forge/SecuritySetting/bot/exploit/new/index.jsx | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/forge/SecuritySetting/bot/disposition/detail.jsx b/src/forge/SecuritySetting/bot/disposition/detail.jsx index b27c8c181..5daae68ec 100644 --- a/src/forge/SecuritySetting/bot/disposition/detail.jsx +++ b/src/forge/SecuritySetting/bot/disposition/detail.jsx @@ -122,7 +122,7 @@ function DispositionDetail(props){
{botDetail && botDetail.register_name} - {botDetail && botDetail.create_time && moment(botDetail.create_time).format('YYYY-MM-DD hh:mm:ss')} + {botDetail && botDetail.create_time}
} diff --git a/src/forge/SecuritySetting/bot/disposition/index.jsx b/src/forge/SecuritySetting/bot/disposition/index.jsx index f8f4e9f43..b49484488 100644 --- a/src/forge/SecuritySetting/bot/disposition/index.jsx +++ b/src/forge/SecuritySetting/bot/disposition/index.jsx @@ -15,6 +15,7 @@ function DispositionBot(props){ const [reload, setReload] = useState(undefined); useEffect(()=>{ + window.scrollTo(0,0); document.title='Bot安装'; }, []) diff --git a/src/forge/SecuritySetting/bot/exploit/configuration/compenent/advancedInformation.jsx b/src/forge/SecuritySetting/bot/exploit/configuration/compenent/advancedInformation.jsx index ce6cdede8..5fb53ade1 100644 --- a/src/forge/SecuritySetting/bot/exploit/configuration/compenent/advancedInformation.jsx +++ b/src/forge/SecuritySetting/bot/exploit/configuration/compenent/advancedInformation.jsx @@ -149,6 +149,9 @@ function AdvancedInformation(props){ setVisibleDelete(false); message.success("更改成功"); setReload(Math.random()); + }else{ + setVisibleDelete(false); + message.error(res.message); } }) } diff --git a/src/forge/SecuritySetting/bot/exploit/configuration/compenent/basicInformation.jsx b/src/forge/SecuritySetting/bot/exploit/configuration/compenent/basicInformation.jsx index 1276e278a..510fa667b 100644 --- a/src/forge/SecuritySetting/bot/exploit/configuration/compenent/basicInformation.jsx +++ b/src/forge/SecuritySetting/bot/exploit/configuration/compenent/basicInformation.jsx @@ -54,8 +54,7 @@ function BasicInformation(props){ const params = { ...botDetail, ...fieldsValue, - bot_id: parseInt(id), - logo: imageId ? '/api/attachments/'+imageId : '/api/attachments/347246' + bot_id: parseInt(id) } registerUpdateBot(params).then(res=>{ if(res && res.code === 200){ diff --git a/src/forge/SecuritySetting/bot/exploit/index.jsx b/src/forge/SecuritySetting/bot/exploit/index.jsx index 85ddfd828..a9e56092e 100644 --- a/src/forge/SecuritySetting/bot/exploit/index.jsx +++ b/src/forge/SecuritySetting/bot/exploit/index.jsx @@ -16,6 +16,7 @@ function ExploitBot(props){ const [reload, setReload] = useState(undefined); useEffect(()=>{ + window.scrollTo(0,0); document.title='我的Bot'; }, []) diff --git a/src/forge/SecuritySetting/bot/exploit/new/index.jsx b/src/forge/SecuritySetting/bot/exploit/new/index.jsx index 21ee4139d..0e7d840ea 100644 --- a/src/forge/SecuritySetting/bot/exploit/new/index.jsx +++ b/src/forge/SecuritySetting/bot/exploit/new/index.jsx @@ -92,7 +92,7 @@ function Disposition(props){ return
- 开发Bot注册新的Bot + 我的Bot注册新的Bot