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.13 by ajm, Sun Feb 4 00:01:49 2001 UTC vs.
Revision 1.14 by ajm, Sun Feb 4 18:02:46 2001 UTC

# Line 150 | Line 150 | public class HostDisplayPanel extends JPanel {
150          
151          // theses next two are DataComponents, but not VisibleDataComponents
152          // this is because they hold the value but do NOT display it
153 <        MemoryTotalDataComponent totalMem = new MemoryTotalDataComponent("Total Memory", "packet.memory.total");
153 >        StorageTotalDataComponent totalMem = new StorageTotalDataComponent("Total Memory", "packet.memory.total");
154          addDataComponent(totalMem);
155 <        MemoryTotalDataComponent totalSwap = new MemoryTotalDataComponent("Total Swap", "packet.swap.total");
155 >        StorageTotalDataComponent totalSwap = new StorageTotalDataComponent("Total Swap", "packet.swap.total");
156          addDataComponent(totalSwap);
157          
158          _center.add(new javax.swing.JLabel("--- Memory ---"));
# Line 160 | Line 160 | public class HostDisplayPanel extends JPanel {
160          // these next two are passed the non-visible datacomponents
161          JPanel memory = new JPanel();
162          memory.setLayout(new BoxLayout(memory, BoxLayout.Y_AXIS));        
163 <        addVisibleDataComponent(memory, new MemoryFreeDataComponent("Memory in use", "packet.memory.free", totalMem));
164 <        addVisibleDataComponent(memory, new MemoryFreeDataComponent("Swap in use", "packet.swap.free", totalSwap));
163 >        addVisibleDataComponent(memory, new StorageFreeDataComponent("Memory in use", "packet.memory.free","Mb", totalMem));
164 >        addVisibleDataComponent(memory, new StorageFreeDataComponent("Swap in use", "packet.swap.free", "Mb", totalSwap));
165          _center.add(memory);
166          _center.add(new javax.swing.JLabel("--- Users ---"));
167          addVisibleDataComponent(_center, new StringDataComponent("Number of users", "packet.users.count"));
168          UsersDataComponent users = new UsersDataComponent("User List", "packet.users.list");
169          addVisibleDataComponent(_center, users);
170  
171 +        _center.add(new javax.swing.JLabel("--- Disks ---"));
172 +        _disks = new JPanel();
173 +        _disks.setLayout(new BoxLayout(_disks, BoxLayout.Y_AXIS));
174 +        _center.add(_disks);
175 +
176          // everything else we get is "extra", but we still want to display it        
177          _center.add(new javax.swing.JLabel("--- Extra Data ---"));
178      }
# Line 216 | Line 221 | public class HostDisplayPanel extends JPanel {
221                  // if there are no components looking after this data
222                  // create a new StringDataComponent for it
223                  if(!_components.containsKey(dataKey)) {
224 +                    
225 +                    
226                      addVisibleDataComponent(_center, new StringDataComponent(dataKey, dataKey));
227                  }
228                  
# Line 303 | Line 310 | public class HostDisplayPanel extends JPanel {
310      private Thread _heartbeatTimerThread = null;
311      private Thread _dataTimerThread = null;
312      private final String _hostName;
313 +    private final JPanel _disks;
314 +    
315   //---STATIC ATTRIBUTES---
316      
317   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines