Skip to content

Commit 8b56a44

Browse files
authored
Merge pull request #580 from jschoiRR/mold-diplo-2024-main
[Mold UI] footer영역 이벤트 조회 호출 방식 변경(오픈버튼 클릭 시 이벤트 api 호출 시작, 닫기 버튼 클릭 시 api 호출 중지)
2 parents cd98eae + ed5f468 commit 8b56a44

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

ui/src/components/page/GlobalLayout.vue

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@
9494
</a-button>
9595
</div>
9696

97-
<event-sidebar :isVisible="isSidebarVisible" @update:isVisible="isSidebarVisible = $event" />
97+
<event-sidebar
98+
:isVisible="isSidebarVisible"
99+
ref="eventSidebar"
100+
@update:isVisible="isSidebarVisible = $event" />
98101

99102
<a-layout
100103
:class="[layoutMode, `content-width-${contentWidth}`]"
101-
:style="{ paddingLeft: contentPaddingLeft, minHeight: '100vh', paddingBottom: isSidebarVisible ? '300px' : '0' }"
102-
>
104+
:style="{ paddingLeft: contentPaddingLeft, minHeight: '100vh', paddingBottom: isSidebarVisible ? '300px' : '0' }">
103105
<a-affix style="z-index: 100">
104106
<global-header
105107
:style="this.$store.getters.shutdownTriggered ? 'margin-top: 25px;' : null"
@@ -108,23 +110,21 @@
108110
:theme="navTheme"
109111
:collapsed="collapsed"
110112
:device="device"
111-
@toggle="toggle"
112-
/>
113+
@toggle="toggle" />
113114
</a-affix>
114115

115116
<a-button
116-
v-if="showClear"
117-
type="default"
118-
size="small"
119-
class="button-clear-notification"
120-
@click="onClearNotification">{{ $t('label.clear.notification') }}</a-button>
117+
v-if="showClear"
118+
type="default"
119+
size="small"
120+
class="button-clear-notification"
121+
@click="onClearNotification">{{ $t('label.clear.notification') }}</a-button>
121122

122-
<!-- layout content -->
123+
<!-- layout content -->
123124
<a-layout-content
124125
class="layout-content"
125126
:class="{'is-header-fixed': fixedHeader}"
126-
:style="{ paddingBottom: isSidebarVisible ? '300' : '0' }"
127-
>
127+
:style="{ paddingBottom: isSidebarVisible ? '300' : '0' }">
128128
<slot></slot>
129129
</a-layout-content>
130130

@@ -252,7 +252,8 @@ export default {
252252
},
253253
methods: {
254254
toggleSidebar () {
255-
this.isSidebarVisible = !this.isSidebarVisible
255+
this.isSidebarVisible = true
256+
this.$refs.eventSidebar.openSiderBar()
256257
},
257258
...mapActions(['setSidebar']),
258259
toggle () {

ui/src/components/view/EventSidebar.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,12 @@ export default {
140140
}
141141
},
142142
created () {
143-
this.fetchEvents()
144-
this.refreshInterval = setInterval(this.fetchEvents, 5000)
145-
// console.log('EventsListBar:', this.$store.getters.globalSettings.EventsListBar)
146-
},
147-
unmounted () {
148-
clearInterval(this.refreshInterval)
149143
},
150144
methods: {
145+
openSiderBar () {
146+
this.fetchEvents()
147+
this.refreshInterval = setInterval(this.fetchEvents, 5000)
148+
},
151149
closeSidebar () {
152150
clearInterval(this.refreshInterval)
153151
this.$emit('update:isVisible', false)

0 commit comments

Comments
 (0)