133
133
"suffix" : "?search=kind%3Dcheckout&search=created%3E" + dayagostring ,
134
134
} ,
135
135
] ;
136
+ var lava_urls = {
137
+ "lava-broonie" : "lava.sirena.org.uk" ,
138
+ "lava-collabora" : "lava.collabora.dev" ,
139
+ "lava-collabora-early-access" : "staging.lava.collabora.dev" ,
140
+ "lava-collabora-staging" : "staging.lava.collabora.dev" ,
141
+ } ;
136
142
137
143
function fancydisplayjson ( jsontext ) {
138
144
// add indentation to json text
155
161
156
162
function miscclick ( event ) {
157
163
event . preventDefault ( ) ;
158
- var fullurl = pagebaseurl + this . getAttribute ( "href" ) ;
159
- window . history . pushState ( "" , "" , fullurl ) ;
160
- parseParameters ( fullurl ) ;
164
+ var fullurl = this . getAttribute ( "href" ) ;
165
+ // if it looks like an absolute URL, open in new tab/window
166
+ if ( fullurl . startsWith ( "http" ) ) {
167
+ window . open ( fullurl , '_blank' ) ;
168
+ // otherwise build the full URL and load it in the current page
169
+ } else {
170
+ fullurl = pagebaseurl + this . getAttribute ( "href" ) ;
171
+ window . history . pushState ( "" , "" , fullurl ) ;
172
+ parseParameters ( fullurl ) ;
173
+ }
161
174
console . log ( "miscclick fullurl: " + fullurl ) ;
162
175
}
163
176
189
202
// add download button
190
203
miscbuttonshtml += "<button id=\"downloadbutton\" class=\"download\" href=\"\" onclick=\"\">Download</button>" ;
191
204
205
+ var node_data = data . data ;
206
+ if ( node_data != null ) {
207
+ var runtime = node_data . runtime ;
208
+ var job = node_data . job_id ;
209
+ if ( node_data . runtime . startsWith ( "lava" ) && node_data . job_id != null ) {
210
+ miscbuttonshtml += "<button id=\"lavajobbutton\" class=\"misc\" href=\"https://" + lava_urls [ node_data . runtime ] + "/scheduler/job/" + node_data . job_id + "\">LAVA Job</button>" ;
211
+ }
212
+ }
213
+
192
214
// add node size info (raw size)
193
215
var nodesize = raw . length ;
194
216
miscbuttonshtml += "<span>Node size: " + nodesize + " bytes</span>" ;
569
591
< div id ="nodeinfo "> </ div >
570
592
< div id ="nodesearchdiv "> </ div >
571
593
</ body >
572
- </ html >
594
+ </ html >
0 commit comments