perfsonar-dev - perfsonar: r4902 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ippm ippm/ui/panels ma ma/ui/actions ma/ui/panels plugins ui ui/actions ui/panels
Subject: perfsonar development work
List archive
perfsonar: r4902 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ippm ippm/ui/panels ma ma/ui/actions ma/ui/panels plugins ui ui/actions ui/panels
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4902 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ippm ippm/ui/panels ma ma/ui/actions ma/ui/panels plugins ui ui/actions ui/panels
- Date: Thu, 22 Jan 2009 09:55:32 -0500
Author: nina
Date: 2009-01-22 09:55:32 -0500 (Thu, 22 Jan 2009)
New Revision: 4902
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMMetaDataList.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPairsTableModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPerfsonarModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMTimeIntervalPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRefreshActionAll.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/TimeRange.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/AbstractDatePanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/actions/SetupDataRequestAction.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DatePanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
Log:
initial implementation of point 18
athttp://wiki.perfsonar.net/jra1-wiki/index.php/PerfsonarUI_-_New_feature_-_Discuss
(integration of utilisation & delay metrics)
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMMetaDataList.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMMetaDataList.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMMetaDataList.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -37,6 +37,7 @@
*
*/
public class IPPMMetaDataList extends MetaDataList {
+ //TODO reuse timerange from the parent class
protected Date date;
protected ArrayList<String> nodes;
protected Hashtable<String,ArrayList<String>> params;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPairsTableModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPairsTableModel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPairsTableModel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -23,6 +23,7 @@
import java.util.Observable;
import java.util.Observer;
+import javax.swing.ComboBoxModel;
import javax.swing.table.AbstractTableModel;
import org.perfsonar.perfsonarui.plugins.IUserData;
@@ -33,7 +34,7 @@
* @author Nina Jeliazkova
*
*/
-public class IPPMPairsTableModel extends AbstractTableModel implements
Observer {
+public class IPPMPairsTableModel extends AbstractTableModel implements
Observer {
/**
*
*/
@@ -113,6 +114,7 @@
public void setSelectedItem(IUserData selectedItem) {
mpoints.setSelectedItem(selectedItem);
+
}
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPerfsonarModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPerfsonarModel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMPerfsonarModel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -69,6 +69,7 @@
*/
public class IPPMPerfsonarModel extends PerfsonarModel {
protected MAEndpointList hopsEndpoint = null;
+ //TODO remove dependency of GUI class here
protected IPPMPairsTablePanel pairsPanel = null;
public MAEndpoint getHopsEndpoint() {
@@ -273,22 +274,8 @@
supported.add(PerfsonarSchema.getInstance("ippm"));
return supported;
}
- /*
+
@Override
- protected PSUIAction[] createTimeIntervalSelectionActions() {
-
- PSUIAction[] timeActions = new PSUIAction[timeIntervals.length];
- for (int i=0; i < timeActions.length;i++) {
- timeActions[i] = new TimeSetAndRunAction(
- ((ITimeSetAction)getDataRequestAction())
-
,timeIntervals[i],timeResolution[i],timeIntervalsTitle[i]);
- timeActions[i].setGroup("HIDDEN");
- };
- ((SetupDataRequestAction)
getDataRequestAction()).setTimeInterval(timeIntervals[0]);
- return timeActions;
- }
- */
- @Override
protected MetaDataList createDataList(IUserDataComparator comparator) {
return new IPPMMetaDataList(comparator);
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -25,13 +25,20 @@
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Observable;
import java.util.Observer;
+import javax.swing.AbstractListModel;
import javax.swing.BorderFactory;
+import javax.swing.ComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
@@ -45,12 +52,15 @@
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
+import org.jdesktop.layout.GroupLayout;
+import org.jdesktop.layout.GroupLayout.SequentialGroup;
import org.jfree.chart.ChartColor;
import org.perfsonar.perfsonarui.ippm.IPPMMetaDataList;
import org.perfsonar.perfsonarui.ippm.IPPMPairsTableModel;
import org.perfsonar.perfsonarui.ippm.IPPMUserData;
import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
+import org.perfsonar.perfsonarui.plugins.MetaDataList;
import org.perfsonar.perfsonarui.ui.actions.ITimeSet;
import org.perfsonar.perfsonarui.ui.actions.ITimeSetAction;
import org.perfsonar.perfsonarui.ui.actions.SetupDataRequestAction;
@@ -74,13 +84,113 @@
protected ITimeSetAction timeAction = null;
protected MAEndpoint hopsEndpoint;
+ protected JComboBox sourceBox;
+ protected JComboBox destinationBox;
+
public IPPMPairsTablePanel(IPPMMetaDataList mpoints, IPPMUserData
query, ITimeSetAction action, MAEndpoint hopsEndpoint) {
- super(new BorderLayout());
+ this(mpoints,query,action,hopsEndpoint,true);
+ }
+ public IPPMPairsTablePanel(IPPMMetaDataList mpoints, IPPMUserData
query, ITimeSetAction action, MAEndpoint hopsEndpoint, boolean tableView) {
+ super();
this.hopsEndpoint = hopsEndpoint;
this.query = query;
+ setTimeAction(action);
mpoints.addObserver(this);
+
+ if (tableView)
+ createTableView(mpoints, query);
+ else
+ createListView(mpoints,query);
+
+
+ }
+
+
+ protected void createListView(final IPPMMetaDataList mpoints,
IPPMUserData query) {
+ Dimension d = new Dimension(250,18);
+ final PairsListModel listSource = new PairsListModel(mpoints);
+ final PairsListModel listDestination = new
PairsListModel(mpoints);
+ dateLabel = new JLabel();
+ sourceBox = new JComboBox(listSource);
+ sourceBox.setPreferredSize(d);
+ sourceBox.setMaximumSize(d);
+ sourceBox.setEditable(false);
+ sourceBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ JComboBox cb = (JComboBox)e.getSource();
+ listDestination.setFilter(cb.getSelectedItem());
+ }
+ });
+ destinationBox = new JComboBox(listDestination);
+ destinationBox.setPreferredSize(d);
+ destinationBox.setMaximumSize(d);
+
+ JLabel fromLabel = new JLabel("Source:");
+ JLabel toLabel = new JLabel("Destination:");
+ d = new Dimension(100,18);
+ fromLabel.setPreferredSize(d);
+ fromLabel.setMaximumSize(d);
+ toLabel.setPreferredSize(d);
+ toLabel.setMaximumSize(d);
+
+ JButton retrieve = new JButton("Retrieve");
+ retrieve.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ IUserData pair =
mpoints.getPair(sourceBox.getSelectedItem().toString(),
+
destinationBox.getSelectedItem().toString(),
+ false);
+ setQuery(pair);
+ }
+ });
+
+
+ org.jdesktop.layout.GroupLayout glayout = new
org.jdesktop.layout.GroupLayout(
+ this);
+ setLayout(glayout);
+ glayout.setAutocreateGaps(true);
+ glayout.setAutocreateContainerGaps(true);
+
+
+ SequentialGroup sg = glayout.createSequentialGroup();
+
+ sg.add(glayout.createParallelGroup(GroupLayout.LEADING)
+// .add(dummyLabel)
+ .add(fromLabel)
+ .add(toLabel)
+ );
+ sg.add(glayout.createParallelGroup(GroupLayout.LEADING)
+ // .add(dateLabel)
+ .add(sourceBox)
+ .add(destinationBox)
+ );
+ sg.add(glayout.createParallelGroup(GroupLayout.LEADING)
+ .add(retrieve)
+ );
+
+ glayout.setHorizontalGroup(sg);
+
+ SequentialGroup sg1 = glayout.createSequentialGroup();
+
+ sg1.add(glayout.createParallelGroup(GroupLayout.LEADING)
+
+ .add(fromLabel)
+ .add(sourceBox)
+
+ );
+ sg1.add(glayout.createParallelGroup(GroupLayout.LEADING)
+ .add(toLabel)
+ .add(destinationBox)
+ .add(retrieve)
+ );
+ glayout.setVerticalGroup(sg1);
+ setPreferredSize(new Dimension(200,64));
+ setMaximumSize(new Dimension(200,64));
+
+ }
+ protected void createTableView(IPPMMetaDataList mpoints, IPPMUserData
query) {
+ setLayout(new BorderLayout());
model = new IPPMPairsTableModel(mpoints,query);
- setTimeAction(action);
+
table = new JTable(model) {
/**
*
@@ -161,6 +271,7 @@
//setMinimumSize(new Dimension(200,200));
p.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
add(p,BorderLayout.CENTER);
+
dateLabel = new JLabel("");
add(dateLabel,BorderLayout.NORTH);
@@ -171,7 +282,14 @@
}
protected void setQuery(IUserData pair) {
- model.setSelectedItem(pair);
+ if (pair ==null) {
+// ((SetupDataRequestAction)timeAction).setUserData(null);
+// timeAction.actionPerformed(null);
+ return;
+
+ }
+ if (model != null)
+ model.setSelectedItem(pair);
query.setQuery(IPPMUserData.IFNAME_SRC,
pair.getResponse(IPPMUserData.IFNAME_SRC));
query.setQuery(IPPMUserData.IFNAME_DST,
pair.getResponse(IPPMUserData.IFNAME_DST));
if (timeAction != null) {
@@ -299,3 +417,87 @@
}
+class PairsListModel extends AbstractListModel implements
ComboBoxModel,Observer {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4392773041511613824L;
+ protected boolean enabled = true;
+ protected ArrayList<String> filter = null;
+ protected IPPMMetaDataList mpoints;
+ protected Object selectedObject;
+
+ public PairsListModel(IPPMMetaDataList mpoints) {
+ this.mpoints = mpoints;
+ filter = null;
+ mpoints.addObserver(this);
+ if ( getSize() > 0 ) {
+ selectedObject = getElementAt( 0 );
+ }
+ }
+ public void update(Observable arg0, Object arg1) {
+ if (!enabled) return;
+ if (arg0 instanceof MetaDataList) {
+ if ("STRUCTURE".equals(arg1)) {
+ fireContentsChanged(this, -1, -1);
+ if (getSize()>0) setSelectedItem(getElementAt(0));
+ } else {
+ fireContentsChanged(this, -1, -1);
+ }
+
+ }
+ else if (arg0 instanceof IPPMUserData) {
+ if (!mpoints.isNotificationEnabled()) return;
+ if ((arg1 == null) || "Resolution".equals(arg1)
+ || IPPMUserData.IFNAME_DST.equals(arg1) ||
IPPMUserData.IFNAME_SRC.equals(arg1)
+ || IPPMUserData.NMWG_STARTTIME.equals(arg1)
|| IPPMUserData.NMWG_ENDTIME.equals(arg1)) return;
+
+ mpoints.setQuery((IPPMUserData) arg0);
+ fireContentsChanged(this, -1, -1);
+ if (getSize()>0)
+ setSelectedItem(getElementAt(0));
+ }
+
+ }
+
+ public Object getSelectedItem() {
+ return selectedObject;
+ }
+ public void setSelectedItem(Object anObject) {
+ if ((selectedObject != null && !selectedObject.equals( anObject )) ||
+ selectedObject == null && anObject != null) {
+ selectedObject = anObject;
+ fireContentsChanged(this, -1, -1);
+ }
+ }
+
+ public Object getElementAt(int index) {
+ if (filter == null)
+ return mpoints.getPoints().get(index);
+ else
+ return filter.get(index);
+ }
+ public int getSize() {
+ if (filter == null)
+ return mpoints.getPoints().size();
+ else
+ return filter.size();
+ }
+
+ public void setFilter(Object source) {
+ if (source == null) { filter = null; return; }
+
+ if (filter != null) filter.clear();
+ else filter = new ArrayList<String>();
+ for (int i=0; i < mpoints.size(); i++) {
+ if
(source.toString().equals(((IPPMUserData)mpoints.get(i)).getResponse(IPPMUserData.IFNAME_SRC)))
{
+ String f =
((IPPMUserData)mpoints.get(i)).getResponse(IPPMUserData.IFNAME_DST).toString();
+ if (filter.indexOf(f)==-1)
+ filter.add(f);
+ }
+ }
+ if (filter.size()>0)
+ setSelectedItem(filter.get(0));
+ fireContentsChanged(this, -1, -1);
+ }
+}
\ No newline at end of file
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMTimeIntervalPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMTimeIntervalPanel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMTimeIntervalPanel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -115,7 +115,7 @@
timeControls.add(next);
currentGraphTime = startTime; //selected day @ startOfDay
- currentGraphInterval = timeIntervals[0];
+ currentGraphInterval = TimeRange.getDayRange();
setTimeLabels();
timePanelConstraints.gridx = 1;
@@ -169,7 +169,7 @@
for (int i = 0 ; i < intervals.length;i++)
((JButton)intervals[i]).setSelected(false);
intervals[0].setSelected(true);
- currentGraphInterval = timeIntervals[0];
+ currentGraphInterval = TimeRange.getDayRange();
currentGraphTime = startTime; //parametar is day @ startOfDay
setTimeLabels();
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/MainPanelIPPM.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -29,19 +29,20 @@
import javax.swing.JLabel;
import javax.swing.JPanel;
+import org.jdesktop.swingx.JXPanel;
import org.perfsonar.perfsonarui.PSLogger;
import org.perfsonar.perfsonarui.ippm.IPPMMetaDataList;
import org.perfsonar.perfsonarui.ippm.IPPMPerfsonarModel;
import org.perfsonar.perfsonarui.ippm.IPPMUserData;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
import org.perfsonar.perfsonarui.plugins.TimeRange;
+import org.perfsonar.perfsonarui.ui.AbstractDatePanel;
import org.perfsonar.perfsonarui.ui.PerfsonarModel;
import org.perfsonar.perfsonarui.ui.PluginMainContainer;
import org.perfsonar.perfsonarui.ui.actions.ITimeSetAction;
import org.perfsonar.perfsonarui.ui.panels.DatePanel;
import org.perfsonar.perfsonarui.ui.panels.PerfsonarTimeSeriesDataset;
import org.perfsonar.perfsonarui.ui.panels.QueryDetailsPanel;
-import org.perfsonar.perfsonarui.ui.panels.ResponseChartPanel;
/**
*
@@ -50,14 +51,14 @@
* <b>Modified</b> 2005-12-4
*/
public class MainPanelIPPM extends PluginMainContainer {
-
- protected ResponseChartPanel responsePanel = null;
+// protected boolean separatePairsPanel = false;
+// protected ResponseChartPanel responsePanel = null;
- protected JPanel topPanel;
+// protected JPanel topPanel;
- protected JPanel bottomPanel;
+// protected JPanel bottomPanel;
- protected JLabel status = null;
+// protected JLabel status = null;
/**
*
@@ -68,74 +69,81 @@
super(parentFrame, psModel);
}
- @Override
- public Collection<JComponent> createComponents() {
- bottomPanel = new JPanel(new BorderLayout()) {
+ protected AbstractDatePanel createDatePanel(IPerfsonarTab model) {
+ DatePanel datePanel = new DatePanel();
+ datePanel.addPropertyChangeListener(model);
+ return datePanel;
+ }
+ public static JComponent createResponsePanel(IPPMPerfsonarModel
model,AbstractDatePanel mainTimeControl) {
+ JXPanel bottomPanel = new JXPanel(new BorderLayout()) {
@Override
public String toString() {
return "Measurements";
}
};
+ //Panel for controling the time interval displayed on the
graph
+ IPPMTimeIntervalPanel timeControls = new
IPPMTimeIntervalPanel(TimeRange.getToday().getTime()/1000);
+
timeControls.addTimeAction((ITimeSetAction)model.getDataRequestAction());
+ /*
+ * this is to sync with calendar (whenever the a day in the
calendar is selected the
+ * time inteval panel updates its time and vice versa
+ */
+ mainTimeControl.addPropertyChangeListener(timeControls);
+ timeControls.addPropertyChangeListener(mainTimeControl);
+
+
+ bottomPanel.add(timeControls, BorderLayout.NORTH);
+ IPPMResponseChartPanel responsePanel = new
IPPMResponseChartPanel(model,
+
(PerfsonarTimeSeriesDataset)model.getResponseListener());
+ model.getDataList().addObserver(responsePanel);
+ model.getRequest().addPropertyChangeListener(responsePanel);
- IPPMPerfsonarModel psModel = (IPPMPerfsonarModel) model;
-
- DatePanel datePanel = new DatePanel();
- datePanel.addPropertyChangeListener(psModel);
-
-
- topPanel = new JPanel(new BorderLayout()) {
+ bottomPanel.add(responsePanel, BorderLayout.CENTER);
+ return bottomPanel;
+ }
+ public static JComponent createQueryPanel(IPPMPerfsonarModel psModel,
JComponent queryPane) {
+ JXPanel topPanel = new JXPanel(new BorderLayout()) {
@Override
public String toString() {
return "Query";
}
};
-
+ if (queryPane != null)
+ topPanel.add(queryPane,BorderLayout.WEST);
+
+
topPanel.add(createPairsPanel(psModel,true),BorderLayout.CENTER);
+ topPanel.setPreferredSize(new Dimension(600,300));
+ return topPanel;
+
+ }
+ public static JComponent createPairsPanel(IPPMPerfsonarModel
psModel,boolean tableView) {
+ IPPMPairsTablePanel pairsPanel = new
IPPMPairsTablePanel((IPPMMetaDataList)psModel.getDataList(),
+ (IPPMUserData)psModel.getUserData(),
+
(ITimeSetAction)psModel.getDataRequestAction(),
+ psModel.getHopsEndpoint(),
+ tableView
+ );
+ psModel.setPairsPanel(pairsPanel);
+ return pairsPanel;
+ }
+ @Override
+ public Collection<JComponent> createComponents() {
+
+ IPPMPerfsonarModel psModel = (IPPMPerfsonarModel) model;
QueryDetailsPanel scrollPaneQuery = new
QueryDetailsPanel("Query parameters ",
psModel.getUserData(),psModel.getDataList());
-
-
+ AbstractDatePanel datePanel = createDatePanel(psModel);
JPanel leftP = new JPanel();
leftP.setLayout(new BorderLayout());
leftP.add(new JLabel(" Select a day to display the available
measurements: "),
BorderLayout.NORTH);
leftP.add(datePanel,BorderLayout.CENTER);
leftP.add(scrollPaneQuery,BorderLayout.SOUTH);
- topPanel.add(leftP,BorderLayout.WEST);
-
- // MAEndpoint hopsEndpoint = new
MAEndpoint("GEANT-STATUS,http://radagast.rrze.uni-erlangen.de:3070/services/MA/HADES/STATUS,http://ggf.org/ns/nmwg/tools/hades/traceroute,,http://ggf.org/ns/nmwg/tools/hades/traceroute/aggregated/2.0,http://ggf.org/ns/nmwg/tools/hades/traceroute/hoplist/2.0");
-
- IPPMPairsTablePanel pairsPanel = new
IPPMPairsTablePanel((IPPMMetaDataList)psModel.getDataList(),
- (IPPMUserData)psModel.getUserData(),
-
(ITimeSetAction)psModel.getDataRequestAction(),
- psModel.getHopsEndpoint()
- );
- topPanel.add(pairsPanel,BorderLayout.CENTER);
- topPanel.setPreferredSize(new Dimension(600,300));
-
//assigning the pairs panel to model (for changing of the
hoplist service @ runtime)
- ((IPPMPerfsonarModel)model).setPairsPanel(pairsPanel);
-
- psModel.getRequest().addPropertyChangeListener(responsePanel);
PSLogger.configureLog4j("/org/perfsonar/perfsonarui/log4.properties");
-
- //Panel for controling the time interval displayed on the
graph
- IPPMTimeIntervalPanel timeControls = new
IPPMTimeIntervalPanel(TimeRange.getToday().getTime()/1000);
-
timeControls.addTimeAction((ITimeSetAction)((PerfsonarModel)model).getDataRequestAction());
- datePanel.addPropertyChangeListener(timeControls);
- timeControls.addPropertyChangeListener(datePanel);
- //adding calendar sync action (whenever the a day in the
calendar is selected the
- //time inteval panel updates its time
-
- bottomPanel.add(timeControls, BorderLayout.NORTH);
-
-
- responsePanel = new IPPMResponseChartPanel(model,
-
(PerfsonarTimeSeriesDataset)model.getResponseListener());
- model.getDataList().addObserver(responsePanel);
- bottomPanel.add(responsePanel, BorderLayout.CENTER);
-
- return Arrays.asList(new JComponent[]
{topPanel,bottomPanel});
+ return Arrays.asList(new JComponent[]
{createQueryPanel(psModel,leftP),
+ createResponsePanel(psModel,datePanel)});
}
@Override
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -154,12 +154,14 @@
metrics.add(Metric.getInstance(MARequest_NMWG2.NS_UTILIZATION_2_0,"Utilisation","org.perfsonar.perfsonarui.ma.MARequestPerfsonar2_0",0));
metrics.add(Metric.getInstance(MARequest_NMWG2.NS_ERRORS_2_0,"Input
Errors","org.perfsonar.perfsonarui.ma.MARequest_Errors",1));
metrics.add(Metric.getInstance(MARequest_NMWG2.NS_DISCARDS_2_0,"Output
Drops","org.perfsonar.perfsonarui.ma.MARequest_Discards",2));
+ /*
Metric m =
Metric.getInstance("http://ggf.org/ns/nmwg/tools/hades/traceroute/aggregated/2.0","OWD","org.perfsonar.perfsonarui.ippm.IPPMRequest",3);
m.setEnabled(false);
metrics.add(m);
m =
Metric.getInstance("http://ggf.org/ns/nmwg/tools/hades/traceroute/traceroute/2.0","Traceroute","org.perfsonar.perfsonarui.ippm.HoplistRequest",4);
m.setEnabled(false);
metrics.add(m);
+ */
Collections.sort(metrics);
tracerouteShell = new TracerouteShell();
@@ -316,7 +318,7 @@
supported.add(PerfsonarSchema.getInstance("NMWG2v2"));
supported.add(PerfsonarSchema.getInstance("NMWG2v2_netutil"));
supported.add(PerfsonarSchema.getInstance("http://schemas.perfsonar.net/2.0"));
- supported.add(PerfsonarSchema.getInstance("ippm"));
+ //supported.add(PerfsonarSchema.getInstance("ippm"));
return supported;
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRefreshActionAll.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRefreshActionAll.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRefreshActionAll.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -41,7 +41,7 @@
*
*/
public class SetupDataRefreshActionAll extends MetadataRequestAction
implements ITimeSetAction {
- protected TimeRange timeRange = new
TimeRange(System.currentTimeMillis(),TimeRange.timeIntervals[0]);
+ protected TimeRange timeRange = new
TimeRange(System.currentTimeMillis(),TimeRange.timeIntervals[2]);
protected int timeResolution = 300;
protected int ready = 0;
/**
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MainPanelMA.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -33,13 +33,16 @@
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JPanel;
+import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JToolBar;
import javax.swing.SwingConstants;
+import org.jdesktop.swingx.JXPanel;
import org.perfsonar.perfsonarui.ippm.ui.panels.MainPanelIPPM;
import org.perfsonar.perfsonarui.ma.MAPerfsonarModel;
import org.perfsonar.perfsonarui.plugins.IPerfsonarTab;
+import org.perfsonar.perfsonarui.ui.AbstractDatePanel;
import org.perfsonar.perfsonarui.ui.PluginMainContainer;
import org.perfsonar.perfsonarui.ui.panels.PerfsonarTimeSeriesDataset;
import org.perfsonar.perfsonarui.ui.panels.TimeOptionsPanel;
@@ -98,32 +101,60 @@
}
};
top.setLayout(new BorderLayout());
+
+ TimeOptionsPanel timePanel = new TimeOptionsPanel();
+ timePanel.addPropertyChangeListener(model);
+
SearchPanel searchPanel = new
SearchPanel((MAPerfsonarModel)model);
- searchPanel.setMinimumSize(new Dimension(200,160));
- searchPanel.setPreferredSize(new Dimension(360,200));
+ searchPanel.setMinimumSize(new Dimension(200,100));
+ searchPanel.setPreferredSize(new Dimension(360,100));
//fills the panel with traceroute outcome
((MAPerfsonarModel)model).getTracerouteShell().addPropertyChangeListener(searchPanel);
top.add(searchPanel,BorderLayout.CENTER);
top.add(new
MetricsOptionPanel(((MAPerfsonarModel)model).getMetrics()),BorderLayout.EAST);
-
top.add(createSearchToolbar((MAPerfsonarModel)model),BorderLayout.NORTH);
+
top.add(createSearchToolbar((MAPerfsonarModel)model,timePanel),BorderLayout.NORTH);
- MainPanelIPPM ippmPanel = new
MainPanelIPPM(null,((MAPerfsonarModel)getModel()).getIppmModel());
+ //MainPanelIPPM ippmPanel = new
MainPanelIPPM(null,((MAPerfsonarModel)getModel()).getIppmModel());
ArrayList<JComponent> components = new
ArrayList<JComponent>();
components.add(top);
+
+ JXPanel hades = new JXPanel(new BorderLayout()) {
+ @Override
+ public String toString() {
+ return "Available delay measurements";
+ }
+ };
+
+
hades.add(MainPanelIPPM.createPairsPanel(((MAPerfsonarModel)getModel()).getIppmModel(),false),
+ BorderLayout.CENTER);
+
+ JToolBar bar = new JToolBar();
+ bar.setOrientation(JToolBar.VERTICAL);
+ bar.setFloatable(false);
+ bar.setRollover(false);
+
bar.add(((MAPerfsonarModel)getModel()).getIppmModel().getMetadataRequestAction());
+
bar.add(((MAPerfsonarModel)getModel()).getIppmModel().getEndpointsAction());
+ hades.add(bar,BorderLayout.EAST);
+
+ //hades.setPreferredSize(new Dimension(200,200));
+
+ components.add(hades);
components.add(metadataPanel);
components.add(barPanel);
components.add(responsePanel);
+ /*
for (JComponent c : ippmPanel.createComponents())
components.add(c);
- ippmPanel = null;
+ */
+
components.add(MainPanelIPPM.createResponsePanel(((MAPerfsonarModel)getModel()).getIppmModel(),timePanel));
+
return components;
}
- protected JComponent createSearchToolbar(final MAPerfsonarModel psModel)
{
- TimeOptionsPanel timePanel = new TimeOptionsPanel();
- timePanel.addPropertyChangeListener(psModel);
+ protected JComponent createSearchToolbar(final MAPerfsonarModel
psModel,AbstractDatePanel timePanel) {
+
//timePanel.addTimeAction((ITimeSetAction)psModel.get());
JToolBar bar = new JToolBar(SwingConstants.HORIZONTAL);
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/TimeRange.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/TimeRange.java
2009-01-22 12:41:38 UTC (rev 4901)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/TimeRange.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -15,7 +15,7 @@
* Default now, 15 min
*/
public TimeRange() {
- this(System.currentTimeMillis(),TimeRange.timeIntervals[0]);
+ this(System.currentTimeMillis(),TimeRange.getDayRange());
}
public TimeRange(Date start, Date end) {
this.start = start.getTime();
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/AbstractDatePanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/AbstractDatePanel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/AbstractDatePanel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -9,7 +9,7 @@
import org.jdesktop.swingx.JXPanel;
import org.perfsonar.perfsonarui.plugins.TimeRange;
-public abstract class AbstractDatePanel extends JXPanel {
+public abstract class AbstractDatePanel extends JXPanel implements
PropertyChangeListener {
protected String propertyName = "date";
public String getPropertyName() {
return propertyName;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/actions/SetupDataRequestAction.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/actions/SetupDataRequestAction.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/actions/SetupDataRequestAction.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -45,7 +45,7 @@
*/
public class SetupDataRequestAction extends PerfsonarRequestAction
implements ITimeSetAction {
protected ITimeValueResponse response = null;
- protected TimeRange timeRange = new
TimeRange(System.currentTimeMillis(),TimeRange.timeIntervals[0]); //15 min
+ protected TimeRange timeRange = new
TimeRange(System.currentTimeMillis(),TimeRange.timeIntervals[2]); //15 min
protected int resolution = 300;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DatePanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DatePanel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/DatePanel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -12,7 +12,7 @@
import org.perfsonar.perfsonarui.plugins.TimeRange;
import org.perfsonar.perfsonarui.ui.AbstractDatePanel;
-public class DatePanel extends AbstractDatePanel implements
PropertyChangeListener {
+public class DatePanel extends AbstractDatePanel {
/**
*
*/
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
2009-01-22 12:41:38 UTC (rev 4901)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
2009-01-22 14:55:32 UTC (rev 4902)
@@ -26,7 +26,7 @@
import org.perfsonar.perfsonarui.ui.AbstractDatePanel;
public class TimeOptionsPanel extends AbstractDatePanel {
- protected long timeInterval=TimeRange.timeIntervals[0];
+ protected long timeInterval=TimeRange.timeIntervals[2];
protected final JSpinner spinner;
protected final JXDatePicker picker;
protected JRadioButton[] rb;
@@ -85,7 +85,7 @@
JLabel duration = new JLabel(" Duration: ");
add(duration);
JComboBox intervals = new JComboBox(timeTitles);
- intervals.setSelectedIndex(0);
+ intervals.setSelectedItem(TimeRange.getDayRange());
intervals.setEditable(false);
intervals.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -121,6 +121,13 @@
public String toString() {
return "Summary statistics";
}
-
+ public void propertyChange(PropertyChangeEvent evt) {
+ if ((evt.getPropertyName()=="date") && (evt.getNewValue() instanceof
TimeRange)) {
+ setTimeRange(new
TimeRange(((TimeRange)evt.getNewValue()).getStart(),TimeRange.getDayRange()),false);
//silent, otherwise will go cyclic notification
+
picker.getMonthView().setSelectionDate(getTimeRange().getStart());
+
picker.getMonthView().setFlaggedDates(getTimeRange().getStart());
+ }
+
+ }
}
- perfsonar: r4902 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ippm ippm/ui/panels ma ma/ui/actions ma/ui/panels plugins ui ui/actions ui/panels, svnlog, 01/22/2009
Archive powered by MHonArc 2.6.16.