Bug 598969

Summary: [RFE] button for expand/collapse all results for job
Product: [Community] Beaker Reporter: Martin Kudlej <mkudlej>
Component: web UIAssignee: beaker-dev-list
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 0.5CC: bpeck, mcsontos, ohudlick, tools-bugs
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: UX
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Screenshot of legacy job list with expander highlighted
none
Screenshot of legacy job list with expanded job none

Description Martin Kudlej 2010-06-02 13:01:46 UTC
Expected results:
There is button/link to expand/collapse all results on job page.

Additional info:
Please inspire in this script:
window.my_array = [];
for (var i in window) {
  if (i.indexOf("showall_") != -1){
    window.my_array.push(i.split("_")[1])
  }
};
$("#toggle_job_history").after("&nbsp;&nbsp;&nbsp;&nbsp;<a href=\'#\' id=\'expan
$("#expand_recipes").click(
  function(){
    for (var i = 0; i < window.my_array.length; i++) {
      if($.cookie("recipe_" + window.my_array[i])) {
        window["shownone_" + window.my_array[i]].call()
      } else { 
        window["showall_" + window.my_array[i]].call()
      }
    }
  }
);

or GreaseMonkey script:
// ==UserScript==
// @name           beaker
// @namespace      *
// @include        *
// ==/UserScript==

function contentEval(source) {
  if ('function' == typeof source) {
    source = '(' + source + ')();'
  }
  var script = document.createElement('script');
  script.setAttribute("type", "application/javascript");
  script.textContent = source;
  document.body.appendChild(script);
  document.body.removeChild(script);
}
var s = 'window.my_array = [];for (var i in window) {if (i.indexOf("showall_") != -1){window.my_array.push(i.split("_")[1])}};$("#toggle_job_history").after("&nbsp;&nbsp;&nbsp;&nbsp;<a href=\'#\' id=\'expand_recipes\'>Expand/collapse recipes</a>");$("#expand_recipes").click(function(){for (var i = 0; i < window.my_array.length; i++){if($.cookie("recipe_" + window.my_array[i])){window["shownone_" + window.my_array[i]].call()}else{window["showall_" + window.my_array[i]].call()}}});';
contentEval(s);

Comment 1 Petr Šplíchal 2010-06-02 13:03:31 UTC
That would be useful, +1.

Comment 2 Kevin Baker 2010-06-22 15:56:24 UTC
Is this the same feature that you see on the legacy rhts server on the job list? http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?status=Queued. Attaching some screenshots to confirm

Comment 3 Kevin Baker 2010-06-22 15:57:31 UTC
Created attachment 425988 [details]
Screenshot of legacy job list with expander highlighted

Comment 4 Kevin Baker 2010-06-22 15:57:58 UTC
Created attachment 425989 [details]
Screenshot of legacy job list with expanded job

Comment 5 Petr Šplíchal 2010-06-25 14:48:52 UTC
Actually, there was no such button in the RHTS and one had to
click on say seven little triangles to open all seven recipes with
detailed results for individual architectures.

The suggested button should manage this in a single click on a
button called "Expand All Recipes" or similar.