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

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/DataPanel.java (file contents):
Revision 1.10 by ajm, Sun Feb 4 23:46:50 2001 UTC vs.
Revision 1.11 by ajm, Mon Feb 12 13:20:29 2001 UTC

# Line 63 | Line 63 | public class DataPanel extends JPanel implements Runna
63                      // Use XMLPacketMaker to make an XMLPacket object.
64                      XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml);
65                      XMLPacket packet = xmlPacketMaker.createXMLPacket();
66 <                    String hostName = packet.getParam("packet.attributes.machine_name");
67 <                    if(!hostList.containsKey(hostName)) {
66 >                    String packetType = packet.getParam("packet.attributes.type");
67 >                    
68 >                    if (packetType.equals("heartbeat") || packetType.equals("data")) {
69 >                        String hostName = packet.getParam("packet.attributes.machine_name");
70 >                        if(!hostList.containsKey(hostName)) {
71                          
72 <                        HostDisplayPanel host = new HostDisplayPanel(hostName);      
73 <                        _tabbedPane.addTab(hostName, _serverIcon, host, "Monitor " + hostName);
74 <                        hostList.put(hostName, host);
75 <                        Conient.addMessage("New Host added: " + hostName);
76 <                    }
77 <                    if (!((HostDisplayPanel) hostList.get(hostName)).updateHost(packet)) {
78 <                        //throw new Exception(hostName + " sent an invalid data packet stopping data update!");
79 <                        Conient.addMessage("WARNING{data panel}: " + hostName + " sent an invalid data packet");
72 >                            HostDisplayPanel host = new HostDisplayPanel(hostName);      
73 >                            _tabbedPane.addTab(hostName, _serverIcon, host, "Monitor " + hostName);
74 >                            hostList.put(hostName, host);
75 >                            Conient.addMessage("New Host added: " + hostName);
76 >                        }
77 >                        if (!((HostDisplayPanel) hostList.get(hostName)).updateHost(packet)) {
78 >                            //throw new Exception(hostName + " sent an invalid data packet stopping data update!");
79 >                            Conient.addMessage("WARNING{data panel}: " + hostName + " sent an invalid data or heartbeat packet");
80 >                        }
81 >                    } else {
82 >                        Conient.addMessage("WARNING{data panel}: and unknown packet type was received - " + packetType);
83                      }
84                  }
85              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines