Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2558 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels

Subject: perfsonar development work

List archive

perfsonar: r2558 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2558 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels
  • Date: Fri, 20 Jul 2007 10:18:04 -0400

Author: gijs
Date: 2007-07-20 10:18:04 -0400 (Fri, 20 Jul 2007)
New Revision: 2558

Added:

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

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/PerfsonarFlowSAModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/UserData.java

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

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


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/PerfsonarFlowSAModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/PerfsonarFlowSAModel.java
2007-07-20 14:06:29 UTC (rev 2557)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/PerfsonarFlowSAModel.java
2007-07-20 14:18:04 UTC (rev 2558)
@@ -8,8 +8,6 @@
package org.perfsonar.perfsonarui.flowsa;

import java.awt.Component;
-import java.io.File;
-import java.net.URL;
import java.util.ArrayList;
import java.util.List;

@@ -19,7 +17,6 @@
import org.perfsonar.perfsonarui.PerfsonarSchema;
import org.perfsonar.perfsonarui.SmartMARequest;
import org.perfsonar.perfsonarui.plugins.IPerfsonarRequest;
-import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.plugins.MAEndpointList;
import org.perfsonar.perfsonarui.ui.PerfsonarModel;
@@ -28,9 +25,12 @@
import org.perfsonar.perfsonarui.ui.actions.PerfsonarRequestAction;
import org.perfsonar.perfsonarui.ui.actions.SetOptionsAction;
import org.perfsonar.perfsonarui.ui.panels.ResponseDetailsPane;
+import org.perfsonar.perfsonarui.ui.panels.UserDataDetailsPane;
+import org.perfsonar.perfsonarui.ui.panels.UserDataPanel;

import org.perfsonar.perfsonarui.flowsa.panels.MainOptionsPanel;
import org.perfsonar.perfsonarui.flowsa.panels.MomentOptionsPanel;
+import org.perfsonar.perfsonarui.flowsa.panels.QueryResultPanel;
import org.perfsonar.perfsonarui.flowsa.panels.RawOptionsPanel;
import org.perfsonar.perfsonarui.flowsa.panels.RawPanel;
import org.perfsonar.perfsonarui.flowsa.panels.RouterOptionsPanel;
@@ -44,11 +44,9 @@
private RawOptionsPanel rawOptionsPanel;
private TopOptionsPanel topOptionsPanel;

- private UserData userData;

public PerfsonarFlowSAModel() {
super();
- this.userData = createUserData();
getEndpointList().setMultipleEndpoints(false);
mainOptionsPanel = new MainOptionsPanel();
momentOptionsPanel = new MomentOptionsPanel();
@@ -67,7 +65,7 @@

@Override
public JComponent[] createOptionsComponent(Component parentComponent)
{
- return new JComponent[] { mainOptionsPanel,
momentOptionsPanel,
+ return new JComponent[] {mainOptionsPanel, momentOptionsPanel,
routerOptionsPanel, rawOptionsPanel,
topOptionsPanel };
}

@@ -78,19 +76,22 @@

public PSUIAction createOptionsAction() {
return new SetOptionsAction(this) {
+
+ private static final long serialVersionUID = 1L;
+
@Override
protected void confirm(JComponent[] optionPanels) {
- userData.setQuery(UserData.QUERYTYPE,
mainOptionsPanel.getQueryType());
- userData.setQuery(UserData.STARTMOMENT,
momentOptionsPanel.getStartMoment());
- userData.setQuery(UserData.ENDMOMENT,
momentOptionsPanel.getEndMoment());
- userData.setQuery(UserData.RAWFILTER,
rawOptionsPanel.getFilter());
- userData.setQuery(UserData.RAWAGGREGATION,
rawOptionsPanel.getAggregation());
- userData.setQuery(userData.RAWFIELDS,
rawOptionsPanel.getFields());
- userData.setQuery(UserData.TOPELEMENTS,
topOptionsPanel.getElement());
- userData.setQuery(UserData.TOPORDERBY,
topOptionsPanel.getOrderBy());
- userData.setQuery(UserData.TOPNUMBER,
topOptionsPanel.getNumber());
- userData.setQuery(UserData.TOPTRANSGROUP,
topOptionsPanel.getTransGroup());
-
+ getUserData().setQuery(UserData.QUERYTYPE,
mainOptionsPanel.getQueryType());
+ getUserData().setQuery(UserData.ROUTERS,
routerOptionsPanel.getRouters());
+ getUserData().setQuery(UserData.STARTMOMENT,
momentOptionsPanel.getStartMoment());
+ getUserData().setQuery(UserData.ENDMOMENT,
momentOptionsPanel.getEndMoment());
+ getUserData().setQuery(UserData.RAWFILTER,
rawOptionsPanel.getFilter());
+
getUserData().setQuery(UserData.RAWAGGREGATION,
rawOptionsPanel.getAggregation());
+ getUserData().setQuery(UserData.RAWFIELDS,
rawOptionsPanel.getFields());
+ getUserData().setQuery(UserData.TOPELEMENTS,
topOptionsPanel.getElement());
+ getUserData().setQuery(UserData.TOPORDERBY,
topOptionsPanel.getOrderBy());
+ getUserData().setQuery(UserData.TOPNUMBER,
topOptionsPanel.getNumber());
+
getUserData().setQuery(UserData.TOPTRANSGROUP,
topOptionsPanel.getTransGroup());
}
};
}
@@ -99,6 +100,7 @@
public JComponent[] createDetailsComponent(Component parentComponent)
{
String[][] s = new String[][] {
{UserData.QUERYTYPE, "Query Type" },
+ {UserData.ROUTERS, "Routers" },
{UserData.STARTMOMENT, "Start Moment" },
{UserData.ENDMOMENT, "End Moment" },
{UserData.RAWFILTER, "Raw Filter rule" },
@@ -109,9 +111,8 @@
{UserData.TOPNUMBER, "Top Numbers" },
{UserData.TOPTRANSGROUP, "Top Group Transport
ports" }
};
- ResponseDetailsPane scrollPaneResponse = new
ResponseDetailsPane(
- " Query Details", getUserData(),
getDataList(), s, false, false);
- return new JComponent[] { scrollPaneResponse };
+ UserDataDetailsPane userDataPanel = new
UserDataDetailsPane("Settings", getUserData(), s, true, false);
+ return new JComponent[] { userDataPanel };
}

@Override
@@ -132,10 +133,7 @@
}

public PluginMainPanel createMainComponent(Component parentComponent)
{
- // return new MainPanel(parentComponent,this);
- return new RawPanel(parentComponent, this);
- // return new StatPanel(parentComponent,this);
- // return new TopPanel(parentComponent,this);
+ return new QueryResultPanel(parentComponent, this,
(UserData)getUserData());
}

@Override

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/UserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/UserData.java
2007-07-20 14:06:29 UTC (rev 2557)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/UserData.java
2007-07-20 14:18:04 UTC (rev 2558)
@@ -3,10 +3,12 @@
$Id$
$Copyright$

-*/
+ */

package org.perfsonar.perfsonarui.flowsa;

+import java.util.Calendar;
+
import org.perfsonar.perfsonarui.AbstractUserData;

public class UserData extends AbstractUserData {
@@ -14,6 +16,7 @@
private static final long serialVersionUID = 1L;

public final static String QUERYTYPE = "Query";
+ public final static String ROUTERS = "Routers";
public final static String STARTMOMENT = "Start Moment";
public final static String ENDMOMENT = "End Moment";
public final static String RAWFILTER = "Raw Filter rule";
@@ -23,4 +26,15 @@
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 UserData() {
+ super();
+
+ // default settings
+ setQuery(UserData.QUERYTYPE, "Raw");
+ long now = Calendar.getInstance().getTimeInMillis() / 1000;
+ setQuery(UserData.STARTMOMENT, String.valueOf(now - 60));
+ setQuery(UserData.ENDMOMENT, String.valueOf(now));
+ }
+
}

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

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
2007-07-20 14:06:29 UTC (rev 2557)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RawOptionsPanel.java
2007-07-20 14:18:04 UTC (rev 2558)
@@ -197,7 +197,10 @@
}

public String getFields() {
- return this.rawFieldsList.getSelectedValues().toString();
+ StringBuffer buffer = new StringBuffer();
+ for (Object value: rawFieldsList.getSelectedValues())
+ buffer.append(value.toString() + " ");
+ return buffer.toString();
}

public String getAggregation() {

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RouterOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RouterOptionsPanel.java
2007-07-20 14:06:29 UTC (rev 2557)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/panels/RouterOptionsPanel.java
2007-07-20 14:18:04 UTC (rev 2558)
@@ -7,6 +7,8 @@

package org.perfsonar.perfsonarui.flowsa.panels;

+import java.util.Collection;
+
public class RouterOptionsPanel extends javax.swing.JPanel {

private static final long serialVersionUID = 1L;
@@ -55,8 +57,11 @@

Short.MAX_VALUE).addContainerGap()));
}

- public Object[] getRouters() {
- return this.routerList.getSelectedValues();
+ public String getRouters() {
+ StringBuffer buffer = new StringBuffer();
+ for (Object value: routerList.getSelectedValues())
+ buffer.append(value.toString() + " ");
+ return buffer.toString();
}

}



  • perfsonar: r2558 - in branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa: . panels, svnlog, 07/20/2007

Archive powered by MHonArc 2.6.16.

Top of Page