Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360430 - [LML] Filtering in the Jobs Table Views
Summary: [LML] Filtering in the Jobs Table Views
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RM (show other bugs)
Version: 5.0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Claudia Knobloch CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 356948 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-10 08:28 EDT by Claudia Knobloch CLA
Modified: 2012-06-26 07:56 EDT (History)
1 user (show)

See Also:


Attachments
Picture of the current filter dialog (9.68 KB, image/jpeg)
2011-10-10 08:28 EDT, Claudia Knobloch CLA
no flags Details
Filter menu example (46.66 KB, image/tiff)
2011-10-10 10:06 EDT, Greg Watson CLA
no flags Details
Implementation of the feature - filtering (59.87 KB, patch)
2012-01-06 08:28 EST, Claudia Knobloch CLA
no flags Details | Diff
Fixing an error. (140.36 KB, patch)
2012-01-13 03:05 EST, Claudia Knobloch CLA
no flags Details | Diff
Improvement (17.54 KB, patch)
2012-04-04 09:28 EDT, Claudia Knobloch CLA
no flags Details | Diff
Sever side implementation of the filtering feature (291.76 KB, patch)
2012-06-26 07:43 EDT, Claudia Knobloch CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Claudia Knobloch CLA 2011-10-10 08:28:55 EDT
Created attachment 204875 [details]
Picture of the current filter dialog

Due to the usual big amount of queued jobs it is easy to loss the overview. Therefore the idea of offering an filter functionality came up.

During the beginning of the implementation several ideas about the handling of the filter functionality came into our mind which can influence the further implementation. To get more knowledge about the user requirements and desired features I opened this bug.

At the moment you can choose only one column out of a combo box and set the value which should only be displayed in the chosen column. (see also picture)

Is it of interest to set an filtering option for several columns at the same time? Is it of interest if a filtering value can be also excluded? This feature also for several values?
Comment 1 Greg Watson CLA 2011-10-10 10:06:32 EDT
I think filtering for several columns would be useful. For example, I might want to only see jobs for one user in a particular queue. I can't think of a good use case for exclusions, so I would not spend time on this now.

The filter menu should be accessed by a view menu (using an inverted triangle on the right hand side of the view). I woul like a special filter for the user's own jobs that would be activated by the first menu item. The general filters dialog should be accessed through a Filters... menu item. See the attached image for an example.
Comment 2 Greg Watson CLA 2011-10-10 10:06:56 EDT
Created attachment 204885 [details]
Filter menu example
Comment 3 Claudia Knobloch CLA 2011-10-10 10:19:21 EDT
(In reply to comment #1)
 
> The filter menu should be accessed by a view menu (using an inverted triangle
> on the right hand side of the view). I woul like a special filter for the
> user's own jobs that would be activated by the first menu item. The general
> filters dialog should be accessed through a Filters... menu item. See the
> attached image for an example.

In the implementation a menu item is already included.

For the  filter for the user's own jobs: How do I get the id of the user?

At the moment it is only possible to filter for active columns. Is this okay?
Comment 4 Greg Watson CLA 2011-10-10 10:20:14 EDT
Other comments:

1. Filtering should not be provided on the status column as this doesn't really
make sense.

2. For the filter dialog, I would suggest a table containing three columns. The
first column would be a checkbox that enables/disables filtering for the entry.
The second column would be the name of the jobs table column to be filtered.
The third column would be either a dropdown combo if you know the possible
values, or an editable text field if you don't. This table would be
pre-populated with an entry for each column in the jobs table that can be
filtered.
Comment 5 Greg Watson CLA 2011-10-10 10:21:53 EDT
(In reply to comment #3)
> (In reply to comment #1)
> 
> > The filter menu should be accessed by a view menu (using an inverted triangle
> > on the right hand side of the view). I woul like a special filter for the
> > user's own jobs that would be activated by the first menu item. The general
> > filters dialog should be accessed through a Filters... menu item. See the
> > attached image for an example.
> 
> In the implementation a menu item is already included.

Great.

> 
> For the  filter for the user's own jobs: How do I get the id of the user?

IRemoteConnect#getUsername() for the remote connection.

> 
> At the moment it is only possible to filter for active columns. Is this okay?

Yes, I think that's fine.
Comment 6 Claudia Knobloch CLA 2011-10-11 04:27:15 EDT
(In reply to comment #5)

>  
>  For the  filter for the user's own jobs: How do I get the id of the user?
> 
> IRemoteConnect#getUsername() for the remote connection.

I would like if the username would be transmitted as a argument in the method call openLgui() in the method doStartup(LMLRsourceManagerMonitor), but the RemoteConnection is later generated and checked afterwards. I am not sure if I should move the method call of openLgui() into the construction which checks that the remote connection is  not null.

First, I will add the username as atrribute in the method call update() in MonitorJob.
Comment 7 Claudia Knobloch CLA 2011-10-11 04:45:28 EDT
(In reply to comment #4)
> Other comments:
> 
> 1. Filtering should not be provided on the status column as this doesn't really
> make sense.

Wolfgang suggested to allow the filtering of the status column, but only in the InactiveJobView.
Comment 8 Greg Watson CLA 2011-10-11 10:13:16 EDT
(In reply to comment #6)
> (In reply to comment #5)
> 
> >
> >  For the  filter for the user's own jobs: How do I get the id of the user?
> >
> > IRemoteConnect#getUsername() for the remote connection.
> 
> I would like if the username would be transmitted as a argument in the method
> call openLgui() in the method doStartup(LMLRsourceManagerMonitor), but the
> RemoteConnection is later generated and checked afterwards. I am not sure if I
> should move the method call of openLgui() into the construction which checks
> that the remote connection is  not null.
> 
> First, I will add the username as atrribute in the method call update() in
> MonitorJob.

Here is a patch that adds the username as an argument to openLgui():

### Eclipse Workspace Patch 1.0
#P org.eclipse.ptp.rm.lml.monitor.core
Index: src/org/eclipse/ptp/rm/lml/monitor/core/LMLResourceManagerMonitor.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/rms/org.eclipse.ptp.rm.lml.monitor.core/src/org/eclipse/ptp/rm/lml/monitor/core/LMLResourceManagerMonitor.java,v
retrieving revision 1.24
diff -u -r1.24 LMLResourceManagerMonitor.java
--- src/org/eclipse/ptp/rm/lml/monitor/core/LMLResourceManagerMonitor.java	6 Sep 2011 11:31:32 -0000	1.24
+++ src/org/eclipse/ptp/rm/lml/monitor/core/LMLResourceManagerMonitor.java	11 Oct 2011 14:11:42 -0000
@@ -364,32 +364,39 @@
 
 			jobs = reload(memento);
 		}
-		/*
-		 * Initialize LML classes
-		 */
-		fLMLManager.openLgui(getResourceManager().getUniqueName(), getMonitorConfigurationRequestType(), layout, jobs);
-		/*
-		 * Open connection and launch periodic job
-		 */
+
 		final IRemoteConnection conn = getRemoteConnection(monitor);
-		if (conn != null) {
-			if (!conn.isOpen()) {
-				try {
-					conn.open(monitor);
-				} catch (final RemoteConnectionException e) {
-					throw new CoreException(new Status(IStatus.ERROR, LMLMonitorCorePlugin.getUniqueIdentifier(), e.getMessage()));
-				}
+		if (conn == null) {
+			throw new CoreException(new Status(IStatus.ERROR, LMLMonitorCorePlugin.getUniqueIdentifier(),
+					Messages.LMLResourceManagerMonitor_unableToOpenConnection));
+		}
+
+		if (!conn.isOpen()) {
+			try {
+				conn.open(monitor);
+			} catch (final RemoteConnectionException e) {
+				throw new CoreException(new Status(IStatus.ERROR, LMLMonitorCorePlugin.getUniqueIdentifier(), e.getMessage()));
 			}
 			if (!conn.isOpen()) {
 				throw new CoreException(new Status(IStatus.ERROR, LMLMonitorCorePlugin.getUniqueIdentifier(),
 						Messages.LMLResourceManagerMonitor_unableToOpenConnection));
 			}
-			synchronized (this) {
-				if (fMonitorJob == null) {
-					fMonitorJob = new MonitorJob(Messages.LMLResourceManagerMonitor_LMLMonitorJob, conn);
-				}
-				fMonitorJob.schedule();
+		}
+
+		/*
+		 * Initialize LML classes
+		 */
+		fLMLManager.openLgui(getResourceManager().getUniqueName(), conn.getUsername(), getMonitorConfigurationRequestType(),
+				layout, jobs);
+
+		/*
+		 * Start monitoring job
+		 */
+		synchronized (this) {
+			if (fMonitorJob == null) {
+				fMonitorJob = new MonitorJob(Messages.LMLResourceManagerMonitor_LMLMonitorJob, conn);
 			}
+			fMonitorJob.schedule();
 		}
 
 		/*
Comment 9 Greg Watson CLA 2011-10-11 10:13:38 EDT
(In reply to comment #7)
> (In reply to comment #4)
> > Other comments:
> >
> > 1. Filtering should not be provided on the status column as this doesn't
> really
> > make sense.
> 
> Wolfgang suggested to allow the filtering of the status column, but only in the
> InactiveJobView.

Fine.
Comment 10 Greg Watson CLA 2011-11-18 17:11:23 EST
*** Bug 356948 has been marked as a duplicate of this bug. ***
Comment 11 Claudia Knobloch CLA 2012-01-06 08:28:53 EST
Created attachment 209128 [details]
Implementation of the feature - filtering

With these changes it is possible to filter within the TableView of PTP. The filtering is yet only on the client side.

Further updates will come.
Comment 12 Claudia Knobloch CLA 2012-01-13 03:05:23 EST
Created attachment 209432 [details]
Fixing an error.

If the button OK or the button Apply of the FilterDialog were pushed during an Update of one of the Resource Managers Eclipse PTP crashed.

The attached patch is solving the problem.
Comment 13 Claudia Knobloch CLA 2012-04-04 09:28:44 EDT
Created attachment 213579 [details]
Improvement

Fixing inconsisitent behavior
Comment 14 Claudia Knobloch CLA 2012-06-26 07:43:00 EDT
Created attachment 217876 [details]
Sever side implementation of the filtering feature