Unverified Commit 2b778d29 authored by caohua's avatar caohua Committed by GitHub
Browse files

update: 调整镜像唯一索引&支持公共镜像详情 (#650)

* 修复变量批量导入提示报错

* update: 调整镜像唯一索引&支持公共镜像详情
parent 4a72a73e
Showing with 21 additions and 26 deletions
+21 -26
......@@ -3173,7 +3173,7 @@
// 利用setTimeout事件来先让当前容器的blur事件执行完才切换
setTimeout(() => {
// 切换container
this.resetPreContainerParams()
// this.resetPreContainerParams()
this.renderImageIndex++
this.curContainer = container
this.curContainerIndex = index
......@@ -3736,7 +3736,7 @@
const data = res.data
setTimeout(() => {
data.forEach(item => {
item._id = item.value
item._id = `${item.name}:${item.value}`
item._name = item.name
})
this.imageList.splice(0, this.imageList.length, ...data)
......
......@@ -672,6 +672,7 @@
</template>
<template v-else>
<div class="bk-dropdown-box" style="width: 375px;">
{{curContainer.webCache.imageName}}
<bk-combox
style="width: 325px;"
type="text"
......@@ -2656,6 +2657,7 @@
// 兼容原数据webcache
container.webCache.imageName = container.imageName
debugger
delete container.imageName
container.webCache.env_list = []
......@@ -3457,7 +3459,7 @@
// 利用setTimeout事件来先让当前容器的blur事件执行完才切换
setTimeout(() => {
// 切换container
this.resetPreContainerParams()
// this.resetPreContainerParams()
container.ports.forEach(port => {
if (!port.protocol) {
port.protocol = 'TCP'
......@@ -3815,7 +3817,7 @@
const data = res.data
setTimeout(() => {
data.forEach(item => {
item._id = item.value
item._id = `${item.name}:${item.value}`
item._name = item.name
})
this.imageList.splice(0, this.imageList.length, ...data)
......
......@@ -3123,7 +3123,7 @@
// 利用setTimeout事件来先让当前容器的blur事件执行完才切换
setTimeout(() => {
// 切换container
this.resetPreContainerParams()
// this.resetPreContainerParams()
this.renderImageIndex++
this.curContainer = container
this.curContainerIndex = index
......@@ -3686,7 +3686,7 @@
const data = res.data
setTimeout(() => {
data.forEach(item => {
item._id = item.value
item._id = `${item.name}:${item.value}`
item._name = item.name
})
this.imageList.splice(0, this.imageList.length, ...data)
......
......@@ -3320,7 +3320,7 @@
// 利用setTimeout事件来先让当前容器的blur事件执行完才切换
setTimeout(() => {
// 切换container
this.resetPreContainerParams()
// this.resetPreContainerParams()
this.renderImageIndex++
this.curContainer = container
this.curContainerIndex = index
......@@ -3883,7 +3883,7 @@
const data = res.data
setTimeout(() => {
data.forEach(item => {
item._id = item.value
item._id = `${item.name}:${item.value}`
item._name = item.name
})
this.imageList.splice(0, this.imageList.length, ...data)
......
......@@ -2416,7 +2416,7 @@
setCurContainer (container, index) {
// 利用setTimeout事件来先让当前容器的blur事件执行完才切换
setTimeout(() => {
this.resetPreContainerParams()
// this.resetPreContainerParams()
// 保存当前container数据
const httpHeaders = this.$refs.headerKeyer.getKeyObject()
this.curContainer.healthChecks[0].http.headers = httpHeaders
......@@ -2749,7 +2749,7 @@
const data = res.data
setTimeout(() => {
data.forEach(item => {
item._id = item.value
item._id = `${item.name}:${item.value}`
item._name = item.name
})
this.imageList.splice(0, this.imageList.length, ...data)
......
......@@ -197,9 +197,11 @@
limit: limit,
projectId: this.projectId
}
if (this.$route.query.public) {
params.is_public = true
}
try {
const res = await this.$store.dispatch('depot/getImageLibraryDetail', params)
if (this.showScrollLoading) {
this.hasNext = res.data.has_next
this.hasPrevious = res.data.has_previous
......
......@@ -257,9 +257,3 @@
}
}
}
.biz-actions {
position: absolute;
right: 20px;
top: 19px;
}
......@@ -5,7 +5,7 @@
{{$t('公共镜像')}}
</div>
<div class="biz-actions">
<a :href="PROJECT_CONFIG.doc.harborGuide" target="_blank" class="bk-text-button ml10">{{$t('如何推镜像?')}}</a>
<a :href="PROJECT_CONFIG.doc.harborGuide" target="_blank" class="bk-text-button ml10 mb10">{{$t('如何推镜像?')}}</a>
</div>
</div>
<div class="biz-content-wrapper" style="padding: 0;" v-bkloading="{ isLoading: isInitLoading, opacity: 0.1 }">
......@@ -171,6 +171,9 @@
name: 'imageDetail',
params: {
repo: item.repo
},
query: {
public: true
}
})
},
......
......@@ -288,12 +288,6 @@
}
}
.biz-actions {
position: absolute;
right: 20px;
top: 19px;
}
.biz-project-image-dialog {
.bk-dialog-tool {
position: absolute;
......
......@@ -4,8 +4,8 @@
<div class="biz-project-image-title">
{{$t('项目镜像')}}
</div>
<div class="biz-actions">
<a :href="PROJECT_CONFIG.doc.harborGuide" target="_blank" class="bk-text-button ml10">{{$t('如何推镜像?')}}</a>
<div class="biz-actions" style="top: 0;">
<a :href="PROJECT_CONFIG.doc.harborGuide" target="_blank" class="bk-text-button ml10 mb10">{{$t('如何推镜像?')}}</a>
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment