Skip to content

Commit

Permalink
feat: 修改部分按钮问题 #2738
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 committed Nov 11, 2024
1 parent 1b5cef6 commit 4b9d15d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
uid: this.userInfo.name
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
window.open(res, '_blank')
}
})
Expand Down
14 changes: 7 additions & 7 deletions src/frontend/devops-repository/src/views/repoGeneric/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@
repoName: this.repoName
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down Expand Up @@ -966,7 +966,7 @@
path: fullPath
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down Expand Up @@ -1047,7 +1047,7 @@
path: row.fullPath
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down Expand Up @@ -1147,7 +1147,7 @@
repoName: this.repoName
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down Expand Up @@ -1223,7 +1223,7 @@
repoName: this.repoName
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down Expand Up @@ -1310,7 +1310,7 @@
path: row.fullPath
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down Expand Up @@ -1366,7 +1366,7 @@
path: row.fullPath
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
uid: this.userInfo.name
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@
uid: this.userInfo.name
}
}).then(res => {
if (res !== '') {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
Expand Down
25 changes: 23 additions & 2 deletions src/frontend/devops-repository/src/views/repoSearch/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
}
},
computed: {
...mapState(['userList']),
...mapState(['userList', 'userInfo']),
projectId () {
return this.$route.params.projectId
},
Expand All @@ -140,7 +140,7 @@
},
methods: {
formatDate,
...mapActions(['searchPackageList', 'searchRepoList']),
...mapActions(['searchPackageList', 'searchRepoList', 'getPermissionUrl']),
refreshRoute () {
this.$router.replace({
query: {
Expand Down Expand Up @@ -194,6 +194,27 @@
this.hasNext = false
}
scrollLoad ? this.resultList.push(...records) : (this.resultList = records)
}).catch(err => {
if (err.status === 403) {
this.getPermissionUrl({
body: {
projectId: this.projectId,
action: 'READ',
resourceType: 'PROJECT',
uid: this.userInfo.name
}
}).then(res => {
if (res !== '' && res !== null) {
this.showIamDenyDialog = true
this.showData = {
projectId: this.projectId,
repoName: '',
action: 'READ',
url: res
}
}
})
}
}).finally(() => {
this.isLoading = false
})
Expand Down

0 comments on commit 4b9d15d

Please sign in to comment.