Skip to content

Commit 16b8755

Browse files
committed
Merge pull request #802 from stardom3645/ablestack-diplo-wall-update-20250924
[경고 규칙] UI 버그 수정 및 개선(1.긴 모달 짤림, 2.최상단배너 닫힘 버튼 생성, 3.액션 기능 버그)
1 parent 22c1338 commit 16b8755

4 files changed

Lines changed: 40 additions & 13 deletions

File tree

ui/src/components/header/AutoAlertBanner.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@
5050
<a-button size="small" @click.stop="goToAlertRulesMenu">
5151
{{ tr('label.goto.the.alertRules') }}
5252
</a-button>
53+
54+
<a-button
55+
size="small"
56+
type="text"
57+
:aria-label="tr('label.close')"
58+
@click.stop="markAllAsRead"
59+
>
60+
<template #icon>
61+
<CloseOutlined />
62+
</template>
63+
</a-button>
5364
</a-space>
5465
</div>
5566
</div>
@@ -643,7 +654,7 @@ import {
643654
nextTick,
644655
getCurrentInstance
645656
} from 'vue'
646-
import { ExclamationCircleFilled, SoundOutlined, PauseCircleOutlined, LinkOutlined } from '@ant-design/icons-vue'
657+
import { ExclamationCircleFilled, SoundOutlined, PauseCircleOutlined, LinkOutlined, CloseOutlined } from '@ant-design/icons-vue'
647658
import { message } from 'ant-design-vue'
648659
import { getAPI } from '@/api'
649660
import MarkdownIt from 'markdown-it'
@@ -656,6 +667,7 @@ export default {
656667
SoundOutlined,
657668
PauseCircleOutlined,
658669
LinkOutlined,
670+
CloseOutlined,
659671
RuleSilenceModal: defineAsyncComponent(() => import('@/views/infra/RuleSilenceModal.vue')),
660672
RulePauseModal: defineAsyncComponent(() => import('@/views/infra/RulePauseModal.vue'))
661673
},

ui/src/components/page/GlobalLayout.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,13 @@ body.dark-mode .banner-spacer::before {
527527
/* 배너 높이만큼 밑으로 내려서 겹치지 않게 처리 */
528528
top: calc(24px + var(--autoBannerHeight, 0px)) !important;
529529
}
530+
531+
/* 일반 모달은 최상단 경고 배너보다 항상 위에 렌더링 */
532+
.ant-modal-root,
533+
.ant-modal-mask,
534+
.ant-modal-wrap {
535+
z-index: 2147483655 !important;
536+
}
530537
@media (max-width: 768px) {
531538
/* 1. 사이드바를 공중에 띄워서 공간 차지를 못하게 만듦 */
532539
.ant-layout.layout.mobile .sticky-sidebar {
@@ -551,7 +558,7 @@ body.dark-mode .banner-spacer::before {
551558
font-size: 0; /* 글자 크기 0으로 숨김 */
552559
}
553560
554-
/* 3. ★ 아이콘 심폐소생술 (여기가 중요!) ★ */
561+
/* 3. ★ 아이콘 조정 */
555562
/* .anticon: 번역 아이콘 등 / .ant-avatar: 사용자 프로필 */
556563
.user-menu .action .anticon,
557564
.user-menu .action .ant-avatar {

ui/src/components/view/ListView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ export default {
14321432
},
14331433
handleContextAction (action) {
14341434
this.closeContextQuickView()
1435-
this.$parent.execAction(action)
1435+
this.$parent.execAction(action, false)
14361436
},
14371437
generateRowKeyValue (record) {
14381438
return record.uid || (record.metadata && record.metadata.rule_uid) || record.id || record.name || record.usageType

ui/src/views/AutogenView.vue

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@
166166
</a-affix>
167167

168168
<div v-show="showAction">
169-
<keep-alive
170-
v-if="currentAction.component && (!currentAction.groupAction || selectedRowKeys.length === 0 || (this.selectedRowKeys.length > 0 && currentAction.api === 'destroyVirtualMachine'))"
171-
>
169+
<keep-alive v-if="currentAction.component && (!currentAction.invokedAsGroupAction || (this.selectedRowKeys.length > 0 && currentAction.api === 'destroyVirtualMachine'))">
172170
<a-modal
173171
:visible="showAction"
174172
:closable="true"
@@ -447,7 +445,7 @@
447445
:maskClosable="false"
448446
:footer="null"
449447
style="top: 20px;"
450-
:width="currentAction.groupAction ? modalWidth : '30vw'"
448+
:width="currentAction.invokedAsGroupAction ? modalWidth : '30vw'"
451449
:ok-button-props="getOkProps()"
452450
ok-text="111"
453451
:cancel-button-props="getCancelProps()"
@@ -471,7 +469,7 @@
471469
v-ctrl-enter="handleSubmit"
472470
>
473471
<span v-if="currentAction.message">
474-
<div v-if="selectedRowKeys.length > 0 && currentAction.groupAction">
472+
<div v-if="selectedRowKeys.length > 0 && currentAction.invokedAsGroupAction">
475473
<a-alert
476474
v-if="['delete-outlined', 'DeleteOutlined', 'poweroff-outlined', 'PoweroffOutlined'].includes(currentAction.icon)"
477475
type="error"
@@ -499,7 +497,7 @@
499497
</template>
500498
</a-alert>
501499
</div>
502-
<div v-if="selectedRowKeys.length > 0 && currentAction.groupAction">
500+
<div v-if="selectedRowKeys.length > 0 && currentAction.invokedAsGroupAction">
503501
<a-divider />
504502
<a-table
505503
v-if="selectedRowKeys.length > 0"
@@ -1127,6 +1125,13 @@ export default {
11271125
},
11281126
'$store.getters.listAllProjects' (oldVal, newVal) {
11291127
this.fetchData()
1128+
},
1129+
showAction (visible) {
1130+
if (visible) {
1131+
this.clearAutoRefresh()
1132+
} else if (!this.dataView) {
1133+
this.scheduleAutoRefresh()
1134+
}
11301135
}
11311136
},
11321137
computed: {
@@ -1259,7 +1264,7 @@ export default {
12591264
return 'inline-flex'
12601265
},
12611266
getOkProps () {
1262-
if (this.selectedRowKeys.length > 0 && this.currentAction?.groupAction) {
1267+
if (this.selectedRowKeys.length > 0 && this.currentAction?.invokedAsGroupAction) {
12631268
} else {
12641269
return { props: { type: 'primary' } }
12651270
}
@@ -1305,7 +1310,7 @@ export default {
13051310
downloadLink.click()
13061311
},
13071312
getCancelProps () {
1308-
if (this.selectedRowKeys.length > 0 && this.currentAction?.groupAction) {
1313+
if (this.selectedRowKeys.length > 0 && this.currentAction?.invokedAsGroupAction) {
13091314
return { props: { type: 'primary' } }
13101315
} else {
13111316
return { props: { type: 'default' } }
@@ -1771,7 +1776,10 @@ export default {
17711776
this.$router.push({ name: action.api, query })
17721777
return
17731778
}
1774-
this.currentAction = action
1779+
this.currentAction = {
1780+
...action,
1781+
invokedAsGroupAction: !!isGroupAction
1782+
}
17751783
this.currentAction.params = store.getters.apis[this.currentAction.api].params
17761784
this.resource = action.resource
17771785
this.$emit('change-resource', this.resource)
@@ -2057,7 +2065,7 @@ export default {
20572065
handleSubmit (e) {
20582066
if (this.actionLoading) return
20592067
this.promises = []
2060-
if (!this.dataView && this.currentAction.groupAction && this.selectedRowKeys.length > 0) {
2068+
if (!this.dataView && this.currentAction.invokedAsGroupAction && this.selectedRowKeys.length > 0) {
20612069
if (this.selectedRowKeys.length > 0) {
20622070
this.bulkColumns = this.chosenColumns
20632071
this.selectedItems = this.selectedItems.map(v => ({ ...v, status: 'InProgress' }))

0 commit comments

Comments
 (0)