Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2868 - branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels

Subject: perfsonar development work

List archive

perfsonar: r2868 - branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2868 - branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels
  • Date: Wed, 26 Sep 2007 05:08:05 -0400

Author: michael.bischoff
Date: 2007-09-26 05:08:04 -0400 (Wed, 26 Sep 2007)
New Revision: 2868

Modified:

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/StatPanel.java
Log:


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java
2007-09-25 16:38:34 UTC (rev 2867)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/QueryResultPanel.java
2007-09-26 09:08:04 UTC (rev 2868)
@@ -5,8 +5,10 @@
import java.util.Observable;
import java.util.Observer;

+import org.jdom.input.DOMBuilder;
import org.perfsonar.perfsonarui.AbstractUserData;
import org.perfsonar.perfsonarui.flowsa.FlowSAUserData;
+import org.perfsonar.perfsonarui.flowsa.Statistics;
import org.perfsonar.perfsonarui.flowsa.FlowSAUserData.QueryType;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.ui.PluginMainPanel;
@@ -47,6 +49,10 @@

private void handleResponseUpdate() {
Document response = userData.getResponse();
+ org.jdom.Document document = new DOMBuilder().build(response);
+
+ //document.getRootElement().getC
+
QueryType type =
QueryType.get(userData.getQuery(FlowSAUserData.QUERYTYPE));
NodeList data = response.getElementsByTagName("nmwg:data");
if(data.item(0)==null) {
@@ -87,7 +93,29 @@
logger.error("No Datum item");
return;
}
-
+ Statistics statistics = new Statistics();
+// for(String atribute : datum.) {
+// statistics.setBytes()
+// statistics.setBytesIcmp()
+// statistics.setBytesOther()
+// statistics.setBytesTcp()
+// statistics.setBytesUdp()
+// statistics.setFirst()
+// statistics.setFlows()
+// statistics.setFlowsIcmp()
+// statistics.setFlowsOther()
+// statistics.setFlowsTcp()
+// statistics.setFlowsUdp()
+// statistics.setLast()
+// statistics.setMsecFirst()
+// statistics.setMsecLast()
+// statistics.setPackets()
+// statistics.setPacketsIcmp()
+// statistics.setPacketsTcp()
+// statistics.setPacketsUdp()
+// statistics.setPacketsOther()
+// statistics.setSequenceFailures()
+// }
}

private void handleRawResponse(NodeList datums) {

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/StatPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/StatPanel.java
2007-09-25 16:38:34 UTC (rev 2867)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/StatPanel.java
2007-09-26 09:08:04 UTC (rev 2868)
@@ -9,9 +9,11 @@

import java.awt.Component;

+import javax.swing.JLabel;
import javax.swing.SwingConstants;

import org.jdesktop.layout.GroupLayout;
+import org.perfsonar.perfsonarui.flowsa.Statistics;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.ui.PluginMainPanel;

@@ -24,44 +26,24 @@
private javax.swing.JPanel statQueryPanel;
private javax.swing.JTextField statsBytesField;
private javax.swing.JTextField statsBytesIcmpField;
- private javax.swing.JLabel statsBytesIcmpLabel;
- private javax.swing.JLabel statsBytesLabel;
private javax.swing.JTextField statsBytesOtherField;
- private javax.swing.JLabel statsBytesOtherLabel;
private javax.swing.JTextField statsBytesTcpField;
- private javax.swing.JLabel statsBytesTcpLabel;
private javax.swing.JTextField statsBytesUdpField;
- private javax.swing.JLabel statsBytesUdpLabel;
private javax.swing.JTextField statsFirstField;
- private javax.swing.JLabel statsFirstLabel;
private javax.swing.JTextField statsFlowsField;
private javax.swing.JTextField statsFlowsIcmpField;
- private javax.swing.JLabel statsFlowsIcmpLabel;
- private javax.swing.JLabel statsFlowsLabel;
private javax.swing.JTextField statsFlowsOtherField;
- private javax.swing.JLabel statsFlowsOthersLabel;
- private javax.swing.JLabel statsFlowsPacketsLabel;
private javax.swing.JTextField statsFlowsTcpField;
- private javax.swing.JLabel statsFlowsTcpLabel;
- private javax.swing.JLabel statsFlowsUdpLabel;
private javax.swing.JTextField statsFlowsudpField;
private javax.swing.JTextField statsLastField;
- private javax.swing.JLabel statsLastLabel;
private javax.swing.JTextField statsMsecFirstField;
- private javax.swing.JLabel statsMsecFirstLabel;
private javax.swing.JTextField statsMsecLastField;
- private javax.swing.JLabel statsMsecLastLabel;
private javax.swing.JTextField statsPacketsField;
private javax.swing.JTextField statsPacketsIcmpField;
- private javax.swing.JLabel statsPacketsIcmpLabel;
- private javax.swing.JLabel statsPacketsOtherLabel;
private javax.swing.JTextField statsPacketsTcpField;
- private javax.swing.JLabel statsPacketsTcpLabel;
private javax.swing.JTextField statsPacketsUdpField;
- private javax.swing.JLabel statsPacketsUdpLabel;
private javax.swing.JTextField statsPacketsotherField;
private javax.swing.JTextField statsSeqFailField;
- private javax.swing.JLabel statsSeqFailLabel;

public StatPanel(Component parentFrame, IPerfsonarTab model) {
super(parentFrame, model);
@@ -71,26 +53,26 @@
@Override
public void addWidgets() {
statQueryPanel = new javax.swing.JPanel();
- statsFlowsLabel = new javax.swing.JLabel("Flows");
- statsFlowsTcpLabel = new javax.swing.JLabel("Flows TCP");
- statsFlowsUdpLabel = new javax.swing.JLabel("Flows UDP");
- statsFlowsIcmpLabel = new javax.swing.JLabel("Flows ICMP");
- statsFlowsOthersLabel = new javax.swing.JLabel("Flows other");
- statsFlowsPacketsLabel = new javax.swing.JLabel("Packets");
- statsPacketsTcpLabel = new javax.swing.JLabel("Packets TCP");
- statsPacketsUdpLabel = new javax.swing.JLabel("Packets UDP");
- statsPacketsIcmpLabel = new javax.swing.JLabel("Packets
ICMP");
- statsPacketsOtherLabel = new javax.swing.JLabel("Packets
other");
- statsBytesLabel = new javax.swing.JLabel("Bytes");
- statsBytesTcpLabel = new javax.swing.JLabel("Bytes TCP");
- statsBytesUdpLabel = new javax.swing.JLabel("Bytes UDP");
- statsBytesIcmpLabel = new javax.swing.JLabel("Bytes ICMP");
- statsBytesOtherLabel = new javax.swing.JLabel("Bytes other");
- statsFirstLabel = new javax.swing.JLabel("First");
- statsLastLabel = new javax.swing.JLabel("Last");
- statsMsecFirstLabel = new javax.swing.JLabel("msec first");
- statsMsecLastLabel = new javax.swing.JLabel("msec last");
- statsSeqFailLabel = new javax.swing.JLabel("Sequence
failures");
+ JLabel statsFlowsLabel = new javax.swing.JLabel("Flows");
+ JLabel statsFlowsTcpLabel = new javax.swing.JLabel("Flows
TCP");
+ JLabel statsFlowsUdpLabel = new javax.swing.JLabel("Flows
UDP");
+ JLabel statsFlowsIcmpLabel = new javax.swing.JLabel("Flows
ICMP");
+ JLabel statsFlowsOthersLabel = new javax.swing.JLabel("Flows
other");
+ JLabel statsFlowsPacketsLabel = new
javax.swing.JLabel("Packets");
+ JLabel statsPacketsTcpLabel = new javax.swing.JLabel("Packets
TCP");
+ JLabel statsPacketsUdpLabel = new javax.swing.JLabel("Packets
UDP");
+ JLabel statsPacketsIcmpLabel = new
javax.swing.JLabel("Packets ICMP");
+ JLabel statsPacketsOtherLabel = new
javax.swing.JLabel("Packets other");
+ JLabel statsBytesLabel = new javax.swing.JLabel("Bytes");
+ JLabel statsBytesTcpLabel = new javax.swing.JLabel("Bytes
TCP");
+ JLabel statsBytesUdpLabel = new javax.swing.JLabel("Bytes
UDP");
+ JLabel statsBytesIcmpLabel = new javax.swing.JLabel("Bytes
ICMP");
+ JLabel statsBytesOtherLabel = new javax.swing.JLabel("Bytes
other");
+ JLabel statsFirstLabel = new javax.swing.JLabel("First");
+ JLabel statsLastLabel = new javax.swing.JLabel("Last");
+ JLabel statsMsecFirstLabel = new javax.swing.JLabel("msec
first");
+ JLabel statsMsecLastLabel = new javax.swing.JLabel("msec
last");
+ JLabel statsSeqFailLabel = new javax.swing.JLabel("Sequence
failures");
statsFlowsField = new javax.swing.JTextField();
statsFlowsTcpField = new javax.swing.JTextField();
statsFlowsudpField = new javax.swing.JTextField();
@@ -114,83 +96,44 @@

statsFlowsField.setEditable(false);
statsFlowsField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsFlowsField.setText("32743934");
-
statsFlowsTcpField.setEditable(false);

statsFlowsTcpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsFlowsTcpField.setText("28855797");
-
statsFlowsudpField.setEditable(false);

statsFlowsudpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsFlowsudpField.setText("3640646");
-
- statsFlowsIcmpField.setEditable(false);
+ statsFlowsIcmpField.setEditable(false);

statsFlowsIcmpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsFlowsIcmpField.setText("166385");
-
statsFlowsOtherField.setEditable(false);

statsFlowsOtherField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsFlowsOtherField.setText("81106");
-
statsPacketsField.setEditable(false);

statsPacketsField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsPacketsField.setText("145371187");
-
statsPacketsTcpField.setEditable(false);

statsPacketsTcpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsPacketsTcpField.setText("131640619");
-
statsPacketsUdpField.setEditable(false);

statsPacketsUdpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsPacketsUdpField.setText("8769174");
-
statsPacketsIcmpField.setEditable(false);

statsPacketsIcmpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsPacketsIcmpField.setText("215350");
-
statsPacketsotherField.setEditable(false);

statsPacketsotherField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsPacketsotherField.setText("4746044");
-
statsBytesField.setEditable(false);
statsBytesField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsBytesField.setText("107316849515");
-
statsBytesTcpField.setEditable(false);

statsBytesTcpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsBytesTcpField.setText("101866880996");
-
statsBytesUdpField.setEditable(false);

statsBytesUdpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsBytesUdpField.setText("2048101988");
-
statsBytesIcmpField.setEditable(false);

statsBytesIcmpField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsBytesIcmpField.setText("2048101988");
-
statsBytesOtherField.setEditable(false);

statsBytesOtherField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsBytesOtherField.setText("15996576");
-
statsFirstField.setEditable(false);
statsFirstField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsFirstField.setText("3385869955");
-
statsLastField.setEditable(false);
statsLastField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsLastField.setText("1170162779");
-
statsMsecFirstField.setEditable(false);

statsMsecFirstField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsMsecFirstField.setText("166");
-
statsMsecLastField.setEditable(false);

statsMsecLastField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsMsecLastField.setText("0");
-
statsSeqFailField.setEditable(false);

statsSeqFailField.setHorizontalAlignment(SwingConstants.RIGHT);
- statsSeqFailField.setText("139");

GroupLayout statQueryPanelLayout = new
GroupLayout(statQueryPanel);
statQueryPanel.setLayout(statQueryPanelLayout);
@@ -276,6 +219,7 @@

.add(statQueryPanelLayout.createParallelGroup(BASELINE)
.add(statsFlowsLabel)
.add(statsFlowsField)
+ )

.add(statQueryPanelLayout.createParallelGroup(BASELINE)
.add(statsFlowsTcpField)
.add(statsFlowsTcpLabel)
@@ -313,8 +257,8 @@
.add(statsPacketsOtherLabel)
)

.add(statQueryPanelLayout.createParallelGroup(BASELINE)
+ .add(statsBytesLabel)
.add(statsBytesField)
- .add(statsBytesLabel))
)

.add(statQueryPanelLayout.createParallelGroup(BASELINE)
.add(statsBytesTcpLabel)
@@ -372,4 +316,50 @@
)
);
}
+
+ public void setStatistics(Statistics statistics) {
+ if(statistics==null) {
+ statsBytesField.setText(null);
+ statsBytesIcmpField.setText(null);
+ statsBytesOtherField.setText(null);
+ statsBytesTcpField.setText(null);
+ statsBytesUdpField.setText(null);
+ statsFirstField.setText(null);
+ statsFlowsField.setText(null);
+ statsFlowsIcmpField.setText(null);
+ statsFlowsOtherField.setText(null);
+ statsFlowsTcpField.setText(null);
+ statsFlowsudpField.setText(null);
+ statsLastField.setText(null);
+ statsMsecFirstField.setText(null);
+ statsMsecLastField.setText(null);
+ statsPacketsField.setText(null);
+ statsPacketsIcmpField.setText(null);
+ statsPacketsTcpField.setText(null);
+ statsPacketsUdpField.setText(null);
+ statsPacketsotherField.setText(null);
+ statsSeqFailField.setText(null);
+ } else {
+ statsBytesField.setText(statistics.getBytes());
+
statsBytesIcmpField.setText(statistics.getBytesIcmp());
+
statsBytesOtherField.setText(statistics.getBytesOther());
+ statsBytesTcpField.setText(statistics.getBytesTcp());
+ statsBytesUdpField.setText(statistics.getBytesUdp());
+ statsFirstField.setText(statistics.getFirst());
+ statsFlowsField.setText(statistics.getFlows());
+
statsFlowsIcmpField.setText(statistics.getFlowsIcmp());
+
statsFlowsOtherField.setText(statistics.getFlowsOther());
+ statsFlowsTcpField.setText(statistics.getFlowsTcp());
+ statsFlowsudpField.setText(statistics.getFlowsUdp());
+ statsLastField.setText(statistics.getLast());
+
statsMsecFirstField.setText(statistics.getMsecFirst());
+ statsMsecLastField.setText(statistics.getMsecLast());
+ statsPacketsField.setText(statistics.getPackets());
+
statsPacketsIcmpField.setText(statistics.getPacketsIcmp());
+
statsPacketsTcpField.setText(statistics.getPacketsTcp());
+
statsPacketsUdpField.setText(statistics.getPacketsUdp());
+
statsPacketsotherField.setText(statistics.getPacketsOther());
+
statsSeqFailField.setText(statistics.getSequenceFailures());
+ }
+ }
}



  • perfsonar: r2868 - branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels, svnlog, 09/26/2007

Archive powered by MHonArc 2.6.16.

Top of Page