Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion ui/src/components/header/AutoAlertBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@
<a-button size="small" @click.stop="goToAlertRulesMenu">
{{ tr('label.goto.the.alertRules') }}
</a-button>

<a-button
size="small"
type="text"
:aria-label="tr('label.close')"
@click.stop="markAllAsRead"
>
<template #icon>
<CloseOutlined />
</template>
</a-button>
</a-space>
</div>
</div>
Expand Down Expand Up @@ -643,7 +654,7 @@ import {
nextTick,
getCurrentInstance
} from 'vue'
import { ExclamationCircleFilled, SoundOutlined, PauseCircleOutlined, LinkOutlined } from '@ant-design/icons-vue'
import { ExclamationCircleFilled, SoundOutlined, PauseCircleOutlined, LinkOutlined, CloseOutlined } from '@ant-design/icons-vue'
import { message } from 'ant-design-vue'
import { api } from '@/api'
import MarkdownIt from 'markdown-it'
Expand All @@ -656,6 +667,7 @@ export default {
SoundOutlined,
PauseCircleOutlined,
LinkOutlined,
CloseOutlined,
RuleSilenceModal: defineAsyncComponent(() => import('@/views/infra/RuleSilenceModal.vue')),
RulePauseModal: defineAsyncComponent(() => import('@/views/infra/RulePauseModal.vue'))
},
Expand Down
9 changes: 8 additions & 1 deletion ui/src/components/page/GlobalLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,13 @@ body.dark-mode .banner-spacer::before {
/* 배너 높이만큼 밑으로 내려서 겹치지 않게 처리 */
top: calc(24px + var(--autoBannerHeight, 0px)) !important;
}

/* 일반 모달은 최상단 경고 배너보다 항상 위에 렌더링 */
.ant-modal-root,
.ant-modal-mask,
.ant-modal-wrap {
z-index: 2147483655 !important;
}
@media (max-width: 768px) {
/* 1. 사이드바를 공중에 띄워서 공간 차지를 못하게 만듦 */
.ant-layout.layout.mobile .sticky-sidebar {
Expand All @@ -551,7 +558,7 @@ body.dark-mode .banner-spacer::before {
font-size: 0; /* 글자 크기 0으로 숨김 */
}

/* 3. ★ 아이콘 심폐소생술 (여기가 중요!) ★ */
/* 3. ★ 아이콘 조정 */
/* .anticon: 번역 아이콘 등 / .ant-avatar: 사용자 프로필 */
.user-menu .action .anticon,
.user-menu .action .ant-avatar {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/view/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ export default {
},
handleContextAction (action) {
this.closeContextQuickView()
this.$parent.execAction(action)
this.$parent.execAction(action, false)
},
generateRowKeyValue (record) {
return record.uid || (record.metadata && record.metadata.rule_uid) || record.id || record.name || record.usageType
Expand Down
26 changes: 18 additions & 8 deletions ui/src/views/AutogenView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</a-affix>

<div v-show="showAction">
<keep-alive v-if="currentAction.component && (!currentAction.groupAction || selectedRowKeys.length === 0 || (this.selectedRowKeys.length > 0 && currentAction.api === 'destroyVirtualMachine'))">
<keep-alive v-if="currentAction.component && (!currentAction.invokedAsGroupAction || (this.selectedRowKeys.length > 0 && currentAction.api === 'destroyVirtualMachine'))">
<a-modal
:visible="showAction"
:closable="true"
Expand Down Expand Up @@ -418,7 +418,7 @@
:maskClosable="false"
:footer="null"
style="top: 20px;"
:width="currentAction.groupAction ? modalWidth : '30vw'"
:width="currentAction.invokedAsGroupAction ? modalWidth : '30vw'"
:ok-button-props="getOkProps()"
ok-text="111"
:cancel-button-props="getCancelProps()"
Expand All @@ -438,7 +438,7 @@
</template>
<a-spin :spinning="actionLoading" v-ctrl-enter="handleSubmit">
<span v-if="currentAction.message">
<div v-if="selectedRowKeys.length > 0 && currentAction.groupAction">
<div v-if="selectedRowKeys.length > 0 && currentAction.invokedAsGroupAction">
<a-alert
v-if="['delete-outlined', 'DeleteOutlined', 'poweroff-outlined', 'PoweroffOutlined'].includes(currentAction.icon)"
type="error">
Expand All @@ -462,7 +462,7 @@
</template>
</a-alert>
</div>
<div v-if="selectedRowKeys.length > 0 && currentAction.groupAction">
<div v-if="selectedRowKeys.length > 0 && currentAction.invokedAsGroupAction">
<a-divider />
<a-table
v-if="selectedRowKeys.length > 0"
Expand Down Expand Up @@ -990,6 +990,13 @@ export default {
},
'$store.getters.listAllProjects' (oldVal, newVal) {
this.fetchData()
},
showAction (visible) {
if (visible) {
this.clearAutoRefresh()
} else if (!this.dataView) {
this.scheduleAutoRefresh()
}
}
},
computed: {
Expand Down Expand Up @@ -1091,7 +1098,7 @@ export default {
return 'inline-flex'
},
getOkProps () {
if (this.selectedRowKeys.length > 0 && this.currentAction?.groupAction) {
if (this.selectedRowKeys.length > 0 && this.currentAction?.invokedAsGroupAction) {
} else {
return { props: { type: 'primary' } }
}
Expand Down Expand Up @@ -1137,7 +1144,7 @@ export default {
downloadLink.click()
},
getCancelProps () {
if (this.selectedRowKeys.length > 0 && this.currentAction?.groupAction) {
if (this.selectedRowKeys.length > 0 && this.currentAction?.invokedAsGroupAction) {
return { props: { type: 'primary' } }
} else {
return { props: { type: 'default' } }
Expand Down Expand Up @@ -1589,7 +1596,10 @@ export default {
this.$router.push({ name: action.api, query })
return
}
this.currentAction = action
this.currentAction = {
...action,
invokedAsGroupAction: !!isGroupAction
}
this.currentAction.params = store.getters.apis[this.currentAction.api].params
this.resource = action.resource
this.$emit('change-resource', this.resource)
Expand Down Expand Up @@ -1855,7 +1865,7 @@ export default {
handleSubmit (e) {
if (this.actionLoading) return
this.promises = []
if (!this.dataView && this.currentAction.groupAction && this.selectedRowKeys.length > 0) {
if (!this.dataView && this.currentAction.invokedAsGroupAction && this.selectedRowKeys.length > 0) {
if (this.selectedRowKeys.length > 0) {
this.bulkColumns = this.chosenColumns
this.selectedItems = this.selectedItems.map(v => ({ ...v, status: 'InProgress' }))
Expand Down
Loading