Skip to content

Commit 7b4db06

Browse files
committed
Merge branch 'ablestack-diplo' of https://github.com/ablecloud-team/ablestack-cloud into ablestack-diplo
2 parents 64ba390 + f404f8a commit 7b4db06

5 files changed

Lines changed: 50 additions & 18 deletions

File tree

scripts/util/update-mold-theme-from-license.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ config_path="/usr/share/cloudstack-management/webapp/config.json"
55
# ko_path="/usr/share/cloudstack-management/webapp/locales/ko_KR.json"
66
# en_path="/usr/share/cloudstack-management/webapp/locales/en.json"
77

8-
if [ "ablestack" == "$type" ]; then
8+
if [ "ABLESTACK" == "$type" ]; then
99

1010
echo "ABLECLOUD ABLESTACK Mold 테마 설정 중...."
1111

@@ -36,7 +36,7 @@ if [ "ablestack" == "$type" ]; then
3636

3737
echo "ABLECLOUD ABLESTACK Mold 테마 설정 완료!"
3838

39-
elif [ "clostack" == "$type" ]; then
39+
elif [ "Clostack" == "$type" ]; then
4040

4141
echo "CLOIT CLOSTACK Mold 테마 설정 중...."
4242

@@ -67,8 +67,8 @@ elif [ "clostack" == "$type" ]; then
6767

6868
echo "CLOIT CLOSTACK Mold 테마 설정 완료!"
6969

70-
elif [ "hv" == "$type" ]; then
71-
echo "효성 UCP HV Mold 테마 설정 중...."
70+
elif [ "UCP HV powered by ABLESTACK" == "$type" ]; then
71+
echo "효성인포메이션시스템 UCP HV Mold 테마 설정 중...."
7272

7373
# 로고 파일 변경
7474
sed -i "/\"logo\"/ c\ \"logo\": \"assets/logo-hv.png\"," $config_path
@@ -95,6 +95,6 @@ elif [ "hv" == "$type" ]; then
9595
sed -i "/\"@mini-logo-magin-top\"/ c\ \"@mini-logo-magin-top\": \"8px\"," $config_path
9696
sed -i "/\"@mini-logo-magin-bottom\"/ c\ \"@mini-logo-magin-bottom\": \"8px\"," $config_path
9797

98-
echo "효성 UCP HV Mold 테마 설정 완료!"
98+
echo "효성인포메이션시스템 UCP HV Mold 테마 설정 완료!"
9999

100100
fi

ui/public/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4798,5 +4798,6 @@
47984798
"state.deytroying" : "Deleting",
47994799
"state.scheduled" : "Scheduled",
48004800
"state.started" : "Started",
4801-
"message.delete.device.allocation": "Unassigning devices in virtual machines"
4801+
"message.delete.device.allocation": "Unassigning devices in virtual machines",
4802+
"message.cannot.remove.device.vm.running": "Running virtual machines cannot be removed"
48024803
}

ui/public/locales/ko_KR.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4797,5 +4797,6 @@
47974797
"state.backingup": "\ubc31\uc5c5 \uc911",
47984798
"state.destroying": "\uc0ad\uc81c \uc911",
47994799
"state.scheduled" : "\uc608\uc815\ub428",
4800-
"state.started" : "\uc2dc\uc791"
4800+
"state.started" : "\uc2dc\uc791",
4801+
"message.cannot.remove.device.vm.running": "\uc2e4\ud589 \uc911\uc778 \uac00\uc0c1\uba38\uc2e0\uc740 \ub514\ubc14\uc774\uc2a4\ub97c \ud574\uc81c\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."
48014802
}

ui/src/views/infra/ListHostDevicesTab.vue

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ export default {
374374
openModal (record) {
375375
this.selectedResource = { ...this.resource, hostDevicesName: record.hostDevicesName }
376376
this.showAddModal = true
377+
this.$nextTick(() => {
378+
if (this.$refs.hostDevicesTransfer) {
379+
this.$refs.hostDevicesTransfer.refreshVMList()
380+
}
381+
})
377382
},
378383
closeAction () {
379384
this.showAddModal = false
@@ -619,6 +624,16 @@ export default {
619624
details: 'all'
620625
})
621626
const vm = vmResponse?.listvirtualmachinesresponse?.virtualmachine?.[0]
627+
if (vm && vm.state === 'Running') {
628+
this.$notification.warning({
629+
message: this.$t('label.warning'),
630+
description: this.$t('message.cannot.remove.device.vm.running')
631+
})
632+
this.showPciDeleteModal = false
633+
this.selectedPciDevice = null
634+
this.pciConfigs = {}
635+
return
636+
}
622637
623638
const params = {
624639
id: vm.id
@@ -668,10 +683,28 @@ export default {
668683
this.pciConfigs = {}
669684
},
670685
showConfirmModal (device) {
671-
console.log('Selected device:', device)
672-
console.log('VM Names:', this.vmNames)
673-
this.selectedPciDevice = device
674-
this.showPciDeleteModal = true
686+
if (device.virtualmachineid) {
687+
api('listVirtualMachines', {
688+
id: device.virtualmachineid,
689+
listall: true
690+
}).then(response => {
691+
const vm = response?.listvirtualmachinesresponse?.virtualmachine?.[0]
692+
if (vm && vm.state === 'Running') {
693+
this.$notification.warning({
694+
message: this.$t('label.warning'),
695+
description: this.$t('message.cannot.remove.device.vm.running')
696+
})
697+
return
698+
}
699+
this.selectedPciDevice = device
700+
this.showPciDeleteModal = true
701+
}).catch(error => {
702+
this.$notifyError(error)
703+
})
704+
} else {
705+
this.selectedPciDevice = device
706+
this.showPciDeleteModal = true
707+
}
675708
},
676709
async updateDataWithVmNames () {
677710
try {

ui/src/views/storage/HostDevicesTransfer.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ export default {
110110
}).then(detailResponse => {
111111
const vmDetails = detailResponse.listvirtualmachinesresponse.virtualmachine[0]
112112
113-
// XML 형식이 아닌 extraconfig 제거
114113
if (vmDetails.details) {
115114
const filteredDetails = {}
116115
Object.entries(vmDetails.details).forEach(([key, value]) => {
@@ -140,13 +139,12 @@ export default {
140139
}
141140
142141
this.virtualmachines = detailedVms.filter(vm => {
143-
if (latestAllocatedVmIds.has(vm.id.toString()) &&
144-
vm.details?.['extraconfig-1']?.toLowerCase().includes('usb') ||
145-
vm.details?.['extraconfig-1']?.toLowerCase().includes('disk type=\'block\' device=\'lun\'')) {
146-
return false
142+
if (vm.state === 'Running') {
143+
return true
147144
}
148-
return true
145+
return false
149146
})
147+
console.log('Filtered VMs for allocation (All Running VMs):', this.virtualmachines.length)
150148
})
151149
}).catch(error => {
152150
this.$notifyError(error.message || 'Failed to fetch VMs')
@@ -202,7 +200,6 @@ export default {
202200
[`details[0].extraconfig-${nextConfigNum}`]: xmlConfig
203201
}
204202
205-
// 기존 XML 설정만 유지
206203
Object.entries(details).forEach(([key, value]) => {
207204
if (key.startsWith('extraconfig-') && value.includes('<hostdev')) {
208205
params[`details[0].${key}`] = value

0 commit comments

Comments
 (0)