public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Liam McLoughlin" <hexxeh@hexxeh.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoaster:webui commit in: web/
Date: Thu, 28 Jul 2011 01:08:13 +0000 (UTC)	[thread overview]
Message-ID: <5bcf585222474363c28c9ad34360877968efcbce.hexxeh@gentoo> (raw)
Message-ID: <20110728010813.tzXyOW0MbTqK6R6NhZgm7rS4sCXpx9hPxQfP09w3qy0@z> (raw)

commit:     5bcf585222474363c28c9ad34360877968efcbce
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Jul 28 00:56:34 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Jul 28 01:07:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=5bcf5852

Adding USE, package USE, FEATURES and keywords to WebUI

---
 web/config.php  |   12 ++++++++++++
 web/index.php   |   32 ++++++++++++++++++++++++++++++++
 web/process.php |   17 ++++++++++-------
 3 files changed, 54 insertions(+), 7 deletions(-)

diff --git a/web/config.php b/web/config.php
index 1d1cb2e..210d1db 100644
--- a/web/config.php
+++ b/web/config.php
@@ -11,6 +11,18 @@
     
     // What should we set as the default list of packages?
     define("DEFAULT_PACKAGES", "dhcpd");
+
+    // What should we set as the default list of packages?
+    define("DEFAULT_USE", "");
+    
+    // What should we set as the default list of packages?
+    define("DEFAULT_PACKAGE_USE", "");
+    
+    // What should we set as the default list of packages?
+    define("DEFAULT_FEATURES", "parallel-fetch userfetch userpriv getbinpkg");
+    
+    // What should we set as the default list of packages?
+    define("DEFAULT_KEYWORDS", "");
     
     // What should we limit the virtual machine disk size to?
     define("MAX_DISK_SIZE", 16384);

diff --git a/web/index.php b/web/index.php
index 99b9cf0..55484d0 100644
--- a/web/index.php
+++ b/web/index.php
@@ -190,6 +190,38 @@
                                 ?></textarea>
                             <br>
                         </div>
+                        <div id="expert" class="step">
+                            <h1>Expert</h1>
+
+                            <label for="expert_use">USE flags</label>
+                            <br />
+                            <textarea id="expert_use" name="use"
+                                style="width: 680px; height: 60px;"><?php 
+                                    echo DEFAULT_USE;
+                                ?></textarea>
+                            <br><br />
+                            <label for="expert_puse">Package USE</label>
+                            <br />
+                            <textarea id="expert_puse" name="puse"
+                                style="width: 680px; height: 60px;"><?php 
+                                    echo DEFAULT_PACKAGE_USE;
+                                ?></textarea>
+                            <br><br />
+                            <label for="expert_features">Features</label>
+                            <br />
+                            <textarea id="expert_features" name="features"
+                                style="width: 680px; height: 60px;"><?php 
+                                    echo DEFAULT_FEATURES;
+                                ?></textarea>
+                            <br><br />
+                            <label for="expert_keywords">Accept Keywords</label>
+                            <br />
+                            <textarea id="expert_keywords" name="keywords"
+                                style="width: 680px; height: 60px;"><?php 
+                                    echo DEFAULT_KEYWORDS;
+                                ?></textarea>
+                            <br>
+                        </div>
                         <div id="format" class="step submit_step">
                             <h1>Image format</h1>
 

diff --git a/web/process.php b/web/process.php
index a005319..e0bf38a 100644
--- a/web/process.php
+++ b/web/process.php
@@ -40,6 +40,8 @@
 
     function sanitize_shellarg($arg)
     {
+        $arg = str_replace("\r\n", " ", $arg);
+        $arg = str_replace("\n", " ", $arg);
         return escapeshellarg($arg);
     }
     $sfi = array("options" => "sanitize_shellarg");
@@ -54,11 +56,12 @@
     $password = filter_input(INPUT_POST, "password", FILTER_CALLBACK, $sfi);
     $rootPass = filter_input(INPUT_POST, "rootpassword", FILTER_CALLBACK, $sfi);
     $packagesList = filter_input(INPUT_POST, "packages", FILTER_CALLBACK, $sfi);
+    $use = filter_input(INPUT_POST, "use", FILTER_CALLBACK, $sfi);
+    $puse = filter_input(INPUT_POST, "puse", FILTER_CALLBACK, $sfi);
+    $features = filter_input(INPUT_POST, "features", FILTER_CALLBACK, $sfi);
+    $keywords = filter_input(INPUT_POST, "keywords", FILTER_CALLBACK, $sfi);
     $outputFormat = filter_input(INPUT_POST, "format", FILTER_CALLBACK, $sfi);
 
-    $packagesList = str_replace("\r\n", " ", $packagesList);
-    $packagesList = str_replace("\n", " ", $packagesList);
-
 $iniString = "[vmconfig]
 
 BUILD_ID='$buildID'
@@ -70,10 +73,10 @@ HOSTNAME=$hostname
 ROOT_PASSWORD=$rootPass
 DEFAULT_USERNAME=$username
 DEFAULT_PASSWORD=$password
-USE_FLAGS=''
-PACKAGE_USE=''
-FEATURES='parallel-fetch userfetch userpriv getbinpkg'
-PACKAGE_ACCEPT_KEYWORDS=''
+USE_FLAGS='$use'
+PACKAGE_USE='$puse'
+FEATURES='$features'
+PACKAGE_ACCEPT_KEYWORDS='$keywords'
 PACKAGES_LIST=$packagesList
 OUTPUT_FORMAT=$outputFormat";
 



             reply	other threads:[~2011-07-28  1:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 23:17 Liam McLoughlin [this message]
2011-07-28  1:08 ` [gentoo-commits] proj/gentoaster:webui commit in: web/ Liam McLoughlin
  -- strict thread matches above, loose matches on Subject: below --
2011-08-19 12:55 [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-08-15  2:52 Liam McLoughlin
2011-08-15  1:47 Liam McLoughlin
2011-08-15  0:25 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-06  0:14 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:18 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-08-04 21:04 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:18 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-08-02 17:31 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-28  1:12 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-27 20:25 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-27 20:11 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-15 19:59 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bcf585222474363c28c9ad34360877968efcbce.hexxeh@gentoo \
    --to=hexxeh@hexxeh.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox