mirror of
https://gitee.com/goploy/goploy.git
synced 2024-11-29 18:57:59 +08:00
load namespace list when the page opened
This commit is contained in:
parent
04843c0fff
commit
d171343857
@ -4,7 +4,6 @@
|
||||
class="navbar-namespace"
|
||||
trigger="click"
|
||||
placement="bottom"
|
||||
@visible-change="handleNamespaceVisible"
|
||||
@command="handleNamespaceChange"
|
||||
>
|
||||
<el-row align="middle">
|
||||
@ -238,18 +237,18 @@ function showTransformDialog(type: string) {
|
||||
transformType.value = type
|
||||
}
|
||||
|
||||
function handleNamespaceVisible(visible: boolean) {
|
||||
if (visible === true) {
|
||||
namespaceListLoading.value = true
|
||||
new NamespaceOption()
|
||||
.request()
|
||||
.then((response) => {
|
||||
namespaceList.value = response.data.list
|
||||
})
|
||||
.finally(() => {
|
||||
namespaceListLoading.value = false
|
||||
})
|
||||
}
|
||||
getNamespaceList()
|
||||
|
||||
function getNamespaceList() {
|
||||
namespaceListLoading.value = true
|
||||
new NamespaceOption()
|
||||
.request()
|
||||
.then((response) => {
|
||||
namespaceList.value = response.data.list
|
||||
})
|
||||
.finally(() => {
|
||||
namespaceListLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
function handleNamespaceChange(namespace: NamespaceUserData) {
|
||||
|
@ -231,7 +231,7 @@
|
||||
<el-row
|
||||
v-loading="traceLoading"
|
||||
class="project-detail"
|
||||
style="flex: 1; align-content: flex-start"
|
||||
style="flex: 1; padding: 0 10px; align-content: flex-start"
|
||||
:style="{
|
||||
width: '100%',
|
||||
alignContent: 'flex-start',
|
||||
|
@ -765,15 +765,15 @@ function publish(data: ProjectData) {
|
||||
const id = data.id
|
||||
let color = ''
|
||||
if (data.environment === 1) {
|
||||
color = 'color: #F56C6C'
|
||||
color = 'color: var(--el-color-danger)'
|
||||
} else if (data.environment === 3) {
|
||||
color = 'color: #E6A23C'
|
||||
color = 'color: var(--el-color-warning)'
|
||||
} else {
|
||||
color = 'color: #909399'
|
||||
color = 'color: var(--el-color-info)'
|
||||
}
|
||||
ElMessageBox.confirm('', t('tips'), {
|
||||
message: h('p', null, [
|
||||
h('span', null, 'Deploy Project: '),
|
||||
h('span', null, 'Deploy: '),
|
||||
h(
|
||||
'b',
|
||||
{ style: color },
|
||||
|
Loading…
Reference in New Issue
Block a user