forked from Gitlink/forgeplus-react
木兰-增加sonar质量分析的url显示
This commit is contained in:
parent
9d58b363df
commit
ef3ee596f2
|
@ -32,7 +32,7 @@ export function initAxiosInterceptors(props) {
|
|||
// 判断网络是否连接
|
||||
initOnlineOfflineListener();
|
||||
|
||||
var proxy = "https://testforgeplus.trustie.net";
|
||||
var proxy = "https://code.mulanos.cn";
|
||||
//响应前的设置
|
||||
axios.interceptors.request.use(
|
||||
config => {
|
||||
|
@ -45,11 +45,11 @@ export function initAxiosInterceptors(props) {
|
|||
if (`${config[0]}` !== `true`) {
|
||||
if (window.location.port === "3007") {
|
||||
config.url = `${proxy}${url}`;
|
||||
if (config.url.indexOf('?') === -1) {
|
||||
config.url = `${config.url}?debug=${debugType}`;
|
||||
} else {
|
||||
config.url = `${config.url}&debug=${debugType}`;
|
||||
}
|
||||
// if (config.url.indexOf('?') === -1) {
|
||||
// config.url = `${config.url}?debug=${debugType}`;
|
||||
// } else {
|
||||
// config.url = `${config.url}&debug=${debugType}`;
|
||||
// }
|
||||
} else {
|
||||
config.url = url;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ function CoderDepot(props){
|
|||
const [ desc , setDesc ] = useState(undefined);
|
||||
const [ website , setWebsite ] = useState(undefined);
|
||||
const [ lesson_url , setLessonUrl ] = useState(undefined);
|
||||
const [ sonar_url , setSonarUrl ] = useState(undefined);
|
||||
const [ readme , setReadme ] = useState(undefined);
|
||||
const [ defaultBranch , setDefaultBranch ] = useState(undefined);
|
||||
const [ editReadme , setEditReadme ] = useState(false);
|
||||
|
@ -100,6 +101,7 @@ function CoderDepot(props){
|
|||
setDesc(details.description);
|
||||
setWebsite(details.website);
|
||||
setLessonUrl(details.lesson_url);
|
||||
setSonarUrl(details.sonar_url);
|
||||
setDefaultBranch(details.default_branch);
|
||||
setInviteCode(details.invite_code);
|
||||
}
|
||||
|
@ -334,6 +336,7 @@ function CoderDepot(props){
|
|||
setDesc(result.data.description);
|
||||
setWebsite(result.data.website);
|
||||
setLessonUrl(result.data.lesson_url);
|
||||
setSonarUrl(result.data.sonar_url);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -558,6 +561,26 @@ function CoderDepot(props){
|
|||
<a href={lesson_url} target="_blank" className="color-grey-6" style={{textDecoration:"underline",wordBreak:"break-all"}}>{lesson_url}</a>
|
||||
</div>
|
||||
}
|
||||
{
|
||||
|
||||
<div>
|
||||
<Divider />
|
||||
<p className="font-16 color-ooo">sonar质量分析</p>
|
||||
{
|
||||
sonar_url ?
|
||||
<a href={sonar_url} target="_blank" className="color-grey-6" style={{textDecoration:"underline",wordBreak:"break-all"}}>{sonar_url}</a>
|
||||
:
|
||||
<span>
|
||||
<span>暂时还没有检测结果</span>
|
||||
{
|
||||
projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" ?
|
||||
<Link to={`/${owner}/${projectsId}/settings/webhooks/new`} className="color-blue ml20">去检测</Link>
|
||||
:""
|
||||
}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
{/* 发布 */}
|
||||
{
|
||||
releaseVersions &&
|
||||
|
|
Loading…
Reference in New Issue