#1109: UI/JavaScript refinement.

v0.27.3
Robin Mills 10 years ago
parent 017a58910b
commit f954642e37

@ -1,120 +1,173 @@
<html> <html>
<style> <style>
body { body {
background : skyblue ; background : skyblue ;
}
h1,h3 {
margin : 3px;
margin-left : 0px;
color : #ee4646;
} }
th { th {
background : blue; background : blue;
color : yellow; color : yellow;
text-align : right; text-align : right;
border : 2px solid white; border : 2px solid white;
padding : 4px; padding : 4px;
padding-left: 20px; padding-left: 20px;
} }
.go { .go {
background : lightgreen; background : lightgreen;
border : 4px solid black; border : 4px solid black;
color : blue; color : blue;
text-align : center; text-align : center;
}
a {
color : black;
line-height : 0px ;
text-decoration : none;
} }
a:hover { background-color : cyan ; }
</style> </style>
<script> <script>
// global variables
var checks = { macosx:0 , linux:0 , cygwin:0 , mingw:0 , '2005':0 // platforms var checked = { macosx:0 , linux:0 , cygwin:0 , mingw:0 , '2005':0 // platforms
, shared:0 , native:0 , expat:0 , zlib:0 , xmp:0 // libraries , shared:0 , native:0 , expat:0 , zlib:0 , xmp:0 // libraries
, release:0, '64':0 , configure:0 , tests:0 // build and test , release:0, '64':0 , configure:0 , tests:0 // build and test
}; };
var inputs = false; var selected = { head: 0 , trunk:0 };
function reset() { var inputs = false;
// first time, initialize var options = false;
if ( !inputs ) {
inputs = document.getElementsByTagName('body')[0].getElementsByTagName('input'); function reset() { // set defaults
document.getElementById("build").onclick=build // first time, initialize the globals
document.getElementById("reset").onclick=reset if ( !inputs ) {
} inputs = document.getElementsByTagName('input');
for ( var i = 0 ; i < inputs.length ; i++ ) { options = document.getElementsByTagName('option');
var input = inputs[i]; document.getElementById("build").onclick=build
input.checked=input.name in checks ; document.getElementById("reset").onclick=reset
// console.log(input.name); }
} for ( var i = 0 ; i < inputs.length ; i++ ) {
e(); var input = inputs[i];
} input.checked=input.name in checked ;
}
function build() { for ( var i = 0 ; i < options.length ; i++ ) {
var E = e(); var option = options[i];
var OK = E < 60 ; option.selected=option.value in selected ;
if ( !OK ) OK = confirm("Build is longer that " + E + " minutes\nAre you sure?"); }
if ( OK ) { e();
alert("build not implemented yet"); }
}
} function build() { // user pressed "build"
var E = e();
function t(n) { var OK = E < 60 ;
var result = 0 ; if ( !OK ) OK = confirm("Build is longer that 60 minutes\nAre you sure?");
for ( input in inputs ) { if ( OK ) {
input = inputs[input]; alert("build not implemented yet");
if ( input.name == n ) }
if ( input.checked ) result++; }
}
return result; function t(n) { // test if an input name is checked
} var result = 0 ;
for ( var i = 0 ; i < inputs.length ; i++ ) {
function e() { var input = inputs[i];
var E = 0; // estimate if ( input.name == n )
var B = 1; // builds if ( input.checked ) result++;
var m = t('2003') + t('2005') + t('2008') + t('2010') + t('2012') + t('2014'); // msvc builds }
return result;
var M = 4; // msvc build time }
if ( t('curl' ) ) M += 1;
if ( t('libssh' ) ) M += 1; function s(n) { // set and input name to checked
if ( t('openssh') ) M += 1; for ( var i = 0 ; i < inputs.length ; i++ ) {
E += M * m; var input = inputs[i];
for ( var N = 0 ; N < n.length ; N++ )
if ( t('macosx') || t('linux') ) E += 2; if ( input.name == n[N] )
if ( t('mingw' ) ) E += 4; input.checked = true;
}
if ( t('tests') ) E *= 1.1; }
if ( t('testx') ) E *= 1.1;
if ( t('testv') ) E *= 1.2; function e() { // estimate the build time in minutes
if ( t('testvw') ) E *= 1.1; var E = 0; // estimate of build time
var B = 1; // number of builds
B *= t('64') + t('32');
B *= t('cmake') + t('configure'); // set required libraries
B *= t('shared') + t('static'); if ( t('xmp' ) ) s(['expat']);
B *= t('native') + t('clang'); if ( t('webready') ) s(['curl','libssh','openssl']);
B *= t('release') + t('debug');
// estimate MSVC
E *= B; var m = t('2003') + t('2005') + t('2008') + t('2010') + t('2012') + t('2014'); // msvc builds
var M = 4; // msvc build time
document.getElementsByName('estimate')[0].innerHTML = Math.round(E).toString(); if ( t('curl' ) ) M += 5;
document.getElementsByName('build' )[0].disabled = E == 0 ; if ( t('libssh' ) ) M += 1;
if ( t('openssl') ) M += 15;
return E; E += M * m;
}
// platforms
if ( t('macosx') || t('linux') ) E += 2;
if ( t('mingw' ) ) E += 4;
if ( t('cygwin') ) E += 3;
// tests
if ( t('tests') ) E *= 1.1;
if ( t('teste') ) E *= 1.1;
if ( t('testx') ) E *= 1.2;
if ( t('testv') ) E *= 1.1;
if ( t('testvw') ) E *= 1.1;
// types of build
B *= t('64') + t('32'); // bits
B *= t('cmake') + t('configure'); // build environment
B *= t('shared') + t('static'); // type of build
B *= t('native') + t('clang'); // compiler
B *= t('release') + t('debug'); // configuration
// overall estimate
E *= B;
document.getElementsByName('estimate')[0].innerHTML = Math.round(E).toString();
document.getElementsByName('build' )[0].disabled = E == 0 ;
return E;
}
</script> </script>
<header> <header>
<title>Exiv2 Build Server</title> <title>Exiv2 Build Server</title>
</header> </header>
<body onload="reset()"> <body onload="reset()">
<table><tr><td><img style="padding:10px;" src="Exiv2Logo.png"></td><td><table><tr><td valign="baseline"><h1>Build Server</h1></td></tr><tr><td><a target="_blank" href="http://exiv2.dyndns.org:8080">http://exiv2.dyndns.org:8080</a></td></tr></table></td></tr></table> <table><tr>
<td><img style="padding:10px;" src="Exiv2Logo.png"></td>
<td><table>
<tr><td valign="baseline"><h1>Build Server</h1></td>
<tr><td><a target="_blank" href="http://exiv2.dyndns.org:8080">http://exiv2.dyndns.org:8080</a></td>
<tr><td valign="baseline"><h3>Website:</h3></td></tr>
<tr><td><a target="_blank" href="http://exiv2.org">http://exiv2.org</a></td>
<tr><td valign="baseline"><h3>Wiki:</h3></td></tr>
<tr><td><a target="_blank" href="http://dev.exiv2.org/projects/exiv2/wiki">http://dev.exiv2.org/projects/exiv2/wiki</a></td>
</tr></table>
</td></tr></table>
<form action=""><table padding="12" border="0"> <form action=""><table padding="12" border="0">
<tr><td colspan=10><hr></td></tr><tr> <tr><td colspan=10><hr></td></tr><tr>
<th>Branch: </th><td><select> <th>Branch: </th><td><select>
<option value="saab">Conversions</option> <option value="conversions" >Conversions</option>
<option value="mercedes">Jenkins</option> <option value="jenkins" >Jenkins</option>
<option value="head" selected>Trunk</option> <option value="trunk" >Trunk</option>
<option value="audi">Videowrite</option> <option value="videowrite" >Videowrite</option>
<option value="audi2">Videow-refactoring</option> <option value="videorefactoring">Videow-refactoring</option>
</select></td> </select></td>
<th>Revision: </th> <th>Revision: </th>
<td><select><option value="volvo">HEAD</option><option value="revision">Revision...</option><option value="date">Date...</option></select></td> <td><select>
<option value="head">HEAD</option>
<option value="revision">Revision...</option>
<option value="date">Date...</option>
</select></td>
<th>Email: </th> <th>Email: </th>
<td colspan="3"><input name="email" type="text" size="40" name="email"></td> <td colspan="3"><input name="email" type="text" size="40" name="email"></td>
@ -127,28 +180,34 @@ th {
</tr><tr><td colspan=10><hr></td></tr><tr> </tr><tr><td colspan=10><hr></td></tr><tr>
<tr> <tr>
<th>Bits: </th> <th>Bits:</th>
<td><input type="checkbox" onclick="e()" name="64" >64</input> <td><input type="checkbox" onclick="e()" name="64" >64</input>
<br><input type="checkbox" onclick="e()" name="32" >32</input> <br><input type="checkbox" onclick="e()" name="32" >32</input>
</td> </td>
<th>Library: </th> <th>Library:</th>
<td><input type="checkbox" onclick="e()" name="shared" >shared/dLL</input> <td><input type="checkbox" onclick="e()" name="shared" >shared/dll</input>
<br><input type="checkbox" onclick="e()" name="static" >static</input> <br><input type="checkbox" onclick="e()" name="static" >static</input>
</td> </td>
<th>Build<br>Environment: </th> <th>Build<br>Environment:</th>
<td><input type="checkbox" onclick="e()" name="configure">./configure</input> <td><input type="checkbox" onclick="e()" name="configure">configure</input>
<br><input type="checkbox" onclick="e()" name="cmake" >cmake</input> <br><input type="checkbox" onclick="e()" name="cmake" >cmake</input>
</td> </td>
<th>Kind: </th> <th>Kind:</th>
<td><input type="checkbox" onclick="e()" name="release" >release</input> <td><input type="checkbox" onclick="e()" name="release" >release</input>
<br><input type="checkbox" onclick="e()" name="debug" >debug</input> <br><input type="checkbox" onclick="e()" name="debug" >debug</input>
</td> </td>
<th>Compiler: </th> <th>Compiler:</th>
<td><input type="checkbox" onclick="e()" name="native" >platform</input> <td><input type="checkbox" onclick="e()" name="native" >platform</input>
<br><input type="checkbox" onclick="e()" name="clang" >clang </input> <br><input type="checkbox" onclick="e()" name="clang" >clang </input>
</td> </td>
</tr><tr><td colspan=10><hr></td></tr><tr> </tr><tr><td colspan=10><hr></td></tr><tr>
<th>MSVC: </th> <th>Platform:</th>
<td><input type="checkbox" onclick="e()" name="linux" >linux</input>
<br><input type="checkbox" onclick="e()" name="macosx" >macos-x</input>
<br><input type="checkbox" onclick="e()" name="cygwin" >cygwin</input>
<br><input type="checkbox" onclick="e()" name="mingw" >mingw</input>
</td>
<th>MSVC:</th>
<td><input type="checkbox" onclick="e()" name="2003" >2003</input> <td><input type="checkbox" onclick="e()" name="2003" >2003</input>
<br><input type="checkbox" onclick="e()" name="2005" >2005</input> <br><input type="checkbox" onclick="e()" name="2005" >2005</input>
<br><input type="checkbox" onclick="e()" name="2008" >2008</input> <br><input type="checkbox" onclick="e()" name="2008" >2008</input>
@ -156,13 +215,7 @@ th {
<br><input type="checkbox" onclick="e()" name="2012" >2012</input> <br><input type="checkbox" onclick="e()" name="2012" >2012</input>
<br><input type="checkbox" onclick="e()" name="2014" >2014</input> <br><input type="checkbox" onclick="e()" name="2014" >2014</input>
</td> </td>
<th>Platform: </th> <th>Link:</th>
<td><input type="checkbox" onclick="e()" name="linux" >linux</input>
<br><input type="checkbox" onclick="e()" name="macosx" >macos-x</input>
<br><input type="checkbox" onclick="e()" name="cygwin" >cygwin</input>
<br><input type="checkbox" onclick="e()" name="mingw" >mingw</input>
</td>
<th>Link: </th>
<td><input type="checkbox" onclick="e()" name="zlib" >zlib</input> <td><input type="checkbox" onclick="e()" name="zlib" >zlib</input>
<br><input type="checkbox" onclick="e()" name="expat" >expat</input> <br><input type="checkbox" onclick="e()" name="expat" >expat</input>
<br><input type="checkbox" onclick="e()" name="curl" >curl</input> <br><input type="checkbox" onclick="e()" name="curl" >curl</input>

Loading…
Cancel
Save