From e70abd21bab68b23488f7ef1ee2e693a3b365691 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 18 May 2010 18:49:59 +0000 Subject: import rt 3.8.8 --- rt/share/html/Admin/Tools/Configuration.html | 180 +++++++++++++++++++-------- 1 file changed, 126 insertions(+), 54 deletions(-) (limited to 'rt/share/html/Admin/Tools/Configuration.html') diff --git a/rt/share/html/Admin/Tools/Configuration.html b/rt/share/html/Admin/Tools/Configuration.html index eb48af19c..22c846aca 100644 --- a/rt/share/html/Admin/Tools/Configuration.html +++ b/rt/share/html/Admin/Tools/Configuration.html @@ -50,9 +50,7 @@ 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, @@ -60,18 +58,15 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super 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 %> -
- -

<&|/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 ); next unless defined $val; @@ -90,9 +85,11 @@ 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 ) { @@ -104,19 +101,38 @@ foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) { % } else { <% ref $val %>\ % } -
<% $description %>
+% if ( $description =~ /^.*site config$/ ) { +<% $description %> +% } else { +<% $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 % } else { @@ -127,44 +143,100 @@ 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 ($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 ( map { $_->[1] } $m->interp->comp_root_array ) { +
  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("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} %> +
+ -

<&|/l&>Perl configuration

+<&|/Widgets/TitleBox, title => loc("Perl configuration") &> % require Config;
 <% Config::myconfig() %>
 
- -

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

-
-% foreach my $inc (@INC) {
-<% $inc %>
-% }
-
+ -- cgit v1.2.1