ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/HostDisplayPanel.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/HostDisplayPanel.java (file contents):
Revision 1.39 by tdb, Tue May 29 17:41:32 2001 UTC vs.
Revision 1.40 by tdb, Thu Mar 7 21:41:07 2002 UTC

# Line 332 | Line 332 | public class HostDisplayPanel extends JPanel {
332              if(!_components.containsKey(dataKey)) {
333                  // check if its a disk drive, if it is then we need to deal with it
334                  if(dataKey.startsWith("packet.disk.p")) {
335 <                    createDiskPanel(dataKey);
335 >                    createDiskPanel(dataKey, packet);
336                      
337                  // !check for services here! to display
338                  } else if(dataKey.startsWith("packet.services.")) {
# Line 399 | Line 399 | public class HostDisplayPanel extends JPanel {
399       * all attributes relating to that new disk.
400       *
401       * @param attribute the name of the attrivbute first encountered
402 +     * @param packet the XMLPacket the data is being pulled from
403       */
404 <    private void createDiskPanel(String attribute) {
404 >    private void createDiskPanel(String attribute, XMLPacket packet) {
405          String diskNumber = "";
406          
407          // pos is after "packet.disk.p"
# Line 423 | Line 424 | public class HostDisplayPanel extends JPanel {
424          addDataComponent(new StringDataComponent(devAttribute, devAttribute));
425          addDataComponent(new StringDataComponent(mountAttribute, mountAttribute));
426          addDataComponent(new StringDataComponent(totalAttribute, totalAttribute));
427 <        addDataComponent(new StringDataComponent("packet.disk.p" + diskNumber + ".used", "packet.disk.p" + diskNumber + ".attributes.used"));
427 >        
428 >        // add any further bits of data about this disk so we
429 >        // don't try and do something with them later
430 >        // -- this is not that tidy ;)
431 >        Set packetSet = packet.getSet();
432 >        Iterator i = packetSet.iterator();
433 >        while (i.hasNext()) {
434 >            String dataKey = (String) i.next();
435 >            if(dataKey.startsWith("packet.disk.p" + diskNumber +".") && !_components.containsKey(dataKey)) {
436 >                addDataComponent(new StringDataComponent(dataKey, dataKey));
437 >            }
438 >        }
439      }
440      
441      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines