Skip to content

Commit

Permalink
feat: repoUrl as href
Browse files Browse the repository at this point in the history
  • Loading branch information
narasux committed Mar 5, 2025
1 parent a223c39 commit ff8e8c5
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
<div class="info">
<div class="info-item">
<div class="label">{{ $t('代码仓库') }}:</div>
<div class="value">{{ repoUrl }}</div>
<div class="value" v-bk-overflow-tips="{ content: repoUrl, allowHTML: true }">
{{ repoUrl }}
</div>
</div>
<div class="info-item">
<div class="label">{{ $t('代码分支') }}:</div>
<div class="value">{{ repoBranch }}</div>
<div class="value">{{ repoBranch }}
<a :href="repoBranchUrl" target="_blank">
<i class="paasng-jump-link paasng-icon"></i>
</a>
</div>
</div>
<div class="info-item">
<div class="label">{{ $t('增强服务') }}:</div>
Expand Down Expand Up @@ -74,6 +80,13 @@ export default {
repoBranch() {
return this.data?.repo?.version_info?.version_name || "--"
},
repoBranchUrl() {
if (this.repoUrl === "--" || this.repoBranch === "--") {
return "--"
}
return `${this.repoUrl.replace(/\.git$/, '')}/tree/${encodeURIComponent(this.repoBranch)}`
},
envVarLength() {
return Object.keys(this.data?.env_vars || {})?.length;
},
Expand Down

0 comments on commit ff8e8c5

Please sign in to comment.