From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QmCBD-0006cs-Gn for garchives@archives.gentoo.org; Wed, 27 Jul 2011 22:02:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BD8921C0B6 for ; Wed, 27 Jul 2011 22:02:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B8F9721C0CF for ; Wed, 27 Jul 2011 21:40:58 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED3491B402F for ; Wed, 27 Jul 2011 21:40:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4C5C68003D for ; Wed, 27 Jul 2011 21:40:57 +0000 (UTC) From: "Liam McLoughlin" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Liam McLoughlin" Message-ID: <5af0df843f05f6f1650ccb63498741431bb9d58a.hexxeh@gentoo> Subject: [gentoo-commits] proj/gentoaster:webui commit in: web/js/, /, web/ X-VCS-Repository: proj/gentoaster X-VCS-Files: client.php daemon.php status.php web/config.php web/finished.php web/index.php web/js/jquery-ui-1.8.14.custom.min.js web/js/jquery-ui-1.8.14.js web/js/jquery.form.wizard.js web/js/jquery.wizard.js web/process.php web/status.php web/testdrive.php X-VCS-Directories: web/js/ / web/ X-VCS-Committer: hexxeh X-VCS-Committer-Name: Liam McLoughlin X-VCS-Revision: 5af0df843f05f6f1650ccb63498741431bb9d58a Date: Wed, 27 Jul 2011 21:40:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 21a2da56ce699bfec0ab9b6b11942547 commit: 5af0df843f05f6f1650ccb63498741431bb9d58a Author: Liam McLoughlin hexxeh net> AuthorDate: Wed Jul 27 21:40:22 2011 +0000 Commit: Liam McLoughlin hexxeh net> CommitDate: Wed Jul 27 21:40:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoaster.gi= t;a=3Dcommit;h=3D5af0df84 Making everything Zend compliant again --- client.php | 9 +- daemon.php | 24 ++- status.php | 9 +- web/config.php | 5 +- web/finished.php | 13 +- web/index.php | 283 +++++++++++---= ------ ...ui-1.8.14.custom.min.js =3D> jquery-ui-1.8.14.js} | 0 web/js/{jquery.form.wizard.js =3D> jquery.wizard.js} | 0 web/process.php | 66 +++-- web/status.php | 78 ++++-- web/testdrive.php | 104 +++++--- 11 files changed, 366 insertions(+), 225 deletions(-) diff --git a/client.php b/client.php index 56313ae..2245f61 100644 --- a/client.php +++ b/client.php @@ -21,8 +21,13 @@ =20 echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n"; =20 - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + $db =3D new mysqli( + MYSQL_HOSTNAME, + MYSQL_USERNAME, + MYSQL_PASSWORD, + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error()); } diff --git a/daemon.php b/daemon.php index 5fa09b2..cac2adf 100644 --- a/daemon.php +++ b/daemon.php @@ -18,8 +18,13 @@ $result =3D trim($result); echo "A job finished with return code ".$returncode.": ".$result= ."\n"; =20 - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + $db =3D new mysqli( + MYSQL_HOSTNAME,=20 + MYSQL_USERNAME, + MYSQL_PASSWORD,=20 + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error()); } @@ -87,7 +92,11 @@ =20 unlink("config.ini"); =20 - return update_result($handle, $returncode, $nonstatu= sOutput); + return update_result( + $handle,=20 + $returncode,=20 + $nonstatusOutput + ); } else { $error =3D "Configured build path is not writable"; return update_result($handle, -2, $error); @@ -109,8 +118,13 @@ $insert =3D false; $update =3D false; =20 - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + $db =3D new mysqli( + MYSQL_HOSTNAME,=20 + MYSQL_USERNAME, + MYSQL_PASSWORD,=20 + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error()); } diff --git a/status.php b/status.php index 66d55f8..2a49fd8 100644 --- a/status.php +++ b/status.php @@ -9,8 +9,13 @@ die("No handle hash given\n"); } =20 - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + $db =3D new mysqli( + MYSQL_HOSTNAME,=20 + MYSQL_USERNAME, + MYSQL_PASSWORD,=20 + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error()); } diff --git a/web/config.php b/web/config.php index c31e60b..1d1cb2e 100644 --- a/web/config.php +++ b/web/config.php @@ -9,6 +9,9 @@ // Should we allow multiple simultaneous builds for a user? define("SIMULTANEOUS_BUILDS", false); =20 + // What should we set as the default list of packages? + define("DEFAULT_PACKAGES", "dhcpd"); + =20 // What should we limit the virtual machine disk size to? define("MAX_DISK_SIZE", 16384); =20 @@ -20,5 +23,5 @@ =20 // Set the RECAPTCHA keys that should be used, if enabled define("RECAPTCHA_ENABLED", false); - define("RECAPTCHA_PUBLIC_KEY","REPLACE_ME"); + define("RECAPTCHA_PUBLIC_KEY", "REPLACE_ME"); define("RECAPTCHA_PRIVATE_KEY", "REPLACE_ME"); \ No newline at end of file diff --git a/web/finished.php b/web/finished.php index fa953c7..5d2309b 100644 --- a/web/finished.php +++ b/web/finished.php @@ -1,3 +1,9 @@ + Gentoaster @@ -11,11 +17,12 @@

That's it!

- That's all there is to it! We've sent your configuration down to = the kitchen to be=20 - toasted, come back later to get your image. + That's all there is to it! We've sent your configuration down to=20 + the kitchen to be toasted, come back later to get your image.

- You can also click ">here to=20 + You can also click=20 + ">here to= =20 view the status of your build.

diff --git a/web/index.php b/web/index.php index a68a219..99b9cf0 100644 --- a/web/index.php +++ b/web/index.php @@ -5,15 +5,23 @@ require_once "recaptcha.php"; } =20 - if(!SIMULTANEOUS_BUILDS) { - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + if (!SIMULTANEOUS_BUILDS) { + $db =3D new mysqli( + MYSQL_HOSTNAME,=20 + MYSQL_USERNAME, + MYSQL_PASSWORD,=20 + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error= ()); } =20 - $ipaddress =3D filter_input(INPUT_SERVER, "REMOTE_ADDR", - FILTER_VALIDATE_IP); + $ipaddress =3D filter_input( + INPUT_SERVER,=20 + "REMOTE_ADDR", + FILTER_VALIDATE_IP + ); =20 $stmt =3D $db->prepare("SELECT id FROM builds WHERE ipaddres= s =3D ?"); $stmt->bind_param("s", $ipaddress); @@ -23,7 +31,8 @@ if ($stmt->num_rows =3D=3D 1) { $stmt->bind_result($buildID); $stmt->fetch(); - header("Location: status.php?uuid=3D".$buildID."&sim= ultaneous=3Dtrue"); + $url =3D "status.php?uuid=3D".$buildID."&simultaneou= s=3Dtrue"; + header("Location: ".$url); } $stmt->close(); } @@ -50,135 +59,169 @@ } ?> - - Gentoaster - - - - - - + + + + - - -
-
-
-
-
-
-

Welcome to Gentoaster!

-

This wizard will guide you through the creation of your own pe= rsonalised - Gentoo virtual machine image.

-
- -
-

Verification

+ + +
+
+ +
+
+
+

Welcome to Gentoaster!

+

This wizard will guide you through the cr= eation=20 + of your own personalised Gentoo virtual mach= ine=20 + image.

+
+ +
+

Verification

=20 - -
-
- -
-

Locale

+ +
+
+ +
+

Locale

=20 -
- -
+
-
-

User details

+
+
+

User details

=20 -
-
+
-
-

Network

+ +
+ + =20 +
+
+
+

Network

=20 -
-
-
-
-

Partitioning

+
+
+

Partitioning

=20 -
-
+
-
-

Packages

+

+
+

+
Not yet upd= ated
+
+
+
+
+
+
+

Packages

=20 -

- -
-
-
-

Image format

+ +

+ +
+
+
+

Image format

=20 -
- -
-
-
-

That's it!

-

That's all there is to it! We've sent your configuration down = to the kitchen to be=20 - cooked, and we'll email you once it's finished cooking.

-
-
-
- - -
-
- -
- - - +
+
+

That's it!

+

That's all there is to it! We've sent you= r=20 + configuration down to the kitchen to be cook= ed, and=20 + we'll email you once it's finished cooking.<= /p> +

+
+
+ + +
+
+ +
+ + =20 - + + + @@ -112,7 +132,7 @@

- +

diff --git a/web/testdrive.php b/web/testdrive.php index 3847b69..7610811 100644 --- a/web/testdrive.php +++ b/web/testdrive.php @@ -9,8 +9,13 @@ $buildresult =3D "Unknown!"; $inprogress =3D false; =20 - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + $db =3D new mysqli( + MYSQL_HOSTNAME,=20 + MYSQL_USERNAME, + MYSQL_PASSWORD,=20 + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error()); } @@ -30,7 +35,9 @@ if ($status[0]) { header("Location: status.php?uuid=3D".$buildID); } else { - $stmt =3D $db->prepare("SELECT returncode, result FR= OM builds WHERE id =3D ?"); + $query =3D "SELECT returncode, result ". + "FROM builds WHERE id =3D ?"; + $stmt =3D $db->prepare($query); $stmt->bind_param("s", $buildID); $stmt->execute(); $stmt->bind_result($returncode, $result); @@ -41,7 +48,10 @@ // we're built, let's do this $client =3D new GearmanClient(); $client->addServer(); - $server =3D $client->do("invoke_start_im= age", $buildID); + $server =3D $client->do( + "invoke_start_image", + $buildID + ); $server =3D unserialize($server); } else { header("Location: status.php?uuid=3D".$b= uildID); @@ -61,9 +71,10 @@ Gentoaster - - =20 - + + + - - - + + + + - - -
-
-
-
-
-
-

Welcome to Gentoaster!

-

This wizard will guide you through the creation of your own pe= rsonalised - Gentoo virtual machine image.

-
- -
-

Verification

+ + +
+
+ +
+
+
+

Welcome to Gentoaster!

+

This wizard will guide you through the cr= eation=20 + of your own personalised Gentoo virtual mach= ine=20 + image.

+
+ +
+

Verification

=20 - -
-
- -
-

Locale

+ +
+
+ +
+

Locale

=20 -
- -
+
-
-

User details

+
+
+

User details

=20 -
-
+
-
-

Network

+ +
+ + =20 +
+
+
+

Network

=20 -
-
-
-
-

Partitioning

+
+
+

Partitioning

=20 -
-
+
-
-

Packages

+

+
+

+
Not yet upd= ated
+
+
+
+
+
+
+

Packages

=20 -

- -
-
-
-

Image format

+ +

+ +
+
+
+

Image format

=20 -
- -
-
-
-

That's it!

-

That's all there is to it! We've sent your configuration down = to the kitchen to be=20 - cooked, and we'll email you once it's finished cooking.

-
-
-
- - -
-
- -
- - - +
+
+

That's it!

+

That's all there is to it! We've sent you= r=20 + configuration down to the kitchen to be cook= ed, and=20 + we'll email you once it's finished cooking.<= /p> +

+
+
+ + +
+
+ +
+ + =20 - + + + @@ -112,7 +132,7 @@

- +

diff --git a/web/testdrive.php b/web/testdrive.php index 3847b69..7610811 100644 --- a/web/testdrive.php +++ b/web/testdrive.php @@ -9,8 +9,13 @@ $buildresult =3D "Unknown!"; $inprogress =3D false; =20 - $db =3D new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, - MYSQL_PASSWORD, MYSQL_DATABASE); + $db =3D new mysqli( + MYSQL_HOSTNAME,=20 + MYSQL_USERNAME, + MYSQL_PASSWORD,=20 + MYSQL_DATABASE + ); + =20 if (mysqli_connect_errno()) { die("Could not connect to database ".mysqli_connect_error()); } @@ -30,7 +35,9 @@ if ($status[0]) { header("Location: status.php?uuid=3D".$buildID); } else { - $stmt =3D $db->prepare("SELECT returncode, result FR= OM builds WHERE id =3D ?"); + $query =3D "SELECT returncode, result ". + "FROM builds WHERE id =3D ?"; + $stmt =3D $db->prepare($query); $stmt->bind_param("s", $buildID); $stmt->execute(); $stmt->bind_result($returncode, $result); @@ -41,7 +48,10 @@ // we're built, let's do this $client =3D new GearmanClient(); $client->addServer(); - $server =3D $client->do("invoke_start_im= age", $buildID); + $server =3D $client->do( + "invoke_start_image", + $buildID + ); $server =3D unserialize($server); } else { header("Location: status.php?uuid=3D".$b= uildID); @@ -61,9 +71,10 @@ Gentoaster - - =20 - + + +