1 %# BEGIN BPS TAGGED BLOCK {{{
5 %# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
6 %# <jesse@bestpractical.com>
8 %# (Except where explicitly superseded by other copyright notices)
13 %# This work is made available to you under the terms of Version 2 of
14 %# the GNU General Public License. A copy of that license should have
15 %# been provided with this software, but in any event can be snarfed
18 %# This work is distributed in the hope that it will be useful, but
19 %# WITHOUT ANY WARRANTY; without even the implied warranty of
20 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 %# General Public License for more details.
23 %# You should have received a copy of the GNU General Public License
24 %# along with this program; if not, write to the Free Software
25 %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 %# 02110-1301 or visit their web page on the internet at
27 %# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
30 %# CONTRIBUTION SUBMISSION POLICY:
32 %# (The following paragraph is not intended to limit the rights granted
33 %# to you to modify and distribute this software under the terms of
34 %# the GNU General Public License and is only of importance to you if
35 %# you choose to contribute your changes and enhancements to the
36 %# community by submitting them to Best Practical Solutions, LLC.)
38 %# By intentionally submitting any modifications, corrections or
39 %# derivatives to this work, or any other work intended for use with
40 %# Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 %# you are the copyright holder for those contributions and you grant
42 %# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
43 %# royalty-free, perpetual, license to use, copy, create derivative
44 %# works based on those contributions, and sublicense and distribute
45 %# those contributions and any derivatives thereof.
47 %# END BPS TAGGED BLOCK }}}
49 require Module::Versions::Report;
50 my $title = loc('System Configuration');
51 unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
52 Abort(loc('This feature is only available to system administrators'));
57 <& /Admin/Elements/Header, Title => $title &>
58 <& /Admin/Elements/ToolTabs,
59 current_tab => 'Admin/Tools/Configuration.html',
60 current_subtab => 'Admin/Tools/Configuration.html',
65 <h2><&|/l&>Loaded perl modules</&></h2>
66 % my $report = Module::Versions::Report::report();
67 % my @report = grep /v\d/, split("\n",$report);
69 <% join('<br />', @report) |n %>
72 <h2><&|/l&>RT Config</&></h2>
75 foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) {
76 my $val = RT->Config->Get( $key );
77 next unless defined $val;
79 my $meta = RT->Config->Meta( $key );
81 if ( $meta->{'Source'}{'Extension'} && $meta->{'Source'}{'SiteConfig'} ) {
82 $description = loc("[_1] site config", $meta->{'Source'}{'Extension'});
84 elsif ( $meta->{'Source'}{'Extension'} ) {
85 $description = loc("[_1] core config", $meta->{'Source'}{'Extension'});
87 elsif ( $meta->{'Source'}{'SiteConfig'} ) {
88 $description = loc("site config");
91 $description = loc("core config");
94 <tr><th><% $key %></th>
96 % if ( $key =~ /Password(?!Length)/i ) {
97 <em>Password not printed</em>\
98 % } elsif ( !ref $val ) {
100 % } elsif ( ref $val eq 'ARRAY' ) {
101 <% join ', ', @$val %>\
102 % } elsif ( ref $val eq 'HASH' ) {
103 <% join ', ', %$val %>\
108 <tr><td><% $description %></td></tr>
112 <h2><&|/l&>RT Variables</&></h2>
114 % { no strict qw/refs/;
115 % my %config_opt = map { $_ => 1 } RT->Config->Options( Overridable => undef );
116 % foreach my $key ( sort keys %{*RT::} ) {
117 % next if !${'RT::'.$key} || ref ${'RT::'.$key} || $config_opt{ $key };
118 <tr><th>RT::<% $key %></th>
120 % if ( $key =~ /Password(?!Length)/i ) {
121 <em>Password not printed</em>
131 <h2><&|/l&>RT Size</&></h2>
134 for my $type (qw/Ticket Queue Transaction Group/) {
135 my $class = 'RT::' . $type . 's';
136 my $collection = $class->new($RT::SystemUser);
137 $collection->UnLimit;
138 my $count = $collection->CountAll;
140 <tr><th><% $type %>s</th>
141 <td><% $count %></td></tr>
145 my $users = RT::Users->new($RT::SystemUser);
147 my $user_count = $users->CountAll;
149 $users->LimitToPrivileged;
150 my $privileged_count = $users->CountAll;
151 my $unprivileged_count = $user_count - $privileged_count;
153 <tr><th>Privileged Users</th>
154 <td><% $privileged_count %></td></tr>
155 <tr><th>Unprivileged Users</th>
156 <td><% $unprivileged_count %></td></tr>
159 <h2><&|/l&>Perl configuration</&></h2>
162 <% Config::myconfig() %>
165 <h2><&|/l&>Perl Include Paths (@INC)</&></h2>
167 % foreach my $inc (@INC) {