File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ <h3>Build processing</h3>
5454 </ tr >
5555 </ table >
5656 < br />
57+ < h3 > HW test machines</ h3 >
58+ < table id ="hw-machines ">
59+ < tr id ="hw-machines-hdr ">
60+ </ tr >
61+ </ table >
62+ < br />
5763 < h3 > Flakiest tests</ h3 >
5864 < table id ="flakes ">
5965 < tr >
Original file line number Diff line number Diff line change @@ -1064,6 +1064,29 @@ function flakes_doit(data_raw)
10641064 flakes_add_summary ( flakes , "total" , total ) ;
10651065}
10661066
1067+ function hw_machines_loaded ( data )
1068+ {
1069+ var table = document . getElementById ( "hw-machines" ) ;
1070+ var hdr = document . getElementById ( "hw-machines-hdr" ) ;
1071+
1072+ // Build header from machine names
1073+ $ . each ( data , function ( i , m ) {
1074+ var th = document . createElement ( "th" ) ;
1075+ th . innerText = m . name ;
1076+ hdr . appendChild ( th ) ;
1077+ } ) ;
1078+
1079+ // Single row with states
1080+ var row = table . insertRow ( ) ;
1081+ $ . each ( data , function ( i , m ) {
1082+ var cell = row . insertCell ( ) ;
1083+ var state = m . state ;
1084+ if ( m . reserved_by )
1085+ state += " (" + m . reserved_by + ")" ;
1086+ cell . innerHTML = colorify_str ( state , "HEALTHY" ) ;
1087+ } ) ;
1088+ }
1089+
10671090function do_it ( )
10681091{
10691092 /*
@@ -1090,4 +1113,7 @@ function do_it()
10901113 $ ( document ) . ready ( function ( ) {
10911114 $ . get ( "query/flaky-tests" , flakes_doit )
10921115 } ) ;
1116+ $ ( document ) . ready ( function ( ) {
1117+ $ . get ( "mc/get_machine_info?caller=status-ui" , hw_machines_loaded )
1118+ } ) ;
10931119}
You can’t perform that action at this time.
0 commit comments