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

Updates the order of TonY Portal records and adds UI for user sorting/filtering #354

Merged
merged 16 commits into from
Aug 5, 2019

Conversation

i-ony
Copy link
Contributor

@i-ony i-ony commented Jul 17, 2019

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.

i-ony and others added 11 commits July 11, 2019 23:05
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
@i-ony i-ony requested review from oliverhu and UWFrankGu July 17, 2019 17:32

<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">
Copy link
Member

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

Copy link
Contributor Author

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.

@erwa
Copy link
Contributor

erwa commented Jul 18, 2019

@StanfordMCP , can you upload a screenshot of what the new UI looks like with sorting and filtering capabilities?

Copy link
Contributor

@erwa erwa left a 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!

@i-ony
Copy link
Contributor Author

i-ony commented Jul 19, 2019

@erwa This is a screenshot of the updated UI, in this version (not yet committed) I added footer filters to search by column.

image

@erwa
Copy link
Contributor

erwa commented Jul 19, 2019

Very cool! Love the new UI.

@oliverhu
Copy link
Member

@erwa looks like you are just wfh 😄

@erwa
Copy link
Contributor

erwa commented Jul 19, 2019

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.

Copy link
Contributor

@erwa erwa left a 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?

tony-portal/app/views/tableMetadata.scala.html Outdated Show resolved Hide resolved
tony-portal/app/views/tableMetadata.scala.html Outdated Show resolved Hide resolved
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.
@i-ony
Copy link
Contributor Author

i-ony commented Jul 24, 2019

@erwa removed extraneous non-min files

Copy link
Contributor

@erwa erwa left a 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?

@erwa
Copy link
Contributor

erwa commented Jul 24, 2019

In https://travis-ci.org/linkedin/TonY/builds/562851319?utm_source=github_status&utm_medium=notification, BrowserTest (line 4242) failed with

        Caused by:
        com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "$" is not defined. (script in http://localhost:19001/ from (106, 32) to (130, 10)#108)

@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.
@i-ony
Copy link
Contributor Author

i-ony commented Aug 5, 2019

@erwa added fixes, please take a look.

Copy link
Contributor

@UWFrankGu UWFrankGu left a 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.
@i-ony
Copy link
Contributor Author

i-ony commented Aug 5, 2019

@UWFrankGu addressed comment, please check.

@i-ony i-ony merged commit e7ba614 into master Aug 5, 2019
@erwa
Copy link
Contributor

erwa commented Aug 6, 2019

Nice work! Also, thanks for fixing the build!

i-ony added a commit that referenced this pull request Aug 6, 2019
Updates project version to 0.3.21
i-ony added a commit that referenced this pull request Aug 6, 2019
Updates project version to 0.3.21
i-ony added a commit that referenced this pull request Aug 6, 2019
Updates project version to 0.3.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants