[Bps-public-commit] r16329 - in Pushmi/trunk: . Pushmi-Admin/lib/Pushmi/Admin/Action

alexmv at bestpractical.com alexmv at bestpractical.com
Fri Oct 17 17:00:17 EDT 2008


Author: alexmv
Date: Fri Oct 17 17:00:16 2008
New Revision: 16329

Removed:
   Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Action/Configure.pm
Modified:
   Pushmi/trunk/   (props changed)
   Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Dispatcher.pm
   Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm

Log:
 r38293 at kohr-ah:  chmrr | 2008-10-17 17:00:07 -0400
  * Move firstrun configuration elsewhere


Modified: Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Dispatcher.pm
==============================================================================
--- Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Dispatcher.pm	(original)
+++ Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Dispatcher.pm	Fri Oct 17 17:00:16 2008
@@ -15,32 +15,6 @@
 before '**' => set 'navigation' => ['home'];
 before qr{/(index.html)?$} => set 'navigation' => [];
 
-
-# First run configuration
-before qr{^/(?!static|errors|__jifty|=|favicon.ico|firstrun)(/|$)} => run {
-    # Check that we have a hostname and password
-    my $root = URI->new(Jifty->config->app('apache')->{root});
-    redirect "/firstrun" if $root->host eq "localhost";
-};
-on '/firstrun' => run {
-    set navigation => [];
-    my $root = URI->new(Jifty->config->app('apache')->{root});
-    return if $root->host eq "localhost";
-    # If we're configured now, redirect to the internal URL
-    Jifty->web->_redirect(Pushmi::Admin->admin_uri);
-};
-after '/firstrun' => run {
-    my $root = URI->new(Jifty->config->app('apache')->{root});
-    return if $root->host eq "localhost";
-    return unless Jifty->config->app('configured');
-    return unless Jifty->config->app('configured') =~ / /
-	or -x Jifty->config->app('configured');
-    # Once we're configured, call the configuration executable
-    if (fork) {
-        exec(Jifty->config->app('configured')) or die "Configured call failed: $@";
-    }
-};
-
 # Redirect to the created replica
 on '/created' => run {
     if (    Jifty->web->response->result("create")

Modified: Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm
==============================================================================
--- Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm	(original)
+++ Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm	Fri Oct 17 17:00:16 2008
@@ -83,14 +83,6 @@
             }
         }
     };
-
-    div {
-        { id is 'configuration' }
-        hyperlink(
-            url   => "/configuration",
-            label => "Configuration..."
-        );
-    }
 };
 
 
@@ -525,36 +517,5 @@
     $replica->dump;
 };
 
-template 'firstrun' => page { title => "Welcome to your Pushmi appliance!" } content {
-    div {
-        { class is "roundbox" };
-        h2 { "Pushmi configuration!" };
-
-        form {
-            p {
-                "There are a couple things we need to set up before your Pushmi "
-                    . "server will be all set.  First, we need to know the full "
-                    . "hostname that you use to access this machine, so we can "
-                    . "correctly construct links to it:"
-            };
-            my $conf = Jifty->web->new_action(
-                class   => "Configure",
-                moniker => "config",
-            );
-            render_param( $conf => "hostname" );
-
-            if (Jifty->config->app('htpasswd')) {
-                p {
-                    "You should also set a password to protect the administrative "
-                  . "interface:"
-                };
-                render_param( $conf => "password" );
-            }
-
-            form_submit( label => "Save" );
-        }
-    }
-};
-
 1;
 



More information about the Bps-public-commit mailing list