Skip to content

Commit

Permalink
Added folder
Browse files Browse the repository at this point in the history
  • Loading branch information
klein0r committed Sep 8, 2023
1 parent 0246738 commit 054572c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,15 @@ class Proxmox extends utils.Adapter {
if (nodeDisks) {
for (const disk of nodeDisks) {
const diskPath = 'disk_' + String(disk.devpath).replace('/dev/', '');

await this.setObjectNotExistsAsync(`${sid}.${diskPath}`, {
type: 'folder',
common: {
name: disk.devpath,
},
native: {},
});

if (disk.type !== undefined) {
await this.createCustomState(sid, `${diskPath}.type`, 'text', disk.type);
}
Expand Down

0 comments on commit 054572c

Please sign in to comment.