Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group jobs on the front page #734

Merged
merged 1 commit into from
Aug 23, 2016
Merged

Group jobs on the front page #734

merged 1 commit into from
Aug 23, 2016

Conversation

jmancewicz
Copy link
Contributor

There's been a request to provide the ability to group jobs on the front page so that related jobs can be grouped together.

This is a first pass at adding that sort of feature to the front page of DIGITS.

In this branch, there is a Group checkbox that toggles grouping in the view which is on by default.
screen shot 2016-05-10 at 4 10 40 pm

Without grouping
screen shot 2016-05-10 at 4 12 47 pm

The Toggle View checkbox toggles between the table style view and the list style, but the list style will be removed soon. I had just wanted to see how I liked it, and it turns out that I don't.

screen shot 2016-05-10 at 4 14 46 pm

It's a real estate hog.

There's a Group button which assigns the group for the selected jobs.

Select jobs and click the Group button
screen shot 2016-05-10 at 4 15 52 pm

Enter a name
screen shot 2016-05-10 at 4 16 28 pm

Selected jobs are assigned to that group.
screen shot 2016-05-10 at 4 17 30 pm

The group is a property of the job, basically a specific tag. Currently, the only way to assign groups is through the above method. Groups could be assigned at creation time with an optional field near the name field. That way jobs that are generated with a parameter sweep could all be assigned the same group.

This is not ready for code review. I'm going to move the javascript for this and #728 into separate files, and tidy up a little.

@gheinrich
Copy link
Contributor

That looks great! The dataset and model lists are showing pretty much the same thing except for framework/backend. Could we merge these lists to show a single job list? That would save a lot of space on the main page and with the filters it would be easy to select between datasets and models.

@lukeyeager
Copy link
Member

#728 is merged. Looks like it caused a conflict with this one?

@lukeyeager
Copy link
Member

How do I un-group jobs?

@jmancewicz
Copy link
Contributor Author

You can set the group to ungrouped, which is a group. I can make it so that empty string maps to ungrouped and I could add an ungroup button, but I don't love that because of UI bloat.

@lukeyeager
Copy link
Member

#728 is merged. Looks like it caused a conflict with this one?

ping

@jmancewicz jmancewicz force-pushed the groups branch 4 times, most recently from 9711ef5 to c6d0462 Compare July 6, 2016 17:10
@jmancewicz
Copy link
Contributor Author

This is a reimplementation of the group changes onto the recent master. It's pretty much the same. The Group Name modal explains that a blank name ungroups the jobs.

screen shot 2016-07-06 at 10 33 51 am

There are now Group Name forms added to new Job pages.

screen shot 2016-07-06 at 10 35 51 am

The Group Jobs toggle is saved to local storage, which means that it is shared with all the window/tabs viewing DIGITS. If there are multiple windows open viewing DIGITS front page, and the Group Jobs is toggled in one window, it will toggle in all windows. Likewise, the Models table column visibility settings are saved in local storage, and changes in one view affect the other views.

To allow potentially desirable differences in views, things like the column sorting state and group bar collapsed state are not saved in local storage and are therefore not persistent between sessions.

@jmancewicz
Copy link
Contributor Author

@gheinrich or @lukeyeager, any objection to me merging this?

try:
job = scheduler.get_job(job_id)
if job is None:
print '%s not found' % job_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe replace with log points (logger.warning(...))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@gheinrich
Copy link
Contributor

gheinrich commented Jul 8, 2016

Hi Joe, that's a very useful PR. Is there a way in which those Javascripts can be updated without requiring a browser cache flush? When you switch back and forth between these PRs the home page UI acts erratically.

@lukeyeager
Copy link
Member

Is there a way in which those Javascripts can be updated without requiring a browser cache flush? When you switch back and forth between these PRs the home page UI acts erratically.

I agree, this is annoying. Rails has a nice solution. I wonder if there's a parallel for Flask?

In production, Rails inserts an MD5 fingerprint into each filename so that the file is cached by the web browser. You can invalidate the cache by altering this fingerprint, which happens automatically whenever you change the file contents.
http://edgeguides.rubyonrails.org/asset_pipeline.html#main-features

@jmancewicz
Copy link
Contributor Author

I'm unable to reproduce the erratic behaviour. I've been swapping between this branch and master as well as staying on this branch and checking out master versions of the js files. I've been reloading the home page while DIGITS restarts with reloader, and still don't see anything out of the ordinary. @lukeyeager, perhaps you can help me reproduce this Monday.

@@ -15,7 +15,7 @@
from digits.utils import sizeof_fmt, filesystem as fs

# NOTE: Increment this everytime the pickled object changes
PICKLE_VERSION = 1
PICKLE_VERSION = 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure a version bump is warranted for this change.

@jmancewicz jmancewicz merged commit 8f20853 into NVIDIA:master Aug 23, 2016
@jmancewicz jmancewicz deleted the groups branch August 23, 2016 05:30
SlipknotTN pushed a commit to cynnyx/DIGITS that referenced this pull request Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants