perfsonar-dev - perfsonar: r2642 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels
Subject: perfsonar development work
List archive
perfsonar: r2642 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2642 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels
- Date: Mon, 13 Aug 2007 11:32:23 -0400
Author: gijs
Date: 2007-08-13 11:32:22 -0400 (Mon, 13 Aug 2007)
New Revision: 2642
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSARequest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/TopOptionsPanel.java
Log:
more request building
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
2007-08-13 13:46:59 UTC (rev 2641)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAModel.java
2007-08-13 15:32:22 UTC (rev 2642)
@@ -83,7 +83,9 @@
{ FlowSAUserData.RAWFILTER, "Raw Filter rule"
}, { FlowSAUserData.RAWAGGREGATION, "Raw Aggregation rule" },
{ FlowSAUserData.RAWFIELDS, "Raw fields" }, {
FlowSAUserData.TOPELEMENTS, "Top fields" },
{ FlowSAUserData.TOPORDERBY, "Top Order by"
}, { FlowSAUserData.TOPNUMBER, "Top Numbers" },
- { FlowSAUserData.TOPTRANSGROUP, "Top Group
Transport ports" } };
+ { FlowSAUserData.TOPTRANSGROUP, "Top Group
Transport ports" },
+ { FlowSAUserData.TOPFILTER,
FlowSAUserData.TOPFILTER },
+ { FlowSAUserData.TOPAGGREGATION,
FlowSAUserData.TOPAGGREGATION }, };
UserDataDetailsPane userDataPanel = new
UserDataDetailsPane("Settings", getUserData(), s, true, false);
return new JComponent[] { userDataPanel };
}
@@ -127,6 +129,8 @@
getUserData().setQuery(FlowSAUserData.TOPORDERBY,
topOptionsPanel.getOrderBy());
getUserData().setQuery(FlowSAUserData.TOPNUMBER, topOptionsPanel.getNumber());
getUserData().setQuery(FlowSAUserData.TOPTRANSGROUP,
topOptionsPanel.getTransGroup());
+
getUserData().setQuery(FlowSAUserData.TOPFILTER, topOptionsPanel.getFilter());
+
getUserData().setQuery(FlowSAUserData.TOPAGGREGATION,
topOptionsPanel.getAggregation());
}
};
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSARequest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSARequest.java
2007-08-13 13:46:59 UTC (rev 2641)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSARequest.java
2007-08-13 15:32:22 UTC (rev 2642)
@@ -20,6 +20,7 @@
import org.perfsonar.perfsonarui.plugins.MetaDataList;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.sun.org.apache.xml.internal.serialize.OutputFormat;
@@ -27,24 +28,37 @@
public class FlowSARequest extends AbstractMARequest {
+ public static void main(String[] args) {
+
+ FlowSARequest request = new FlowSARequest();
+ try {
+ FlowSAUserData fakeUserData = new FlowSAUserData();
+ fakeUserData.setQuery(FlowSAUserData.ROUTERS, "ford
arthur");
+ Document requestDocument =
request.createRequest(fakeUserData, "raw");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
public FlowSARequest() {
super();
}
@Override
public Document createRequest(IUserData data, String messageType)
throws Exception {
- String inputFile =
"org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml";
- Document request = null;
+ // String inputFile =
"org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml";
+ String inputFile =
"/home/gijs/stuff/eclipse/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml";
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
- DocumentBuilder builder = null;
- builder = factory.newDocumentBuilder();
+ DocumentBuilder builder = factory.newDocumentBuilder();
InputStream stream =
this.getClass().getClassLoader().getResourceAsStream(inputFile);
+ // InputStream stream = new FileInputStream(inputFile);
- request = builder.parse(stream);
- NodeList paraNodes =
request.getElementsByTagName("nmwg:parameter");
+ Document request = builder.parse(inputFile);
// change start and end moment
+ NodeList paraNodes =
request.getElementsByTagName("nmwg:parameter");
for (int j = 0; j < paraNodes.getLength(); j++) {
Element timeNode = (Element) paraNodes.item(j);
String nameAttr = timeNode.getAttribute("name");
@@ -57,6 +71,30 @@
}
}
+ Node network =
request.getElementsByTagName("nmwgtopo3:network").item(0);
+
+ // remove example routers
+ while (network.getChildNodes().getLength() > 0) {
+ network.removeChild(network.getFirstChild());
+ }
+
+ // add routers from userdata
+ int routerid = 1;
+ for (String router :
data.getQuery(FlowSAUserData.ROUTERS).split(" ")) {
+ Element routerNode =
request.createElement("nmwgtopo3:node");
+ routerNode.setAttribute("id", "router" + routerid);
+
+ Element routerSubNode =
request.createElement("nmwgtopo3:hostName");
+
routerSubNode.appendChild(request.createTextNode(router));
+ routerNode.appendChild(routerSubNode);
+ network.appendChild(routerNode);
+ routerid++;
+ }
+
+ // change filter rule
+ // request.getElementById(elementId)
+ // aggregationRule
+
StringWriter sw = new StringWriter();
OutputFormat format = new OutputFormat(request);
format.setLineWidth(65);
@@ -65,7 +103,7 @@
XMLSerializer output = new XMLSerializer(sw, format);
output.serialize(request);
- logger.debug("request: " + request);
+ logger.info(sw.getBuffer());
return request;
}
@@ -94,5 +132,4 @@
public void process(IUserData data, Document response,
IPerfsonarResponse listener) throws Exception {
logger.debug(response);
}
-
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
2007-08-13 13:46:59 UTC (rev 2641)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowSAUserData.java
2007-08-13 15:32:22 UTC (rev 2642)
@@ -26,6 +26,8 @@
public final static String TOPORDERBY = "Top Order by";
public final static String TOPNUMBER = "Top Numbers";
public final static String TOPTRANSGROUP = "Top Group Transport
ports";
+ public final static String TOPFILTER = "Top Filter rule";
+ public final static String TOPAGGREGATION = "Top Aggregation rule";
public FlowSAUserData() {
super();
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml
2007-08-13 13:46:59 UTC (rev 2641)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/SetupDataRequest-rawFlows.xml
2007-08-13 15:32:22 UTC (rev 2642)
@@ -1,109 +1,14 @@
<!--
+
+code TEMPLATE
FlowSA SetupDataRequest-rawFlows (Client -> Service Request)
-version 0.5, 30 May 2007, Hans Trompert, initial proposal, modelled after
FlowS&A-SetupDataRequest-flowStatistics-v0.5.xml
-version 0.6, 5 June 2007, Jason Zurawski, fixed subject namespace issue,
suggesting new abstraction gof subject. Asking
- question about parameter name
assignment.
-version 0.7, 6 June 2007, Hans Trompert, subject now uses nmwgtopo3:node,
changed the way the showField parameters are specified.
-version 0.8, 12 June 2007, Martin Swany, Added location data
-version 0.9, 13 June 2007, Jason Zurawski, Final cleanup
-version 0.10, 24 July 2007, Hans Trompert, fixed some typos, added
subnamespace raw
+This XML document is used for request generation.
-This request will return information about all flows whithin the specified
-time range from the given router(s), the flows are optionally filtered on
-the basis of there content or aggregated as specified. For the moment, more
-information can be found at:
-
-
http://wiki.perfsonar.net/jra1-wiki/index.php/Flow_Selection_and_Aggregation_MA#Query_raw_flows
-
-Metadata:
-
- Information on the router that exported the flow information:
-
- - hostName: the name of the router for which we are holding flow
- information. This is preferably the official name of the router,
- usually this is the DNS name that is associated with the loopback0
- interface.
-
- - description: description of the router (optional)
-
- - operSys: operating system running on the router (optional)
-
- - institution: institution this routers belongs to (optional)
-
- - city, country, latitude and longitude: location of the router
- (optional)
-
- - flowVersion: the flow information export format used by the
- router, for now we support the following versions:
- - netflow_v5
- - netflow_v9
- - ipfix
- - sflow
-
- - sampleRate: the packet sample rate, if any, that is being used by
- the router before flow accounting is done, for example:
- - sampleRate = 100 if only 1 out of every 100 packets is
- sent to the router internal accounting process
- - sampleRate = 1 if every 1 out of 1 packets is sent to the
- router internal accounting process (all packets are
- accounted for)
-
- The filtering namespace http://ggf.org/ns/nmwg/ops/select/ can be
- used to specify a startTime and endTime to limit the number of flows
- to a specific time range.
-
- The folowing parameters can be used to filter and/or aggregate the
- flows:
-
- - aggregationRule: any valid Nfdump style aggregation rule, for
- example:
- - aggregate source IP address and destination port:
- 'srcip,dstport'
- - aggregate flows from the same /24 IPv4 source IP and
- destination port: 'srcip4/24,dstport'
-
- - filterRule: any valid Nfdump style filter rule, for example:
- - 'tcp and ( src ip 172.16.17.18 or dst ip 172.16.17.19 )'
- - 'in if 5 and net 10.0.0.0/24 and not host 10.0.0.1 and bps
> 10k and duration < 100 and dst port 1433'
-
- The parameters below specify which flow information fields are
- returned, this is mainly intended to reduce the amount of data that
- has to be returned, so please specify only those fields you really
- need. One or more can of the folowing parameters can be selected:
-
- - showFieldAddressFamily PF_INET or PF_INET6
- - showFieldTimeFirstSeen UNIX time seconds
- - showFieldMsecFirstSeen Mili seconds first seen
- - showFieldTimeLastSeen UNIX time seconds
- - showFieldMsecLastSeen Mili seconds first seen
- - showFieldProtocol Protocol
- - showFieldSrcAddress Src address as 4 consecutive 32bit
numbers.
- - showFieldSrcPort Src port
- - showFieldDstAddress Dst address as 4 consecutive 32bit
numbers.
- - showFieldDstPort Dst port
- - showFieldSrcAS Src AS number
- - showFieldDstAS Dst AS number
- - showFieldInputIF Input Interface
- - showFieldOutputIF Output Interface
- - showFieldTcpFlags TCP Flags
- 000001 FIN.
- 000010 SYN
- 000100 RESET
- 001000 PUSH
- 010000 ACK
- 100000 URGENT
- e.g. 6 => SYN + RESET
- - showFieldTos Type of Service
- - showFieldPackets Number of packets
- - showFieldBytes Number of bytes
-
-Data:
-
- The response of this request will contain the specified fields of
- the flows that matched the query, see SetupDataResponse-rawFlows.
-
+ based upon version 0.14 of real example instance.
+
-->
+
<nmwg:message type="SetupDataRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
xmlns:flow="http://ggf.org/ns/nmwg/tools/flow/2.0/"
@@ -114,41 +19,22 @@
<nmwg:metadata id="meta1">
<flow:subject id="flowsub1">
- <nmwgtopo3:node>
- <nmwgtopo3:hostName>test-router.lab.test-net</nmwgtopo3:hostName>
- <nmwgtopo3:description>Avici Systems TSR in test
lab</nmwgtopo3:description>
- <nmwgtopo3:operSys>IPriori Operational Image
6.5.3.3</nmwgtopo3:operSys>
- <nmwgtopo3:location>
- <nmwgtopo3:institution>SURFnet</nmwgtopo3:institution>
- <nmwgtopo3:city>Amsterdam</nmwgtopo3:city>
- <nmwgtopo3:country>The Netherlands</nmwgtopo3:country>
- <nmwgtopo3:latitude>52.212212</nmwgtopo3:latitude>
- <nmwgtopo3:longitude>04.571003</nmwgtopo3:longitude>
- </nmwgtopo3:location>
- </nmwgtopo3:node>
+ <!-- request generation code searches for nmwgtopo3:network node and
replaces childs -->
+ <nmwgtopo3:network id="network1">
+ <nmwgtopo3:node id="router1">
+ <nmwgtopo3:hostName>test-router.lab.test-net</nmwgtopo3:hostName>
+ </nmwgtopo3:node>
+ <nmwgtopo3:node id="router2">
+ <nmwgtopo3:hostName>test-router-2.lab.test-net</nmwgtopo3:hostName>
+ </nmwgtopo3:node>
+ </nmwgtopo3:network>
</flow:subject>
<nmwg:eventType>http://ggf.org/ns/nmwg/tools/flow/raw/2.0/</nmwg:eventType>
- <flow:parameters id="flowparamid1">
- <nmwg:parameter name="flowVersion">netflow_v9</nmwg:parameter>
- <nmwg:parameter name="sampleRate">100</nmwg:parameter>
- </flow:parameters>
</nmwg:metadata>
<nmwg:metadata id="meta2">
- <select:subject id="selectsub1" metadataIdRef="meta1"/>
- <select:parameters id="selectparamid1">
- <nmwg:parameter name="startTime">
- <nmtm:time type="ISO" value="2005-07-16T00:00:00Z"/>
- </nmwg:parameter>
- <nmwg:parameter name="endTime">
- <nmtm:time type="ISO" value="2005-07-21T00:00:00Z"/>
- </nmwg:parameter>
- </select:parameters>
- </nmwg:metadata>
-
- <nmwg:metadata id="meta3">
- <raw:subject id="rawsub1" metadataIdRef="meta2"/>
- <raw:parameters id="rawparamid1">
+ <flow:subject id="flowsub2" metadataIdRef="meta1"/>
+ <flow:parameters id="flowparamid1">
<nmwg:parameter name="aggregationRule">srcip,dstport</nmwg:parameter>
<nmwg:parameter name="filterRule">port = 80</nmwg:parameter>
<nmwg:parameter name="showFieldAddressFamily"/>
@@ -165,13 +51,28 @@
<nmwg:parameter name="showFieldDstAS"/>
<nmwg:parameter name="showFieldInputIF"/>
<nmwg:parameter name="showFieldOutputIF"/>
- <nmwg:parameter name="showFieldTcpFlags">6</nmwg:parameter>
+ <nmwg:parameter name="showFieldTcpFlags"/>
<nmwg:parameter name="showFieldTos"/>
<nmwg:parameter name="showFieldPackets"/>
<nmwg:parameter name="showFieldBytes"/>
- </raw:parameters>
+ </flow:parameters>
</nmwg:metadata>
+ <nmwg:metadata id="meta3">
+ <select:subject id="selectsub1" metadataIdRef="meta2"/>
+ <select:parameters id="selectparamid1">
+ <!-- request generation code searches for startTime node and replaces
time child value -->
+ <nmwg:parameter name="startTime">
+
+ <nmtm:time type="ISO" value="2005-07-16T00:00:00Z"/>
+ </nmwg:parameter>
+ <!-- request generation code searches for endTime node and replaces
time child value -->
+ <nmwg:parameter name="endTime">
+ <nmtm:time type="ISO" value="2005-07-21T00:00:00Z"/>
+ </nmwg:parameter>
+ </select:parameters>
+ </nmwg:metadata>
+
<nmwg:data id="data1" metadataIdRef="meta3"/>
</nmwg:message>
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/TopOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/TopOptionsPanel.java
2007-08-13 13:46:59 UTC (rev 2641)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/TopOptionsPanel.java
2007-08-13 15:32:22 UTC (rev 2642)
@@ -10,8 +10,12 @@
public class TopOptionsPanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
private javax.swing.JPanel TopQueryparametersPanel;
+ private javax.swing.JTextField topAggregationField;
+ private javax.swing.JLabel topAggregationLabel;
private javax.swing.JComboBox topElementComboBox;
private javax.swing.JLabel topElementLabel;
+ private javax.swing.JTextField topFilterField;
+ private javax.swing.JLabel topFilterLabel;
private javax.swing.JCheckBox topGroupTransCheckBox;
private javax.swing.JLabel topGroupTransLabel;
private javax.swing.JTextField topNumberField;
@@ -23,11 +27,6 @@
addWidgets();
}
- @Override
- public String toString() {
- return "Top query";
- }
-
private void addWidgets() {
TopQueryparametersPanel = new javax.swing.JPanel();
topNumberField = new javax.swing.JTextField();
@@ -38,6 +37,10 @@
topElementComboBox = new javax.swing.JComboBox();
topGroupTransCheckBox = new javax.swing.JCheckBox();
topGroupTransLabel = new javax.swing.JLabel();
+ topFilterField = new javax.swing.JTextField();
+ topAggregationField = new javax.swing.JTextField();
+ topFilterLabel = new javax.swing.JLabel();
+ topAggregationLabel = new javax.swing.JLabel();
TopQueryparametersPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Top
query parameters"));
topNumberField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
@@ -50,7 +53,7 @@
topOrderLabel.setText("Order by");
- topNumberLabel.setText("Number");
+ topNumberLabel.setText("Number of flows");
topElementComboBox.setModel(new
javax.swing.DefaultComboBoxModel(new String[] { "Record", "Srcip", "Dstip",
"Srcport", "Dstport", "Port", "Tos", "Src
AS", "Dst AS", "AS", "InIF", "OutIF", "IF", "Proto" }));
@@ -58,8 +61,12 @@
topGroupTransCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,
0, 0, 0));
topGroupTransCheckBox.setMargin(new java.awt.Insets(0, 0, 0,
0));
- topGroupTransLabel.setText("group trans prot");
+ topGroupTransLabel.setText("group transport protocols");
+ topFilterLabel.setText("filter rule");
+
+ topAggregationLabel.setText("aggregation rule");
+
org.jdesktop.layout.GroupLayout TopQueryparametersPanelLayout
= new org.jdesktop.layout.GroupLayout(
TopQueryparametersPanel);
TopQueryparametersPanel.setLayout(TopQueryparametersPanelLayout);
@@ -67,19 +74,31 @@
org.jdesktop.layout.GroupLayout.LEADING).add(
TopQueryparametersPanelLayout.createSequentialGroup().addContainerGap().add(
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
TopQueryparametersPanelLayout.createSequentialGroup().add(topNumberLabel).addPreferredGap(
-
org.jdesktop.layout.LayoutStyle.RELATED).add(topNumberField,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)).add(
TopQueryparametersPanelLayout.createSequentialGroup().add(
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
topElementLabel).add(topOrderLabel)).add(8, 8, 8).add(
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
topOrderComboBox, 0, 149,
Short.MAX_VALUE).add(topElementComboBox, 0, 149, Short.MAX_VALUE)))
+
topElementComboBox, 0, 125,
Short.MAX_VALUE).add(topOrderComboBox, 0, 125, Short.MAX_VALUE)))
.add(
-
org.jdesktop.layout.GroupLayout.TRAILING,
-
TopQueryparametersPanelLayout.createSequentialGroup().add(topGroupTransLabel,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 186,
Short.MAX_VALUE).addPreferredGap(
-
org.jdesktop.layout.LayoutStyle.RELATED).add(topGroupTransCheckBox))).addContainerGap()));
+
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING,
false)
+
.add(
+
TopQueryparametersPanelLayout.createSequentialGroup().add(topNumberLabel).addPreferredGap(
+
org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+
Short.MAX_VALUE).add(topNumberField,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+
53,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)).add(
+
org.jdesktop.layout.GroupLayout.LEADING,
+
TopQueryparametersPanelLayout.createSequentialGroup().add(topGroupTransLabel)
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(topGroupTransCheckBox))))
+ .add(190, 190, 190)).add(
+
TopQueryparametersPanelLayout.createSequentialGroup().add(
+
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
+
TopQueryparametersPanelLayout.createSequentialGroup().add(11, 11,
11).add(topFilterLabel)).add(
+
TopQueryparametersPanelLayout.createSequentialGroup().addContainerGap().add(topAggregationLabel)))
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(
+
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
+
topFilterField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 250,
Short.MAX_VALUE).add(
+
topAggregationField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 250,
Short.MAX_VALUE))
+ .addContainerGap()));
TopQueryparametersPanelLayout.setVerticalGroup(TopQueryparametersPanelLayout.createParallelGroup(
org.jdesktop.layout.GroupLayout.LEADING).add(
TopQueryparametersPanelLayout.createSequentialGroup().add(
@@ -89,14 +108,23 @@
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(
topOrderLabel).add(topOrderComboBox,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
-
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)).add(
- 14, 14,
14).add(
+
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(
-
topNumberLabel).add(topNumberField,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+
topNumberField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(
+
topNumberLabel)).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(
+
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
+
topGroupTransLabel).add(topGroupTransCheckBox)).addPreferredGap(
+
org.jdesktop.layout.LayoutStyle.RELATED).add(
+
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(
+
topFilterLabel).add(topFilterField,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(
-
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
-
topGroupTransLabel).add(topGroupTransCheckBox)).addContainerGap(58,
Short.MAX_VALUE)));
+
TopQueryparametersPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(
+
topAggregationLabel).add(topAggregationField,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
+
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
org.jdesktop.layout.GroupLayout layout = new
org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
@@ -110,20 +138,33 @@
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE).addContainerGap()));
}
+ public String getAggregation() {
+ return topAggregationField.getText();
+ }
+
public String getElement() {
- return (String) this.topElementComboBox.getSelectedItem();
+ return (String) topElementComboBox.getSelectedItem();
}
- public String getOrderBy() {
- return (String) this.topOrderComboBox.getSelectedItem();
+ public String getFilter() {
+ return topFilterField.getText();
}
public String getNumber() {
- return this.topNumberField.getText();
+ return topNumberField.getText();
}
+ public String getOrderBy() {
+ return (String) topOrderComboBox.getSelectedItem();
+ }
+
public String getTransGroup() {
- return
String.valueOf(this.topGroupTransCheckBox.isSelected());
+ return String.valueOf(topGroupTransCheckBox.isSelected());
}
+ @Override
+ public String toString() {
+ return "Top query";
+ }
+
}
- perfsonar: r2642 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels, svnlog, 08/13/2007
Archive powered by MHonArc 2.6.16.