| CatalystX-Usul documentation | Contained in the CatalystX-Usul distribution. |
CatalystX::Usul::Controller::Admin - Administration controller methods
$Revision: 584 $
package MyApp::Controller::Admin; use base qw(CatalystX::Usul::Controller::Admin); __PACKAGE__->build_subcontrollers;
Controller actions that inherit from CatalystX::Usul::Controller
A midpoint in the URI that does nothing except act as a placeholder for the namespace which is admin
Exposes the method of the same name in the parent class which is responsible for stuffing the stash with all of the non endpoint specific data
Exposes method of the same name in the base class which defines some subcontrollers at runtime
Forward Ajax requests for this controller to the generic base class method
A midpoint in the URI. A number of other actions are chained off this one. It sets up the navigation menu and form keys
Capture the required language. The actual work is done in the begin method
Endpoint for the Ajax call that populates one of the panels on the accordion widget
Displays the splash screen for this controller explaining it's purpose
Redirects to the splash screen for this level
Displays the current user sessions stored in the session store
Return the version number of this module
Endpoint that displays the log file used by the suid root wrapper script
Endpoint that displays the application server log file
None
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
Copyright (c) 2008 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
| CatalystX-Usul documentation | Contained in the CatalystX-Usul distribution. |
# @(#)$Id: Admin.pm 584 2009-06-12 15:25:11Z pjf $ package CatalystX::Usul::Controller::Admin; use strict; use warnings; use version; our $VERSION = qv( sprintf '0.3.%d', q$Rev: 584 $ =~ /\d+/gmx ); use parent qw(CatalystX::Usul::Controller); use Class::C3; my $SEP = q(/); __PACKAGE__->config( security_logfile => q(admin.log), ); __PACKAGE__->mk_accessors( qw(security_logfile) ); sub base : Chained(lang) CaptureArgs(0) { # PathPart set in global configuration } sub begin : Private { return shift->next::method( @_ ); } sub build_subcontrollers { return shift->build_subcomponents( __PACKAGE__ ); } sub check_field : Chained(base) Args(0) HasActions { return shift->next::method( @_ ); } sub common : Chained(base) PathPart('') CaptureArgs(0) { my ($self, $c) = @_; $self->next::method( $c ); $self->load_keys( $c ); $self->add_sidebar_panel( $c, { name => q(default) } ); $self->add_sidebar_panel( $c, { name => q(overview) } ); return; } sub lang : Chained(/) PathPart('') CaptureArgs(1) { # Capture the language selection from the requested url } sub logfile_menu : Chained(common) CaptureArgs(0) { } sub overview : Chained(base) Args(0) { return shift->next::method( @_ ); } sub reception : Chained(common) Args(0) { my ($self, $c) = @_; $c->model( q(Base) )->simple_page( q(reception) ); return; } sub redirect_to_default : Chained(base) PathPart('') Args { my ($self, $c) = @_; return $self->redirect_to_path( $c, $SEP.q(reception) ); } sub version { return $VERSION; } sub view_security_log : Chained(logfile_menu) Args(0) { my ($self, $c) = @_; my $path = $self->catfile( $c->config->{logsdir}, $self->security_logfile ); $c->model( q(FileSystem) )->view_file( q(logfile), $path ); return; } sub view_logfile : Chained(logfile_menu) PathPart('') Args(0) { my ($self, $c) = @_; my $path = $c->config->{logfile}; $c->model( q(FileSystem) )->view_file( q(logfile), $path ); return; } 1; __END__
# Local Variables: # mode: perl # tab-width: 3 # End: