Closed Bug 850369 Opened 9 years ago Closed 9 years ago

slave_health "time since last job" column doesn't sort correctly

Categories

(Release Engineering :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hwine, Assigned: coop)

Details

Once the http://build.mozilla.org/builds/last-job-per-slave.html page has loaded, you can't sort by correctly by "time since last job", as it does a lexical sort.

If not trivial config change, imo would be better to disable client side sort for that column.
last-job-per-slave.html has been deprecated, but the new system has the same problem. For example:

https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slavetype.html?class=build&type=bld-centos5-32-vmw

On the basis that sorting still lets you visually "group" values, I'd personally rather keep the broken sorting in the meantime.
Perhaps we can tell dataTables to disable sort on 'Time since last job' and anyone who wants to can use 'Start time' instead.
well, many ways to slice it -- if the date was in seconds, but we had a fancy display tool to show as relative, we could tell it to sort on the seconds value. Sort of like done in bugzilla (maybe with an addon) - I see relative time, but when I hover absolute time appears. All of that is just in the dom, so DataTables would be able to sort on it, aiui:
 <span title="2013-07-25 15:22:04 PDT" data-timestamp="2013-07-25 15:22:04 PDT" class="bz_comment_time">1 hour ago</span>
Product: mozilla.org → Release Engineering
Found in triage.
Component: Other → Tools
Replaced by slave health:

https://secure.pub.build.mozilla.org/builddata/reports/slave_health/
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Comment 1, https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slavetype.html?class=build&type=bld-linux64-ec2
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Summary: last job per slave columns don't sort correctly → slave_health "time since last job" column doesn't sort correctly
(In reply to Hal Wine [:hwine] (use needinfo) from comment #4)
> well, many ways to slice it -- if the date was in seconds, but we had a
> fancy display tool to show as relative, we could tell it to sort on the
> seconds value. Sort of like done in bugzilla (maybe with an addon) - I see
> relative time, but when I hover absolute time appears. All of that is just
> in the dom, so DataTables would be able to sort on it, aiui:
>  <span title="2013-07-25 15:22:04 PDT" data-timestamp="2013-07-25 15:22:04
> PDT" class="bz_comment_time">1 hour ago</span>

Easiest to add the seconds since last job to the json, create a hidden column to contain it, and then use iDataSort functionality from DataTables as nthomas suggests.
Assignee: nobody → coop
Priority: -- → P3
Taking a closer look, we should be able to accomplish this with the existing tablesorter plugin that's in use:

http://code-cocktail.in/hidden-value-sorting-in-jquery-tablesorter-plugin/

I've already added the elapsed_since_job_secs to the slavetype json, I just need to get it added to the table as an attribute and write a parser.
Status: REOPENED → ASSIGNED
Priority: P3 → P2
https://hg.mozilla.org/users/coop_mozilla.com/slave_health/rev/8367a8133e3e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Component: Tools → General
You need to log in before you can comment on or make changes to this bug.