Opened 13 years ago

Closed 12 years ago

#4278 closed enhancement (fixed)

Return the storage group data using a more sensible XML approach.

Reported by: Andrew Ruthven <andrew@…> Owned by: paulh
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


Currently the XML returns information about the storage groups as a long list of attributes of one element which looks like this:


<Storage drive_total_free="1479558" drive_total_used="1358490"

drive_1_used="662884" drive_2_used="93351" drive_1_dirs="slave:/mnt/ tvrecordings,slave:/tvrecordings" fsids="1,2,4,total" drive_2_dirs="slave:/nas,Myth-Livingroom:/nas" drive_total_total="2838049" drive_4_free="101920" drive_2_total="1429698" drive_1_total="704175" drive_total_dirs="TotalDiskSpace?" drive_4_used="602254" drive_4_dirs="Myth-Livingroom:/hdrecordings" drive_1_free="41291" drive_4_total="704175" drive_2_free="1336346" />

<Load avg1="0" avg2="0" avg3="0" /> <Guide guideDays="14" status="Successful."

next="2007-11-27T22:41:46" end="2007-11-27 02:31" guideThru="2007-12-11T03:00:00" start="2007-11-27 02:31" >Your subscription expires on 06/19/2008 10:23:34 PM</Guide>


This requires a bit more work to parse. The attached parse returns the same information in a more XML kind of way which looks like (different storage groups):



<Group dir="cyclops:/home/andrew/myth6" free="18825" id="1" total="50396" used="31570" /> <Group dir="cyclops:/scratch/myth2,cyclops:/tmp/myth1,cyclops:/tmp/myth3,cyclops:/tmp/myth4" free="10644" id="2" total="20746" used="10101" /> <Group dir="TotalDiskSpace?" free="29470" id="total" total="71143" used="41672" />

</Storage> <Load avg1="0.79" avg2="0.4" avg3="0.28" /> <Guide status="" next="1970-01-01T00:00:00" end="" start="" ></Guide>


The HTML generation code in httpstatus.cpp handles this new layout as well.

Attachments (2)

0001-Return-the-storage-group-data-using-a-more-sensible-.patch (6.7 KB) - added by Andrew Ruthven <andrew@…> 13 years ago.
0001-Return-the-storage-group-data-using-a-sensible-XML-a.patch (6.6 KB) - added by andrew@… 13 years ago.
Updated to r15948.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by Andrew Ruthven <andrew@…>

comment:1 Changed 13 years ago by Andrew Ruthven <andrew@…>

Actually the Type should be "patch" but I don't seem to be able to change that now.

Changed 13 years ago by andrew@…

Updated to r15948.

comment:2 Changed 13 years ago by andrew@…

I've just updated the patch to almost the head of release-0-21-fixes. If this could make it into 0.21, that would be awesome.

comment:3 Changed 13 years ago by andrew@…

The last patch still applies cleanly to r16234.

comment:4 Changed 13 years ago by paulh

Milestone: unknown0.22
Owner: changed from Isaac Richards to paulh
Status: newassigned

comment:5 Changed 12 years ago by paulh

Resolution: fixed
Status: assignedclosed

(In [17352]) Change the layout of the storage group data returned from the BE in the status xml to make it easier to parse.

Does the same for the http status page.

Patch from Andrew Ruthven. Closes #4278.

Note: See TracTickets for help on using tickets.