77 |
|
|
78 |
|
// create the i-scream logo at the top |
79 |
|
JLabel iscream = new JLabel(new ImageIcon("i-scream.gif")); |
80 |
< |
JLabel comment = new JLabel(" I-Scream Client"); |
81 |
< |
comment.setForeground( new Color(0, 0, 102)); |
80 |
> |
_serverCountLabel = new JLabel(" Monitoring 0 hosts..."); |
81 |
> |
_serverCountLabel.setForeground( new Color(0, 0, 102)); |
82 |
|
Box header = Box.createHorizontalBox(); |
83 |
< |
header.add(comment); |
83 |
> |
header.add(_serverCountLabel); |
84 |
|
header.add(Box.createHorizontalGlue()); |
85 |
|
header.add(iscream); |
86 |
|
|
114 |
|
} else { |
115 |
|
_status.setText("Got inbound data...handling"); |
116 |
|
// Get a string without any null characters in it. |
117 |
< |
// -- maybe String.trim() would be better here ? |
117 |
> |
// -- maybe String.trim() would be better ? |
118 |
|
if (xml.indexOf(0) != -1) { |
119 |
|
xml = xml.substring(0, xml.indexOf(0)); |
120 |
|
} |
127 |
|
XMLPacket packet = xmlPacketMaker.createXMLPacket(); |
128 |
|
String hostName = packet.getParam("packet.attributes.machine_name"); |
129 |
|
if(!hostList.containsKey(hostName)) { |
130 |
+ |
_serverCount++; |
131 |
+ |
_serverCountLabel.setText(" Monitoring " + _serverCount + " hosts..."); |
132 |
|
host = new HostDisplayPanel(); |
133 |
|
_tabbedPane.addTab(hostName, _serverIcon, host, "Monitor " + hostName); |
134 |
|
hostList.put(hostName, host); |
165 |
|
DataReader _data; |
166 |
|
JLabel _status = new JLabel(); |
167 |
|
ImageIcon _serverIcon = new ImageIcon("server.gif"); |
168 |
+ |
JLabel _serverCountLabel; |
169 |
+ |
int _serverCount = 0; |
170 |
|
|
171 |
|
//---STATIC ATTRIBUTES--- |
172 |
|
|