forked from Gitlink/forgeplus-react
commit id支持跳转到代码库,webhook地址复制错误bug fix
This commit is contained in:
parent
c4584edf2a
commit
18746dedb1
|
|
@ -45,11 +45,11 @@ function RecordList(props){
|
|||
|
||||
// 同步状态errorBox
|
||||
let columns = [
|
||||
{ title: '序号', dataIndex: 'index', className:"recordColumns", render: (text, item, index) => <span>{(current-1)*pageSize+index + 1}</span> },
|
||||
{ title: '序号', dataIndex: 'index', className:"recordColumns", align: 'center', render: (text, item, index) => <span>{(current-1)*pageSize+index + 1}</span> },
|
||||
{ title: '代码变更方', dataIndex: 'change_from', className:"recordColumns"},
|
||||
{ title: '同步时间', dataIndex: 'sync_time', className:"recordColumns"},
|
||||
{ title: '同步状态', dataIndex: 'sync_status', className:"recordColumns", render: (text)=>sync_status(text)},
|
||||
{ title: 'commit id', dataIndex: 'commit_id', className:"primaryColor recordColumns"},
|
||||
{ title: 'commit id', dataIndex: 'commit_id', className:"recordColumns", render: (text) =>{ return <Link to={`/${owner}/${projectsId}/commits/${text}`} className="primaryColor">{text}</Link>}},
|
||||
{ title: '同步日志', dataIndex: 'action', align: 'center', className:"primaryColor recordColumns"},
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ function RecordList(props){
|
|||
const {sync_repositories_unique=[]} = storeDetail || {};
|
||||
const [token, setToken] = useState({});
|
||||
|
||||
function inviteClick() {
|
||||
const copyEle = document.querySelector('#webhook'); // 获取要复制的节点
|
||||
function inviteClick(idName) {
|
||||
console.log('idName', idName);
|
||||
const copyEle = document.querySelector(idName); // 获取要复制的节点
|
||||
if (!copyEle) {
|
||||
console.error("您的CopyTool未设置正确的inputId");
|
||||
return;
|
||||
|
|
@ -35,7 +36,7 @@ function RecordList(props){
|
|||
<Breadcrumb.Item className="font-15"><Link to={`/${owner}/${projectsId}/service/reposyncer`} className="primaryColor">同步分支列表</Link></Breadcrumb.Item>
|
||||
<Breadcrumb.Item className="font-15">同步配置</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
{sync_repositories_unique.map(item => {
|
||||
{sync_repositories_unique.map((item, index) => {
|
||||
const {type, external_repo_address, sync_repository_ids} = item
|
||||
return <Fragment>
|
||||
<div className="font-15 mt20 mb7">同步仓库平台</div>
|
||||
|
|
@ -44,11 +45,11 @@ function RecordList(props){
|
|||
<div className="infoBox"><a href={external_repo_address} target="_blank">{external_repo_address}</a></div>
|
||||
<div className="font-15 mt20 mb7">Webhook接受请求地址</div>
|
||||
<Input
|
||||
id="webhook"
|
||||
id={`webhook${index}`}
|
||||
className="webhookCopyBox copyWebhookInput"
|
||||
value={`${window.location.origin}/api/v1/${owner}/${projectsId}/sync_repositories/sync?sync_direction=2&repo_type=${type}`}
|
||||
readOnly
|
||||
addonAfter={<a className="primaryColor" onClick={inviteClick}>复制链接</a>}
|
||||
addonAfter={<a className="primaryColor" onClick={()=>{inviteClick(`#webhook${index}`)}}>复制链接</a>}
|
||||
/>
|
||||
<div className="font-15 mt20 mb7">同步仓库授权</div>
|
||||
<Input.Password addonBefore="token" placeholder={`请输入${type.split("::")[1]}的授权token`} style={{width: '60%'}} defaultValue={item.external_token} maxLength={300} onChange={(e)=>{
|
||||
|
|
|
|||
|
|
@ -318,13 +318,9 @@
|
|||
}
|
||||
.storeSetting{
|
||||
.infoBox{
|
||||
width: 70%;
|
||||
padding: 3px 15px;
|
||||
background-color: rgba(70,106,255,0.03);
|
||||
}
|
||||
.webhookCopyBox{
|
||||
width: 70%;
|
||||
}
|
||||
.branchTable{
|
||||
width: 30%;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue