Skip to content

Commit

Permalink
wip bug fix for root_dataset again
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanKeo45 committed Mar 11, 2024
1 parent 8460832 commit 77a9e80
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## cockpit zfs 0.1.0-3
## cockpit zfs 0.1.0-4

* wip bug fix for root_dataset property
* wip bug fix for root_dataset property again
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "cockpit zfs",
"prerelease": true,
"version": "0.1.0",
"buildVersion": "3",
"buildVersion": "4",
"author": "Jordan Keough <[email protected]>",
"url": "https://github.com/45Drives/cockpit-zfs",
"category": "utils",
Expand Down Expand Up @@ -39,7 +39,7 @@
"changelog": {
"urgency": "medium",
"version": "0.1.0",
"buildVersion": "3",
"buildVersion": "4",
"ignore": [],
"date": null,
"packager": "Jordan Keough <[email protected]>",
Expand Down
2 changes: 2 additions & 0 deletions packaging/el8/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ make DESTDIR=%{buildroot} install
/usr/share/cockpit/zfs/*

%changelog
* Mon Mar 11 2024 Jordan Keough <[email protected]> 0.1.0-4
- wip bug fix for root_dataset property again
* Mon Mar 11 2024 Jordan Keough <[email protected]> 0.1.0-3
- wip bug fix for root_dataset property
* Mon Mar 11 2024 Jordan Keough <[email protected]> 0.1.0-2
Expand Down
20 changes: 11 additions & 9 deletions zfs/src/scripts/get-pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ def main():
for p in zfs.pools:
pool = p.asdict()

if 'root_dataset' in pool:
root_dataset = pool.get('root_dataset') # Check if 'root_dataset' exists
if root_dataset is not None:
pool['root_dataset']['properties']['creation']['parsed'] = str(pool['root_dataset']['properties']['creation']['parsed'])
# pool['root_dataset']['properties']['creation']['parsed'] = str(pool['root_dataset']['properties']['creation']['parsed'])

if 'scan' in pool:
pool['scan']['start_time'] = str(pool['scan']['start_time'])
pool['scan']['end_time'] = str(pool['scan']['end_time'])
pool['scan']['pause'] = str(pool['scan']['pause'])

pool['root_dataset']['children'] = basic_typed_children(pool['root_dataset']['children'])

if 'scan' in pool:
pool['scan']['start_time'] = str(pool['scan']['start_time'])
pool['scan']['end_time'] = str(pool['scan']['end_time'])
pool['scan']['pause'] = str(pool['scan']['pause'])

pool['root_dataset']['children'] = basic_typed_children(pool['root_dataset']['children'])
else:
pool['root_dataset'] = None # Set 'root_dataset' to None if it doesn't exist

z_pools.append(pool)

Expand Down

0 comments on commit 77a9e80

Please sign in to comment.