Skip to content

Commit

Permalink
fix(xo-web/SR/new): fix reattach button not displayed for HBA
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRA committed Sep 12, 2024
1 parent 74e6fa2 commit f72eef0
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions packages/xo-web/src/xo-app/new/sr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,22 +281,7 @@ export default class New extends Component {
srUuid
),
smb: () => createSrSmb(host.id, name.value, description.value, server.value, username.value, password.value),
hba: async () => {
if (srUuid === undefined) {
const previous = await probeSrHbaExists(host.id, scsiId)
if (previous && previous.length > 0) {
try {
await confirm({
title: _('existingLunModalTitle'),
body: <p>{_('existingLunModalText')}</p>,
})
} catch (error) {
return
}
}
}
return createSrHba(host.id, name.value, description.value, scsiId, srUuid)
},
hba: async () => createSrHba(host.id, name.value, description.value, scsiId, srUuid),
iscsi: async () => {
if (srUuid === undefined) {
const previous = await probeSrIscsiExists(
Expand Down Expand Up @@ -415,6 +400,7 @@ export default class New extends Component {

_handleSrHbaSelection = async scsiId => {
this.setState({
existingSrs: await probeSrHbaExists(this.state.host.id, scsiId),
scsiId,
usage: true,
})
Expand Down

0 comments on commit f72eef0

Please sign in to comment.