Skip to content

Commit

Permalink
fixup! feat(xo-server/host): implement smartctl api call
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRA committed Sep 28, 2023
1 parent 7d4ed67 commit 8484283
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/xo-server/src/xapi/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,10 +1441,9 @@ export default class Xapi extends XapiBase {

async getSmartctlInformation(hostId, deviceNames) {
try {
const informations =
JSON.parse(
await this.call('host.call_plugin', this.getObject(hostId).$ref, 'smartctl.py', 'information', {})
) !== 'false'
const informations = JSON.parse(
await this.call('host.call_plugin', this.getObject(hostId).$ref, 'smartctl.py', 'information', {})
)
if (deviceNames === undefined) {
return informations
}
Expand Down

0 comments on commit 8484283

Please sign in to comment.