|
|
@@ -7,13 +7,13 @@
|
|
|
<el-link
|
|
|
target="_blank"
|
|
|
class="commit-id description-card-text"
|
|
|
- @click.stop.prevent="copy(commitId.id)"
|
|
|
+ @click.stop.prevent="copy(commitId)"
|
|
|
>
|
|
|
<span>{{ commitId }}</span>
|
|
|
<i class="el-icon-document-copy"></i>
|
|
|
</el-link>
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="commitInfo.checkResult === 'none' ? 24:16">
|
|
|
+ <el-col :span="16">
|
|
|
<div class="description-card-text">
|
|
|
<el-row style="height: 25px; line-height: 25px">
|
|
|
<el-col :span="2">
|
|
|
@@ -89,9 +89,43 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col v-if="commitInfo.checkResult !== 'none'" :span="8" class="left-line">
|
|
|
- <i v-if="commitInfo.checkResult === 'pass'" class="el-icon-circle-check check-pass">质量检查通过</i>
|
|
|
- <i v-else-if="commitInfo.checkResult === 'fail'" class="el-icon-circle-close check-fail">质量检查失败</i>
|
|
|
+ <el-col :span="8" class="left-line">
|
|
|
+ <div v-if="commitInfo.checkResult !== 'none'">
|
|
|
+ <el-tag v-if="commitInfo.checkResult === 'pass'" type="success">
|
|
|
+ <i class="el-icon-circle-check check-pass">质量检查通过</i>
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-if="commitInfo.checkResult === 'fail'" type="danger">
|
|
|
+ <i class="el-icon-circle-close check-fail">质量检查失败</i>
|
|
|
+ </el-tag>
|
|
|
+ <div class="description-card-text">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <b>时间</b>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <span>{{ commitQuality.checkTime }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div class="description-card-text">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <b>详细结果</b>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-link @click.stop.prevent="openUrl(commitQuality.resultUrl)">{{commitQuality.resultUrl}}</el-link>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else style="color: gray; font-size: small">
|
|
|
+ <el-tooltip class="item" effect="dark" placement="bottom">
|
|
|
+ <template #content>还没有这个版本的代码检查记录,如有需要请移步至流水线界面创建质量检查流水线。<br/>
|
|
|
+ 如果是JAVA代码可以使用SONAR-JAVA8模板,否则可以使用SONAR-OTHER模板。<br/>
|
|
|
+ 提交检查任务后并得到结果后,可以在这里查看。</template>
|
|
|
+ <el-tag type="info">没有质量检查结果</el-tag>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
@@ -187,6 +221,7 @@ export default {
|
|
|
relatedIdEdit: 1,
|
|
|
bugList: [],
|
|
|
treeList: [],
|
|
|
+ commitQuality: {},
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -198,6 +233,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
async mounted() {
|
|
|
+ this.loadCommitQuality();
|
|
|
await this.loadCommitInfo();
|
|
|
await this.loadRelatedLists();
|
|
|
},
|
|
|
@@ -235,6 +271,9 @@ export default {
|
|
|
this.bugList = await BugListAPI.getBugListByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
this.treeList = await RequirementAPI.getTasksByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
},
|
|
|
+ async loadCommitQuality() {
|
|
|
+ this.commitQuality = await ProjectAPI.getQualityByCommit(this.projectId, this.commitId);
|
|
|
+ },
|
|
|
drawDiffHtml() {
|
|
|
// this.diffString = this.diff[this.currentParentIndex][0].diff;
|
|
|
this.diffString = this.currentFileRow.diff;
|
|
|
@@ -276,6 +315,9 @@ export default {
|
|
|
await this.loadCommitInfo();
|
|
|
this.typeEditMode = false;
|
|
|
},
|
|
|
+ openUrl(url) {
|
|
|
+ window.open(url, '_blank');
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|