[Jifty-commit] r6911 - in jifty/trunk: lib/Jifty/Plugin/Config/Action
Jifty commits
jifty-commit at lists.jifty.org
Tue Apr 28 03:54:34 EDT 2009
Author: sunnavy
Date: Tue Apr 28 03:54:34 2009
New Revision: 6911
Added:
jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/restart.html
Modified:
jifty/trunk/lib/Jifty/Plugin/Config/Action/Config.pm
jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/index.html
Log:
add restart functionality for Config plugin
Modified: jifty/trunk/lib/Jifty/Plugin/Config/Action/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Config/Action/Config.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Config/Action/Config.pm Tue Apr 28 03:54:34 2009
@@ -93,9 +93,10 @@
}
Jifty::YAML::DumpFile( $site_config_file, $stash );
- Jifty->config->load;
$self->report_success unless $self->result->failure;
+ Jifty->web->tangent( url => '/__jifty/config/restart.html' );
+
return 1;
}
Modified: jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/index.html
==============================================================================
--- jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/index.html (original)
+++ jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/index.html Tue Apr 28 03:54:34 2009
@@ -6,7 +6,7 @@
% for my $field ( @fields ) {
<% $action->form_field($field) %>
% }
-<% Jifty->web->form->submit( label => 'Save' ) %>
+<% Jifty->web->form->submit( label => _('Save and restart server') ) %>
<% Jifty->web->form->end %>
</&>
Added: jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/restart.html
==============================================================================
--- (empty file)
+++ jifty/trunk/share/plugins/Jifty/Plugin/Config/web/templates/__jifty/config/restart.html Tue Apr 28 03:54:34 2009
@@ -0,0 +1,12 @@
+%# TODO make it more beautiful
+<html>
+<head>
+<title><% _('restarting' ) %></title>
+<meta http-equiv="refresh" content="5;url=<% Jifty::Plugin::Config->after_restart_url %>" />
+</head>
+<body>
+<h1>please wait for 5 seconds so the server can restart</h1>
+</body>
+</html>
+% Jifty->handler->buffer->flush_output();
+% $Jifty::SERVER->restart;
More information about the Jifty-commit
mailing list