-
Notifications
You must be signed in to change notification settings - Fork 164
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
Updates the order of TonY Portal records and adds UI for user sorting/filtering #354
Conversation
When viewing the TonY Portal page, the records are displayed in a random order. This fix displays TonY records sorted by most recent process completion date.
When printing a JobMetadata object using the built in toString() method, a string representation of the object is printed rather than the metadata associated with each object (id, user, started, completed, etc). This fix prints out the associated values for each JobMetadata object when using the toString() method.
In my original toString() function, I included new lines in the returned string to better display the output. It’s preferable in this case to retain the default output and allow the user to construct their own custum string. Also in this change, I perform a minor fix to merge the first two string segments of the output where before they were separate strings.
In my original toString() function, I included new lines in the returned string to better display the output. It’s preferable in this case to retain the default output and allow the user to construct their own custum string. Also in this change, I perform a minor fix to merge the first two string segments of the output where before they were separate strings.
On the TonY portal, jobs are currently ordered by completed date. However jobs that are in progress (without a completed date) retain a random order. This change fixes this issue by ordering records first by completed date (desc), then by started date( desc), and then by username (asc). Therefore, if multiple records have identical completed date timestamps these records will be ordered by start date. And if multiple records have identical start and complete timestamps, then these will be ordered by username.
Adds updates to JobsMetadataPageController.java *Sorts TonY Portal records by complete date, start date, and username
|
||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's download all these resources into resource folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliverhu Addressed comment, please take a look.
@StanfordMCP , can you upload a screenshot of what the new UI looks like with sorting and filtering capabilities? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I didn't know you could add sorting and filtering support with so few lines of code. Datatables is a very cool library!
@erwa This is a screenshot of the updated UI, in this version (not yet committed) I added footer filters to search by column. |
Very cool! Love the new UI. |
@erwa looks like you are just wfh 😄 |
Just checking in on how our fish TonY is doing :). You need to feed it daily and clean its water tank from time to time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. A few minor comments.
Also, it looks like you have both the regular and minified versions of many JS and CSS files checked in -- e.g.:
- jquery.dataTables.js and jquery.dataTables.min.js
- jquery.dataTables.css and jquery.dataTables.min.css
- etc.
Can we only check in the minified versions to save space?
Currently on the TonY Portal, by default records are sorted first by completed date, then started date, then user id. There is no user initiated sorting or filtering functionality. This update adds the ability to sort by column and filter by keyword. In addition, Bootstrap is added to enhance the table format.
When utilizing the TonY portal, users will need to be online in order to enable the sorting/filtering mechanism of the TonY portal in addition to bootstrap formatting due to the usage of CDNs of various packages such as bootstrap, jquery, and datatables. This update replaces the original CDNs with local copies of the relevant files in order for TonY portal to work offline in addition to online.
@erwa removed extraneous non-min files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revision looks good.
I saw in the Travis CI build that "controllers.BrowserTest" failed. Can you see if you can reproduce this issue locally?
In https://travis-ci.org/linkedin/TonY/builds/562851319?utm_source=github_status&utm_medium=notification, BrowserTest (line 4242) failed with
@StanfordMCP , can you take a look and fix this? |
Encountered an issue in which assets are not present in the classloader during testPlayBinary, but are present during runPlayBinary. Will open an issue on the Play Git repo for them to take a look. In the meantime, this fix adds the project directory to the classpath in order for the assets to load during testPlay. In addition, this commit fixes a minor formatting issue in tableMetadata.scala.html.
@erwa added fixes, please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the jdk in .travis.yml file from "oraclejdk8" -> "openjdk8" to pass travis CI.
Java jdk updated to openjdk8 from oraclejdk8. Change was done to pass travis CI as per UWFrankGu's comment.
@UWFrankGu addressed comment, please check. |
Nice work! Also, thanks for fixing the build! |
Updates project version to 0.3.21
Updates project version to 0.3.21
This fix updates the TonY Portal to sort records chronologically. This update also adds a Datatable framework to provide users the ability to sort records by column and to filter records based on individual keywords.