Skip to content

Commit f5fc2b9

Browse files
authored
Merge pull request #652 from jschoiRR/mold-main#2025
[Mold UI] 클러스터 목록/상세, 호스트 목록/상세 화면에서 HA활성화 정보 표시
2 parents 83ee8ce + 8d22d71 commit f5fc2b9

8 files changed

Lines changed: 32 additions & 6 deletions

File tree

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,6 +4465,7 @@
44654465
"physical.ovscontroller.add": "PHYSICAL.OVSCONTROLLER.ADD",
44664466
"physical.ovscontroller.delete": "PHYSICAL.OVSCONTROLLER.DELETE",
44674467
"cluster.drs.generate": "CLUSTER.DRS.GENERATE",
4468+
"cluster.drs": "CLUSTER.DRS",
44684469
"counter.create": "COUNTER.CREATE",
44694470
"counter.delete": "COUNTER.DELETE",
44704471
"condition.create": "CONDITION.CREATE",

ui/public/locales/ko_KR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,6 +4465,7 @@
44654465
"physical.ovscontroller.add": "\ubb3c\ub9ac OVS\ucee8\ud2b8\ub864\ub7ec \ucd94\uac00",
44664466
"physical.ovscontroller.delete": "\ubb3c\ub9ac OVSC\ucee8\ud2b8\ub864\ub7ec \uc0ad\uc81c",
44674467
"cluster.drs.generate": "\ud074\ub7ec\uc2a4\ud130 DRS \uc0dd\uc131",
4468+
"cluster.drs": "\ud074\ub7ec\uc2a4\ud130 DRS",
44684469
"counter.create": "\uce74\uc6b4\ud130 \uc0dd\uc131",
44694470
"counter.delete": "\uce74\uc6b4\ud130 \uc0ad\uc81c",
44704471
"condition.create": "\uc870\uac74 \uc0dd\uc131",

ui/src/components/view/DetailsTab.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@
167167
<div v-else>{{ dataResource[item] }}</div>
168168
</div>
169169
</a-list-item>
170+
<a-list-item v-else-if="['cluster', 'zone'].includes($route.meta.name) && item === 'haenable'">
171+
<div>
172+
<strong>{{ $t('label.ha.enable') }}</strong>
173+
<br/>
174+
<div>{{ dataResource.resourcedetails.resourceHAEnabled }}</div>
175+
</div>
176+
</a-list-item>
170177
<a-list-item v-else-if="item === 'ip6address' && ipV6Address && ipV6Address.length > 0">
171178
<div>
172179
<strong>{{ $t('label.' + String(item).toLowerCase()) }}</strong>
@@ -420,6 +427,7 @@ export default {
420427
fetchDetails () {
421428
let details = this.$route.meta.details
422429
430+
console.log('details :>> ', details)
423431
if (!details) {
424432
return
425433
}

ui/src/components/view/InfoCard.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,19 @@
133133
<status class="status" :text="resource.resourcestate" displayText/>
134134
</div>
135135
</div>
136+
<div class="resource-detail-item" v-if="['cluster', 'zone'].includes($route.meta.name) && resource.resourcedetails">
137+
<div class="resource-detail-item__label">{{ $t('label.haenable') }}</div>
138+
<div class="resource-detail-item__details">
139+
<status class="status" :text="resource.resourcedetails.resourceHAEnabled === 'true' ? 'enabled' : 'disabled'" displayText/>
140+
</div>
141+
</div>
142+
<div class="resource-detail-item" v-if="$route.meta.name === 'host' && resource.hostha">
143+
<div class="resource-detail-item__label">{{ $t('label.haenable') }}</div>
144+
<div class="resource-detail-item__details">
145+
<status class="status" :text="resource.hostha.haenable === 'true' ? 'enabled' : 'disabled'" displayText/>
146+
<a-tag style="margin-left: 5px; margin-bottom: 5px;">{{ resource.hostha.hastate }}</a-tag>
147+
</div>
148+
</div>
136149
<div class="resource-detail-item" v-if="('success' in resource) && $route.meta.name === 'webhookdeliveries'">
137150
<div class="resource-detail-item__label">{{ $t('label.success') }}</div>
138151
<div class="resource-detail-item__details">

ui/src/components/view/ListView.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,13 @@
476476
{{ isNaN(text) ? text : (parseFloat(parseFloat(text) / 1024.0 / 1024.0 / 1024.0).toFixed(2) + ' GiB') }}
477477
</span>
478478
</template>
479+
<template v-if="['cluster', 'zone'].includes($route.meta.name) && column.key === 'haenable'">
480+
<status :text="record.resourcedetails.resourceHAEnabled === 'true' ? 'enabled' : 'disabled'" displayText/>
481+
</template>
479482
<template v-if="column.key === 'hastate'">
480483
<a-tag>{{ record.hostha.hastate }}</a-tag>
481484
</template>
482-
<template v-if="column.key === 'haenable'">
485+
<template v-if="$route.meta.name === 'host' && column.key === 'haenable'">
483486
<status :text="record.hostha.haenable ? 'enabled' : 'disabled'" displayText/>
484487
</template>
485488
<template v-if="['startdate', 'enddate'].includes(column.key) && ['quotasummary', 'usage'].includes($route.path.split('/')[1])">

ui/src/config/section/infra/clusters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default {
2626
permission: ['listClustersMetrics'],
2727
searchFilters: ['name', 'zoneid', 'podid', 'hypervisor'],
2828
columns: () => {
29-
const fields = ['name', 'state', 'allocationstate', 'clustertype', 'hypervisortype', 'hosts']
29+
const fields = ['name', 'state', 'allocationstate', 'clustertype', 'hypervisortype', 'hosts', 'haenable']
3030
const metricsFields = ['cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'drsimbalance']
3131
if (store.getters.metrics) {
3232
fields.push(...metricsFields)
@@ -35,7 +35,7 @@ export default {
3535
fields.push('zonename')
3636
return fields
3737
},
38-
details: ['name', 'id', 'allocationstate', 'clustertype', 'managedstate', 'arch', 'hypervisortype', 'podname', 'zonename', 'drsimbalance'],
38+
details: ['name', 'id', 'allocationstate', 'clustertype', 'managedstate', 'arch', 'hypervisortype', 'podname', 'zonename', 'drsimbalance', 'haenable'],
3939
related: [{
4040
name: 'host',
4141
title: 'label.hosts',

ui/src/config/section/infra/zones.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ export default {
2626
permission: ['listZonesMetrics'],
2727
searchFilters: ['name', 'domainid', 'tags'],
2828
columns: () => {
29-
const fields = ['name', 'allocationstate', 'type', 'networktype', 'clusters']
29+
const fields = ['name', 'allocationstate', 'type', 'networktype', 'clusters', 'haenable']
3030
const metricsFields = ['cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal']
3131
if (store.getters.metrics) {
3232
fields.push(...metricsFields)
3333
}
3434
fields.push('order')
3535
return fields
3636
},
37-
details: ['name', 'id', 'allocationstate', 'type', 'networktype', 'guestcidraddress', 'localstorageenabled', 'securitygroupsenabled', 'dns1', 'dns2', 'internaldns1', 'internaldns2', 'asnrange'],
37+
details: ['name', 'id', 'allocationstate', 'type', 'networktype', 'guestcidraddress', 'localstorageenabled', 'securitygroupsenabled', 'dns1', 'dns2', 'internaldns1', 'internaldns2', 'asnrange', 'haenable'],
3838
related: [{
3939
name: 'pod',
4040
title: 'label.pods',

ui/src/views/compute/wizard/SecurityGroupSelection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<div style="margin-top: 10px;">
2020
<label>{{ $t('message.select.security.groups') }}</label>
2121
<a-input-search
22-
style="width: 25vw; float: right; margin-bottom: 10px; z-index: 8;"
22+
style="float: right; margin-bottom: 10px; z-index: 8;"
2323
:placeholder="$t('label.search')"
2424
v-model:value="filter"
2525
@search="handleSearch" />

0 commit comments

Comments
 (0)