#1109: UI/JavaScript refinement.

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

@ -3,6 +3,11 @@
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;
@ -17,74 +22,108 @@ th {
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 selected = { head: 0 , trunk:0 };
var inputs = false; var inputs = false;
function reset() { var options = false;
// first time, initialize
function reset() { // set defaults
// first time, initialize the globals
if ( !inputs ) { if ( !inputs ) {
inputs = document.getElementsByTagName('body')[0].getElementsByTagName('input'); inputs = document.getElementsByTagName('input');
options = document.getElementsByTagName('option');
document.getElementById("build").onclick=build document.getElementById("build").onclick=build
document.getElementById("reset").onclick=reset document.getElementById("reset").onclick=reset
} }
for ( var i = 0 ; i < inputs.length ; i++ ) { for ( var i = 0 ; i < inputs.length ; i++ ) {
var input = inputs[i]; var input = inputs[i];
input.checked=input.name in checks ; input.checked=input.name in checked ;
// console.log(input.name); }
for ( var i = 0 ; i < options.length ; i++ ) {
var option = options[i];
option.selected=option.value in selected ;
} }
e(); e();
} }
function build() { function build() { // user pressed "build"
var E = e(); var E = e();
var OK = E < 60 ; var OK = E < 60 ;
if ( !OK ) OK = confirm("Build is longer that " + E + " minutes\nAre you sure?"); if ( !OK ) OK = confirm("Build is longer that 60 minutes\nAre you sure?");
if ( OK ) { if ( OK ) {
alert("build not implemented yet"); alert("build not implemented yet");
} }
} }
function t(n) { function t(n) { // test if an input name is checked
var result = 0 ; var result = 0 ;
for ( input in inputs ) { for ( var i = 0 ; i < inputs.length ; i++ ) {
input = inputs[input]; var input = inputs[i];
if ( input.name == n ) if ( input.name == n )
if ( input.checked ) result++; if ( input.checked ) result++;
} }
return result; return result;
} }
function e() { function s(n) { // set and input name to checked
var E = 0; // estimate for ( var i = 0 ; i < inputs.length ; i++ ) {
var B = 1; // builds var input = inputs[i];
var m = t('2003') + t('2005') + t('2008') + t('2010') + t('2012') + t('2014'); // msvc builds for ( var N = 0 ; N < n.length ; N++ )
if ( input.name == n[N] )
input.checked = true;
}
}
function e() { // estimate the build time in minutes
var E = 0; // estimate of build time
var B = 1; // number of builds
// set required libraries
if ( t('xmp' ) ) s(['expat']);
if ( t('webready') ) s(['curl','libssh','openssl']);
// estimate MSVC
var m = t('2003') + t('2005') + t('2008') + t('2010') + t('2012') + t('2014'); // msvc builds
var M = 4; // msvc build time var M = 4; // msvc build time
if ( t('curl' ) ) M += 1; if ( t('curl' ) ) M += 5;
if ( t('libssh' ) ) M += 1; if ( t('libssh' ) ) M += 1;
if ( t('openssh') ) M += 1; if ( t('openssl') ) M += 15;
E += M * m; E += M * m;
// platforms
if ( t('macosx') || t('linux') ) E += 2; if ( t('macosx') || t('linux') ) E += 2;
if ( t('mingw' ) ) E += 4; if ( t('mingw' ) ) E += 4;
if ( t('cygwin') ) E += 3;
// tests
if ( t('tests') ) E *= 1.1; if ( t('tests') ) E *= 1.1;
if ( t('testx') ) E *= 1.1; if ( t('teste') ) E *= 1.1;
if ( t('testv') ) E *= 1.2; if ( t('testx') ) E *= 1.2;
if ( t('testv') ) E *= 1.1;
if ( t('testvw') ) E *= 1.1; if ( t('testvw') ) E *= 1.1;
B *= t('64') + t('32'); // types of build
B *= t('cmake') + t('configure'); B *= t('64') + t('32'); // bits
B *= t('shared') + t('static'); B *= t('cmake') + t('configure'); // build environment
B *= t('native') + t('clang'); B *= t('shared') + t('static'); // type of build
B *= t('release') + t('debug'); B *= t('native') + t('clang'); // compiler
B *= t('release') + t('debug'); // configuration
// overall estimate
E *= B; E *= B;
document.getElementsByName('estimate')[0].innerHTML = Math.round(E).toString(); document.getElementsByName('estimate')[0].innerHTML = Math.round(E).toString();
@ -101,20 +140,34 @@ th {
<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