X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FTools%2FConfiguration.html;h=ed7d4651b3d7a4c40f07cf6c6cfe0a8ff9672e7a;hb=85e677b86fc37c54e6de2b06340351a28f5a5916;hp=eb48af19c05285a6bdaff3e34338f4617906383f;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/rt/share/html/Admin/Tools/Configuration.html b/rt/share/html/Admin/Tools/Configuration.html index eb48af19c..ed7d4651b 100644 --- a/rt/share/html/Admin/Tools/Configuration.html +++ b/rt/share/html/Admin/Tools/Configuration.html @@ -1,40 +1,40 @@ %# BEGIN BPS TAGGED BLOCK {{{ -%# +%# %# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# -%# +%# +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# +%# %# (Except where explicitly superseded by other copyright notices) -%# -%# +%# +%# %# LICENSE: -%# +%# %# This work is made available to you under the terms of Version 2 of %# the GNU General Public License. A copy of that license should have %# been provided with this software, but in any event can be snarfed %# from www.gnu.org. -%# +%# %# This work is distributed in the hope that it will be useful, but %# WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. -%# +%# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at %# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# +%# +%# %# CONTRIBUTION SUBMISSION POLICY: -%# +%# %# (The following paragraph is not intended to limit the rights granted %# to you to modify and distribute this software under the terms of %# the GNU General Public License and is only of importance to you if %# you choose to contribute your changes and enhancements to the %# community by submitting them to Best Practical Solutions, LLC.) -%# +%# %# By intentionally submitting any modifications, corrections or %# derivatives to this work, or any other work intended for use with %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,37 +43,29 @@ %# royalty-free, perpetual, license to use, copy, create derivative %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. -%# +%# %# END BPS TAGGED BLOCK }}} <%init> require Module::Versions::Report; my $title = loc('System Configuration'); unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) { Abort(loc('This feature is only available to system administrators')); -} - - +} <& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/ToolTabs, - current_tab => 'Admin/Tools/Configuration.html', - current_subtab => 'Admin/Tools/Configuration.html', - Title => $title &> - - - -

<&|/l&>Loaded perl modules

-% my $report = Module::Versions::Report::report(); -% my @report = grep /v\d/, split("\n",$report); -
-<% join('
', @report) |n %> -
+<& /Elements/Tabs &> -

<&|/l&>RT Config

- +<&|/Widgets/TitleBox, title => loc("RT Configuration") &> +
+ + + + + <%PERL> +my $index_conf; foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) { - my $val = RT->Config->Get( $key ); + my $val = RT->Config->GetObfuscated( $key ); next unless defined $val; my $meta = RT->Config->Meta( $key ); @@ -90,35 +82,50 @@ foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) { else { $description = loc("core config"); } + $index_conf++; - - + + + - + + % }
<&|/l&>Option<&|/l&>Value<&|/l&>Source
<% $key %>\ +
<% $key %> % if ( $key =~ /Password(?!Length)/i ) { -Password not printed\ -% } elsif ( !ref $val ) { -<% "$val" %>\ -% } elsif ( ref $val eq 'ARRAY' ) { -<% join ', ', @$val %>\ -% } elsif ( ref $val eq 'HASH' ) { -<% join ', ', %$val %>\ +<% loc('Password not printed' ) %>\ +% } else { +<% stringify($val) |n %>\ +% } + +% if ( $meta->{'Source'}{'SiteConfig'} ) { +<% $description %> % } else { -<% ref $val %>\ +<% $description %> % } -
<% $description %>
- -

<&|/l&>RT Variables

- -% { no strict qw/refs/; -% my %config_opt = map { $_ => 1 } RT->Config->Options( Overridable => undef ); -% foreach my $key ( sort keys %{*RT::} ) { -% next if !${'RT::'.$key} || ref ${'RT::'.$key} || $config_opt{ $key }; - -
RT::<% $key %> + + + + + - - - +<&|/Widgets/TitleBox, title => loc("Perl library search order") &> +
    +% foreach my $inc (@INC) { +
  1. <% $inc %>
  2. +% } +
+ + + +
+<&|/Widgets/TitleBox, title=> loc("RT core variables") &> + + + + + +<%PERL> +{ no strict qw/refs/; +my %config_opt = map { $_ => 1 } RT->Config->Options( Overridable => undef ); +my $index_var; +foreach my $key ( sort keys %{*RT::} ) { + next if !${'RT::'.$key} || ref ${'RT::'.$key} || $config_opt{ $key }; + $index_var++; + + + +
<&|/l&>Variable<&|/l&>Value
RT::<% $key %> % if ( $key =~ /Password(?!Length)/i ) { -Password not printed +<% loc('Password not printed' ) %>\ % } else { <% ${'RT::'.$key} %> % } @@ -127,44 +134,139 @@ foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) { % } % }
+ -

<&|/l&>RT Size

- +<&|/Widgets/TitleBox, title => loc("RT Size") &> +
+ + + + <%PERL> -for my $type (qw/Ticket Queue Transaction Group/) { - my $class = 'RT::' . $type . 's'; - my $collection = $class->new($RT::SystemUser); +my ($index_size, $user_count, $privileged_count); +for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers UnprivilegedUsers/) { + my $count; + my $class = 'RT::' . $type; + $class =~ s/Privileged|Unprivileged//; + my $collection = $class->new(RT->SystemUser); $collection->UnLimit; - my $count = $collection->CountAll; + if ($type =~ /PrivilegedUsers/) { + $user_count = $collection->CountAll; + $collection->LimitToPrivileged; + $count = $privileged_count = $collection->CountAll; + } elsif ($type =~ /UnprivilegedUsers/) { + $count = $user_count - $privileged_count; + } else { + $count = $collection->CountAll; + } + $index_size++; - - + + + + % } +
<&|/l&>Object<&|/l&>Size
<% $type %>s<% $count %>
<% $type %><% $count %>
+ +
-<%PERL> -my $users = RT::Users->new($RT::SystemUser); -$users->UnLimit; -my $user_count = $users->CountAll; +<&|/Widgets/TitleBox, title => loc("Mason template search order") &> +
    +% foreach my $path ( RT::Interface::Web->ComponentRoots ) { +
  1. <% $path %>
  2. +% } +
+ -$users->LimitToPrivileged; -my $privileged_count = $users->CountAll; -my $unprivileged_count = $user_count - $privileged_count; - -
Privileged Users<% $privileged_count %>
Unprivileged Users<% $unprivileged_count %>
+ +<&|/Widgets/TitleBox, title => loc("Global Attributes") &> + + + + + +% my $attrs = $RT::System->Attributes; +% my $index_size = 0; +% while ( my $attr = $attrs->Next ) { + +% if ($attr->Name eq 'UserLogo') { +% my $content = $attr->Content; +% $content->{data} = defined $content->{data} ? 'DATA' : 'undef' +% if exists $content->{data}; + +% } else { + +% } + +% $index_size++; +% }
<&|/l&>Name<&|/l&>Value
<% $attr->Name %><% stringify($content) |n %><% $attr->Name %><% stringify($attr->Content) |n %>
+ -

<&|/l&>Perl configuration

+<&|/Widgets/TitleBox, title => loc("Loaded perl modules")&> + + + + + + + +<%perl> +my $i = 0; +my $report = Module::Versions::Report::report(); +my @report = grep /v\d/, split("\n",$report); +shift @report; # throw away the perl version +my ($ver, $source, $distfile); +foreach my $item (@report) { +if ($item =~ /^\s*(.*?)\s*v(\S+);/) { + $item = $1; + $ver = $2; + $distfile = $item.".pm"; + $distfile =~ s|::|/|g; +} + + + + + + +% } +
<&|/l&>Module<&|/l&>Version<&|/l&>Source
<% $item %> + <%$ver%> + + <% $INC{$distfile} || '' %> +
+ + +<&|/Widgets/TitleBox, title => loc("Perl configuration") &> % require Config;
 <% Config::myconfig() %>
 
+ -

<&|/l&>Perl Include Paths (@INC)

-
-% foreach my $inc (@INC) {
-<% $inc %>
-% }
-
+<%INIT> +use Data::Dumper; +local $Data::Dumper::Terse = 1; +local $Data::Dumper::Indent = 2; + +sub stringify { + my $value = shift; + my $output = Dumper $value; + RT::Interface::Web::EscapeUTF8(\$output); + $output =~ s/ / /g; + $output =~ s!\n!
!g; + return $output; +} +