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
9 changes: 9 additions & 0 deletions ui/src/components/view/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ export default {
methods: {
execAction (action) {
action.resource = this.resource
const record = this.resource || this.item

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing this file, can we just hide the disableOutOfBandManagementForHost button in hosts.js when host HA is enabled?

if (action?.api === 'disableOutOfBandManagementForHost' && (record?.hostha?.haenable === true || record?.hastate === 'Enabled')) {
Comment on lines 179 to +181
this.$notification.error({
message: this.$t('label.error'),
description: 'Please disable High Availability (HA) on this host before disabling Out-of-Band Management (OOBM).',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: hardcoded English string here instead of $t(), rest of the UI runs user-facing messages through i18n.

duration: 0
})
return
}
if (action.docHelp) {
action.docHelp = this.$applyDocHelpMappings(action.docHelp)
}
Expand Down
20 changes: 12 additions & 8 deletions ui/src/components/view/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,7 @@
<template v-if="column.key === 'usageType'">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chinmay048 please remove the unrelated changes from this file.

{{ usageTypeMap[record.usagetype] }}
</template>

<template v-if="column.key === 'clustername'">
<template v-if="column.key === 'clustername'">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this line lost its indentation, looks like an accidental de-indent (surrounding <template> blocks are indented 6 spaces).

<router-link :to="{ path: '/cluster/' + record.clusterid }">{{ text }}</router-link>
</template>
<template v-if="column.key === 'objectstore'">
Expand Down Expand Up @@ -693,16 +692,21 @@
<template v-if="text">
<template v-if="!text.startsWith('PrjAcct-')">
<router-link
v-if="$route.path.startsWith('/quotasummary') && $router.resolve(`${$route.path}/${record.accountid}`).matched[0].redirect !== '/exception/404'"
v-if="$route.path.startsWith('/quotasummary')"
:to="{ path: `${$route.path}/${record.accountid}` }">{{ text }}</router-link>
Comment on lines 694 to 696
<span v-else>{{ text }}</span>
</template>
<template v-else>
<router-link v-else-if="record.accountid" :to="{ path: '/account/' + record.accountid }">{{ text }}</router-link>
<router-link
v-if="$route.path.startsWith('/quotasummary') && $router.resolve(`${$route.path}/${record.accountid}`).matched[0].redirect !== '/exception/404'"
:to="{ path: `${$route.path}/${record.accountid}` }">{{ (record.projectname || record.account).concat(' (').concat($t('label.project')).concat(')') }}</router-link>
v-else-if="$store.getters.userInfo.roletype !== 'User'"
:to="{ path: '/account', query: { name: record.account, domainid: record.domainid, dataView: true } }">
{{ text }}
</router-link>
<span v-else>{{ text }}</span>
Comment on lines 692 to 703
</template>
<template v-else-if="$route.path.startsWith('/quotasummary')">
<router-link :to="{ path: `${$route.path}/${record.accountid}` }">
{{ (record.projectname || record.account).concat(' (').concat($t('label.project')).concat(')') }}
</router-link>
</template>
</template>
</template>
<template v-if="column.key === 'resource'">
Expand Down
15 changes: 13 additions & 2 deletions ui/src/config/section/infra/hosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,12 @@ export default {
message: 'label.ha.configure',
docHelp: 'adminguide/reliability.html#ha-for-hosts',
dataView: true,
show: (record) => { return ['KVM', 'Simulator'].includes(record.hypervisor) },
show: (record) => {
if (record.hypervisor === 'KVM') {
return Boolean(record?.outofbandmanagement?.enabled)
}
return record.hypervisor === 'Simulator'
},
Comment on lines +258 to +263
Comment on lines +258 to +263

@winterhazel winterhazel Jul 21, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
show: (record) => {
if (record.hypervisor === 'KVM') {
return Boolean(record?.outofbandmanagement?.enabled)
}
return record.hypervisor === 'Simulator'
},
show: (record) => { return record?.outofbandmanagement?.enabled === true && ['KVM', 'Simulator'].includes(record.hypervisor) },

args: ['hostid', 'provider'],
mapping: {
hostid: {
Expand All @@ -274,7 +279,13 @@ export default {
docHelp: 'adminguide/reliability.html#ha-for-hosts',
dataView: true,
show: (record) => {
return record.hypervisor !== 'External' && !(record?.hostha?.haenable === true)
if (record.hypervisor === 'External' || record?.hostha?.haenable === true) {
return false
}
if (record.hypervisor === 'KVM') {
return Boolean(record?.outofbandmanagement?.enabled)
}
Comment on lines +285 to +287
return true
Comment on lines +282 to +288

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (record.hypervisor === 'External' || record?.hostha?.haenable === true) {
return false
}
if (record.hypervisor === 'KVM') {
return Boolean(record?.outofbandmanagement?.enabled)
}
return true
return record.hypervisor !== 'External' && record?.outofbandmanagement?.enabled === true && !(record?.hostha?.haenable === true)

},
args: ['hostid'],
mapping: {
Expand Down
Loading