Changeset 1814 for XIOS/trunk
- Timestamp:
- 12/19/19 17:18:39 (4 years ago)
- Location:
- XIOS/trunk/xios_test_suite/HTML
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/xios_test_suite/HTML/generate_compile_table.js
r1809 r1814 50 50 // Generate select list for compile table 51 51 52 var sel = document.getElementById("compile_revision"); 53 for (var i=0; i<revision_list.length; i++) 52 var sel = document.getElementById("revision"); 53 54 var sel_options = sel.children 55 56 var new_options=[] 57 for(var i=0; i<sel_options.length-1; i++) 58 { 59 new_options[i] = sel_options[i+1].value 60 } 61 62 for(var i=0; i<revision_list.length; i++) 63 { 64 if (!new_options.includes(revision_list[i])) 65 { 66 new_options.push(revision_list[i]) 67 } 68 } 69 70 new_options.sort(function(a, b){return b-a}) 71 72 while (sel.lastChild && sel.children.length>1) { 73 sel.removeChild(sel.lastChild); 74 } 75 76 for(var i=0; i<new_options.length; i++) 54 77 { 55 78 var opt = document.createElement('option'); 56 opt.appendChild( document.createTextNode( revision_list[i]));57 opt.value = revision_list[i];58 sel.appendChild(opt); 79 opt.appendChild( document.createTextNode(new_options[i])); 80 opt.value = new_options[i]; 81 sel.appendChild(opt); 59 82 } 60 83 … … 81 104 } 82 105 106 var emptyRow = document.createElement("tr") 107 emptyRow.setAttribute("id", "empty_compile_row") 108 emptyRow.style.display="none" 109 table.appendChild(emptyRow) 110 111 var myCell = document.createElement("TD"); 112 myCell.setAttribute("id", "empty_compile_row_revision") 113 myCell.style.fontWeight="bold" 114 emptyRow.appendChild(myCell) 115 116 for (var machine_index=0; machine_index<machine_list.length; machine_index++) 117 { 118 var myCell = document.createElement("TD"); 119 myCell.innerHTML="No Compile Information" 120 myCell.style.color="white" 121 emptyRow.appendChild(myCell) 122 } 123 83 124 for (var i=0; i<revision_list.length; i++) 84 125 { … … 88 129 myRow.setAttribute("id", "compile_table_"+revision); 89 130 myRow.setAttribute("class", "compile_table_row"); 131 table.appendChild(myRow) 90 132 91 133 var myCell = document.createElement("TD"); … … 101 143 myRow.appendChild(myCell) 102 144 } 103 table.appendChild(myRow)104 145 105 146 } … … 152 193 153 194 mySubTable = document.createElement("table") 195 mySubTable.setAttribute("class", "compile_sub_table") 154 196 myTD.appendChild(mySubTable) 155 197 -
XIOS/trunk/xios_test_suite/HTML/generate_test_table.js
r1809 r1814 1 1 var dict = {"-1": "❌", "0": "❎", "1": "✅"} 2 3 // var bg_color = ["#84c5ff", "#96cdff", "#a1d3ff", "#b3dafd", "#c2e1fd"]4 2 5 3 function generateTestTable() … … 50 48 51 49 revision_list.sort(function(a, b){return b-a}); 52 53 54 // Generate select list for compile table 55 56 var sel = document.getElementById("test_revision"); 57 for (var i=0; i<revision_list.length; i++) 50 51 // Generate select list for test table 52 53 var sel = document.getElementById("revision"); 54 55 var sel_options = sel.children 56 57 var new_options=[] 58 for(var i=0; i<sel_options.length-1; i++) 59 { 60 new_options[i] = sel_options[i+1].value 61 } 62 63 for(var i=0; i<revision_list.length; i++) 64 { 65 if (!new_options.includes(revision_list[i])) 66 { 67 new_options.push(revision_list[i]) 68 } 69 } 70 71 new_options.sort(function(a, b){return b-a}) 72 73 while (sel.lastChild && sel.children.length>1) { 74 sel.removeChild(sel.lastChild); 75 } 76 77 for(var i=0; i<new_options.length; i++) 58 78 { 59 79 var opt = document.createElement('option'); 60 opt.appendChild( document.createTextNode(revision_list[i]) ); 61 opt.value = revision_list[i]; 62 sel.appendChild(opt); 63 } 64 65 // Generate content of compile table 80 opt.appendChild( document.createTextNode(new_options[i])); 81 opt.value = new_options[i]; 82 sel.appendChild(opt); 83 } 84 85 86 87 88 // Generate content of test table 66 89 67 90 var table = document.getElementById("test_table") … … 85 108 } 86 109 110 var emptyRow = document.createElement("tr") 111 emptyRow.setAttribute("id", "empty_test_row") 112 emptyRow.style.display="none" 113 table.appendChild(emptyRow) 114 115 var myCell = document.createElement("TD"); 116 myCell.setAttribute("id", "empty_test_row_revision") 117 myCell.style.fontWeight="bold" 118 emptyRow.appendChild(myCell) 119 120 for (var machine_index=0; machine_index<machine_list.length; machine_index++) 121 { 122 var myCell = document.createElement("TD"); 123 myCell.innerHTML="No Test Information" 124 myCell.style.color="white" 125 emptyRow.appendChild(myCell) 126 } 127 128 87 129 for (var i=0; i<revision_list.length; i++) 88 130 { … … 92 134 myRow.setAttribute("id", "test_table_"+revision); 93 135 myRow.setAttribute("class", "test_table_row"); 136 table.appendChild(myRow) 94 137 95 138 var myCell = document.createElement("TD"); … … 106 149 myRow.appendChild(myCell) 107 150 } 108 table.appendChild(myRow)109 151 } 110 152 … … 128 170 if (!has_test_info) 129 171 { 130 console.log("revision ",revision, "machine ",machine," has no test information")131 172 var myTD = document.getElementById("test_table_"+revision+"_"+machine); 132 173 myTD.innerHTML = "No Test Information" … … 170 211 myCell_3.setAttribute("id", "test_sub_table_"+revision+"_"+machine+"_"+build_dir+"_dropdown") 171 212 myCell_4 = document.createElement("a") 172 myCell_4.innerHTML = ("show pl ein report")173 myCell_4.onclick = function() {show_pl ein_report(machine, revision, build_dir)}213 myCell_4.innerHTML = ("show plain report") 214 myCell_4.onclick = function() {show_plain_report(machine, revision, build_dir)} 174 215 myCell_5 = document.createElement("a") 175 216 myCell_5.innerHTML = ("show xios info") … … 428 469 } 429 470 430 // function build_level_toggle(classname)431 // {432 // var myCells = document.getElementsByClassName(classname)433 // for (var i=0; i<myCells.length; i++)434 // {435 // var mySubCells = document.getElementsByClassName(myCells[i].id)436 // if (myCells[i].style.display=="table-row")437 // {438 // myCells[i].style.display="none"439 // for(var j=0; j<mySubCells.length; j++)440 // {441 // mySubCells[j].style.display="none"442 // var mySubSubCells = document.getElementsByClassName(mySubCells[j].id)443 // for(var k=0; k<mySubSubCells.length; k++)444 // {445 // mySubSubCells[k].style.display="none"446 // }447 // }448 // }449 // else450 // {451 // myCells[i].style.display="table-row"452 // }453 // }454 // }455 456 // function algo_level_toggle(classname)457 // {458 // var myCells = document.getElementsByClassName(classname)459 // for (var i=0; i<myCells.length; i++)460 // {461 // var mySubCells = document.getElementsByClassName(myCells[i].id)462 // if (myCells[i].style.display=="table-row")463 // {464 // myCells[i].style.display="none"465 // for(var j=0; j<mySubCells.length; j++)466 // {467 // mySubCells[j].style.display="none"468 // }469 // }470 // else471 // {472 // myCells[i].style.display="table-row"473 // }474 // }475 // }476 477 // function config_level_toggle(classname)478 // {479 // var myCells = document.getElementsByClassName(classname)480 // for (var i=0; i<myCells.length; i++)481 // {482 // if (myCells[i].style.display=="table-row")483 // {484 // myCells[i].style.display="none"485 // }486 // else487 // {488 // myCells[i].style.display="table-row"489 // }490 // }491 // } -
XIOS/trunk/xios_test_suite/HTML/xios-style.css
r1809 r1814 13 13 { 14 14 clear: both; 15 border:2px solid blue;16 15 margin-top:50px; 17 16 vertical-align: top; … … 23 22 } 24 23 25 strong 24 caption 26 25 { 27 background-color:red;/* Fond rouge */ 28 color:yellow;/* Texte de couleur jaune */ 26 font-size: 1.4em; 27 font-weight: bold; 28 caption-side: top; 29 margin-bottom: 20px; 30 text-align: left; 29 31 } 30 31 32 em33 {34 font-weight: bold;35 font-size: 1.2em;36 text-align: right;37 }38 39 32 40 33 … … 51 44 52 45 53 td54 {55 border: solid 1px white;56 }57 58 46 h1, h2 59 47 { 60 text-align: center;48 text-align: left; 61 49 } 62 50 … … 98 86 } 99 87 100 .showit101 {102 display: block;103 }104 105 88 106 89 .compile_table … … 109 92 margin-bottom: 30px; 110 93 margin-top: 30px; 94 border-collapse: collapse; 111 95 } 112 96 … … 115 99 margin-left: 20px; 116 100 margin-bottom: 10px; 117 border: solid 1px white;101 border: solid 2px white; 118 102 min-width: 150px; 119 103 text-align: center; 104 } 105 106 .compile_sub_table td 107 { 108 border: solid 1px white; 109 } 110 111 .compile_sub_table 112 { 113 border-collapse: collapse; 114 margin-top: 10px; 115 margin-bottom: 10px; 116 margin-left: 10px; 117 margin-right: 10px; 118 120 119 } 121 120 … … 125 124 margin-bottom: 30px; 126 125 margin-top: 30px; 126 border-collapse: collapse; 127 127 } 128 128 … … 132 132 margin-bottom: 10px; 133 133 border: solid 2px white; 134 /* min-width: 150px; */135 134 text-align: center; 136 135 } 137 136 137 138 138 .test_sub_table 139 139 { 140 /* margin-left: 10px; */140 border-collapse: collapse; 141 141 margin-bottom: 10px; 142 142 margin-top: 10px; 143 margin-left: 10px; 144 margin-right: 10px; 143 145 } 144 146 145 147 .test_sub_table td 146 148 { 147 /* margin-left: 20px;148 margin-bottom: 10px; */149 149 border: solid 1px white; 150 /* min-width: 150px; */151 150 text-align: left; 152 151 } … … 174 173 175 174 176 .split177 {178 height: 100%;179 width: 50%;180 position: absolute;181 }182 183 /* Control the left side */184 .left185 {186 left: 0;187 }188 189 /* Control the right side */190 .right191 {192 right: 0;193 }194 175 195 176 .compile_table_row.hide … … 200 181 .compile_table_row.show 201 182 { 202 display: " ";183 display: "table-row"; 203 184 } 204 185 … … 210 191 .test_table_row.show 211 192 { 212 display: " ";193 display: "table-row"; 213 194 } 214 215 .table_jz216 {217 border: solid 0.2px black;218 margin: 20px;219 }220 221 .table_jz.hide222 {223 display: none;224 }225 226 .table_jz.show227 {228 display: "";229 }230 231 232 .table_jz td233 {234 border: solid 0.1px white;235 }236 237 .table_irene238 {239 border: solid 0.2px black;240 margin: 20px;241 }242 243 .table_irene.hide244 {245 display: none;246 }247 248 .table_irene.show249 {250 display: "";251 }252 253 .table_irene td254 {255 border: solid 0.1px white;256 } -
XIOS/trunk/xios_test_suite/HTML/xios_report.html
r1809 r1814 5 5 <link rel="stylesheet" href="xios-style.css"/> 6 6 <title>XIOS Unit Tests Report - Le Site Web</title> 7 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>8 7 9 8 <script src="generate_compile_table.js" type="text/javascript"></script> … … 15 14 <script src="https://forge.ipsl.jussieu.fr/ioserver/chrome/site/XIOS_TEST_SUITE/compile_jeanzay_info.js" type="text/javascript"></script> 16 15 <script src="https://forge.ipsl.jussieu.fr/ioserver/chrome/site/XIOS_TEST_SUITE/test_jeanzay_info.js" type="text/javascript"></script> 16 17 17 </head> 18 18 … … 21 21 <header> 22 22 <h1>XIOS Unit Tests Report Web Page</h1> 23 < h2>(still under construction ... ...)</h2>23 <!-- <h2>(still under construction ... ...)</h2> --> 24 24 </header> 25 25 26 26 <nav> 27 <div id="navborder">28 < p id="xiosinfo">Some useful links:</p>27 <div> 28 <!-- <p id="xiosinfo">Some useful links:</p> --> 29 29 <ul> 30 30 <li><a href="https://forge.ipsl.jussieu.fr/ioserver/wiki" target="_blank">XIOS wiki page</a></li> 31 <li><a href="graph.html" target="_blank">Workflow Graph </a></li>31 <li><a href="graph.html" target="_blank">Workflow Graph Visualizer</a></li> 32 32 </ul> 33 33 </div> … … 38 38 <section> 39 39 40 < h2>Results of unit tests</h2>40 <!-- <h2>Results of unit tests</h2> --> 41 41 42 42 <form method="post" style="margin-left: 25px;"> 43 43 44 <p><label for="Build revision">Choose a revision number to show compile information: </label>45 <select name="revision" id=" compile_revision">44 <p><label for="Build revision">Choose a revision number to show compile and test results : </label> 45 <select name="revision" id="revision"> 46 46 <option value="0" selected>All available revisions ...</option> 47 47 </select> 48 48 </p> 49 49 50 <p><label for="Test revision">Choose a revision number to show test results : </label>51 <select name="test_revision" id="test_revision">52 <option value="0" selected>All available revisions ...</option>53 </select>54 </p>55 56 57 50 </form> 58 51 … … 66 59 67 60 <div> 68 <table id="compile_table" style="margin: 50px; border:solid 0.2px; "> 61 <table id="compile_table" style="margin: 50px;"> 62 <caption>Table of XIOS Compile status</caption> 69 63 <tr style="font-weight: bold;" id="compile_table_row0"></tr> 70 64 </table> … … 72 66 73 67 74 <div> 75 <table id="test_table" style="margin: 50px; border:solid 0.2px; "> 68 <div style="margin-top: 100px;"> 69 <table id="test_table" style="margin: 50px;"> 70 <caption>Table of XIOS unit tests results</caption> 76 71 <tr style="font-weight: bold;" id="test_table_row0"></tr> 77 72 </table> 78 73 </div> 79 74 80 81 <!-- <div class="split left">82 <div class="centered" id="div_table_jz">83 </div>84 </div>85 86 <div class="split right">87 <div class="centered" id="div_table_irene">88 </div>89 </div> -->90 75 91 76 </section> … … 101 86 102 87 <script> 103 // global variables for machine, def file location, and plein report prefix104 var machine_list=['Jean-Zay', 'Irene', 'Other'];105 var location_list=["../Jean-Zay/", "../Irene/", "../Other"];106 var plein_report_prefix_list=["jz_plein_report_", "irene_plein_report_", "other_plein_report_"];107 88 108 89 var params = "scrollbars=yes,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=600,height=300,left=100,top=100"; … … 139 120 140 121 141 function show_pl ein_report(machine, revision, build_dir)122 function show_plain_report(machine, revision, build_dir) 142 123 { 143 124 var info_list = eval("test_"+machine+"_"+revision+"_"+build_dir.replace("build_","")) … … 179 160 <script> 180 161 181 $("#compile_revision").change(function() { 182 183 if(this.value == 0) 184 { 185 var ans = document.getElementsByClassName('compile_table_row') 186 for (var i = 0; i < ans.length; i++) 187 { 188 cell = ans[i] 189 cell.classList.remove('hide') 190 cell.classList.add('show') 191 } 192 } 193 194 else 195 { 196 var ans = document.getElementsByClassName('compile_table_row') 197 for (var i = 0; i < ans.length; i++) 198 { 199 cell = ans[i] 200 cell.classList.remove('show') 201 cell.classList.add('hide') 202 } 203 204 var ans = document.getElementById('compile_table_'+this.value) 205 if(ans) 206 { 207 ans.classList.remove('hide') 208 ans.classList.add('show') 209 } 210 } 211 }); 212 213 </script> 214 215 216 <script> 217 218 $("#test_revision").change(function() { 219 162 document.getElementById("revision").addEventListener("change", myFunction); 163 164 function myFunction() 165 { 220 166 if(this.value == 0) 221 167 { 222 var ans = document.getElementsByClassName('test_table_row') 168 // compile part ... 169 170 var ans = document.getElementsByClassName('compile_table_row') 223 171 for (var i = 0; i < ans.length; i++) 224 172 { … … 227 175 cell.classList.add('show') 228 176 } 177 document.getElementById("empty_compile_row").style.display="none" 178 179 // test part ... 180 181 var ans = document.getElementsByClassName('test_table_row') 182 for (var i = 0; i < ans.length; i++) 183 { 184 cell = ans[i] 185 cell.classList.remove('hide') 186 cell.classList.add('show') 187 } 188 document.getElementById("empty_test_row").style.display="none" 229 189 } 230 190 231 191 else 232 192 { 233 var ans = document.getElementsByClassName('test_table_row') 193 // compile part ... 194 195 var ans = document.getElementsByClassName('compile_table_row') 234 196 for (var i = 0; i < ans.length; i++) 235 197 { … … 238 200 cell.classList.add('hide') 239 201 } 240 202 document.getElementById("empty_compile_row").style.display="none" 203 204 var ans = document.getElementById('compile_table_'+this.value) 205 if(ans) 206 { 207 ans.classList.remove('hide') 208 ans.classList.add('show') 209 } 210 else 211 { 212 document.getElementById("empty_compile_row_revision").innerHTML=this.value 213 document.getElementById("empty_compile_row").style.display="table-row" 214 } 215 216 217 // test part ... 218 219 var ans = document.getElementsByClassName('test_table_row') 220 for (var i = 0; i < ans.length; i++) 221 { 222 cell = ans[i] 223 cell.classList.remove('show') 224 cell.classList.add('hide') 225 } 226 document.getElementById("empty_test_row").style.display="none" 227 241 228 var ans = document.getElementById('test_table_'+this.value) 242 229 if(ans) … … 244 231 ans.classList.remove('hide') 245 232 ans.classList.add('show') 246 } 247 } 248 }); 249 250 </script> 233 } 234 else 235 { 236 document.getElementById("empty_test_row_revision").innerHTML=this.value 237 document.getElementById("empty_test_row").style.display="table-row" 238 } 239 } 240 } 241 </script> 242 251 243 252 244 <script> 245 253 246 function level0_toggle(machine, my_revision) { 254 247 var level1_ans = document.getElementsByClassName('table_'+machine+'_'+my_revision+"_build_level")
Note: See TracChangeset
for help on using the changeset viewer.