Home | History | Annotate | Download | only in templates
      1 <!DOCTYPE html>
      2 <html id="builder-picker">
      3 <head>
      4     <title>Rebaseline Queue: Builders</title>
      5     <script src="http://test-results.appspot.com/dashboards/builders.js"></script>
      6     <link rel="stylesheet" href="/static/styles.css" type="text/css">
      7 </head>
      8 <body>
      9 
     10 <div id="builder-picker-controls">
     11     <label for="builder-group">Group:</label>
     12     <select id="builder-group">
     13         <option disabled></option>
     14     </select>
     15 
     16     <label for="builder">Builder:</label>
     17     <select id="builder">
     18         <option disabled></option>
     19     </select>
     20 </div>
     21 
     22 <iframe src="/static/builder-frame-empty.html" id="builder-frame"></iframe>
     23 
     24 <script>
     25 function init()
     26 {
     27     var builderGroupMenu = document.getElementById('builder-group');
     28     builderGroupMenu.addEventListener(
     29         'change', handleBuilderGroupSelected, false);
     30 
     31     var builderMenu = document.getElementById('builder');
     32     builderMenu.addEventListener(
     33         'change', handleBuilderSelected, false);
     34 
     35     for (var builderGroupName in LAYOUT_TESTS_BUILDER_GROUPS) {
     36         var builderGroupOption = document.createElement('option');
     37         builderGroupOption.textContent = builderGroupOption.value =
     38             builderGroupName;
     39         builderGroupMenu.appendChild(builderGroupOption);
     40     }
     41 }
     42 
     43 function handleBuilderGroupSelected()
     44 {
     45     var builderGroupMenu = document.getElementById('builder-group');
     46     var builderGroupName =
     47         builderGroupMenu.options[builderGroupMenu.selectedIndex].value;
     48     var builderGroup = LAYOUT_TESTS_BUILDER_GROUPS[builderGroupName];
     49 
     50     var builderMenu = document.getElementById('builder');
     51     while (builderMenu.options[1]) {
     52         builderMenu.removeChild(builderMenu.options[1]);
     53     }
     54 
     55     for (var builderName in builderGroup.builders) {
     56         var builderOption = document.createElement('option');
     57         builderOption.textContent = builderOption.value = builderName;
     58         builderMenu.appendChild(builderOption);
     59     }
     60 }
     61 
     62 function handleBuilderSelected()
     63 {
     64     var builderMenu = document.getElementById('builder');
     65     var builderName = builderMenu.options[builderMenu.selectedIndex].value;
     66     document.getElementById('builder-frame').src =
     67         '/builder/' + builderName + '/queue/edit';
     68 }
     69 
     70 init();
     71 </script>
     72 
     73 </body>
     74 </html>
     75