X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FTools%2FConfiguration.html;h=4535827704650700e7f70422c8f634e7ce2aabcd;hp=22c846aca8488c11cf15b368fc9edee82c9c757b;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=624b2d44625f69d71175c3348cae635d580c890b diff --git a/rt/share/html/Admin/Tools/Configuration.html b/rt/share/html/Admin/Tools/Configuration.html index 22c846aca..453582770 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-2016 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,7 +43,7 @@ %# 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; @@ -53,10 +53,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super } <& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/ToolTabs, - current_tab => 'Admin/Tools/Configuration.html', - current_subtab => 'Admin/Tools/Configuration.html', - Title => $title &> +<& /Elements/Tabs &> <&|/Widgets/TitleBox, title => loc("RT Configuration") &> @@ -68,7 +65,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super <%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, $session{'CurrentUser'} ); next unless defined $val; my $meta = RT->Config->Meta( $key ); @@ -90,20 +87,14 @@ foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) {
<% $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 %>\ +% if ( $key =~ /Password/i and $key !~ /MinimumPasswordLength|AllowLoginPasswordAutoComplete/ ) { +<% loc('Password not printed' ) %>\ % } else { -<% ref $val %>\ +<% stringify($val) |n %>\ % } -% if ( $description =~ /^.*site config$/ ) { +% if ( $meta->{'Source'}{'SiteConfig'} ) { <% $description %> % } else { <% $description %> @@ -134,7 +125,7 @@ foreach my $key ( sort keys %{*RT::} ) { RT::<% $key %> % if ( $key =~ /Password(?!Length)/i ) { -Password not printed +<% loc('Password not printed' ) %>\ % } else { <% ${'RT::'.$key} %> % } @@ -157,8 +148,9 @@ for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers Unprivileged my $count; my $class = 'RT::' . $type; $class =~ s/Privileged|Unprivileged//; - my $collection = $class->new($RT::SystemUser); + my $collection = $class->new(RT->SystemUser); $collection->UnLimit; + $collection->FindAllRows; # find disabled if ($type =~ /PrivilegedUsers/) { $user_count = $collection->CountAll; $collection->LimitToPrivileged; @@ -182,7 +174,16 @@ for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers Unprivileged <&|/Widgets/TitleBox, title => loc("Mason template search order") &>
    -% foreach my $path ( map { $_->[1] } $m->interp->comp_root_array ) { +% foreach my $path ( RT::Interface::Web->ComponentRoots ) { +
  1. <% $path %>
  2. +% } +
+ + +<&|/Widgets/TitleBox, title => loc("Static file search order") &> +
    +% foreach my $path ( (map {$_->{root}} RT->Config->Get('StaticRoots')), +% RT::Interface::Web->StaticRoots ) {
  1. <% $path %>
  2. % }
@@ -196,9 +197,50 @@ for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers Unprivileged +<&|/Widgets/TitleBox, title=> loc("Loaded config files") &> +
    +% foreach my $config (RT->Config->LoadedConfigs) { +% if ($config->{site}) { +
  1. <% $config->{filename} %>
  2. +% } else { +
  3. <% $config->{filename} %>
  4. +% } +% } +
+ + +<&|/Widgets/TitleBox, title=> loc("Logging summary") &> + <& /Admin/Elements/LoggingSummary &> + +
+<&|/Widgets/TitleBox, title => loc("Global Attributes") &> + + + + + +% my $attrs = $RT::System->Attributes; +% my $index_size = 0; +% while ( my $attr = $attrs->Next ) { +% next if $attr->Name eq 'UpgradeHistory'; + +% 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 %>
+ + <&|/Widgets/TitleBox, title => loc("Loaded perl modules")&> @@ -227,16 +269,95 @@ if ($item =~ /^\s*(.*?)\s*v(\S+);/) { <%$ver%> % }
- <% $INC{$distfile} %> + <% $INC{$distfile} || '' %>
+<&|/Widgets/TitleBox, title => loc("RT upgrade history")&> +<& /Admin/Elements/UpgradeHistory &> + + <&|/Widgets/TitleBox, title => loc("Perl configuration") &> % require Config;
 <% Config::myconfig() %>
 
+ +<&|/Widgets/TitleBox, title=> loc("Environment variables") &> + + + + + +% my $row = 0; +% for my $key (sort keys %ENV) { + + + + +% } +
<&|/l&>Variable<&|/l&>Value
<% $key %><% $ENV{$key} %>
+ + +<&|/Widgets/TitleBox, title => loc("Operating System") &> + + + + + +<%perl> +my @os = ( + "Distribution" => 'lsb_release --all', + "uname -a" => 'uname -a', + "SELinux status" => 'getenforce', + "Apache" => [map { "$_ -V" } qw(apache2ctl apachectl httpdctl)], + "nginx" => 'nginx -V 2>&1', + "lighttpd" => 'lighttpd -V', +); +my @os_info; + +while (my ($name, $cmd) = splice @os, 0, 2) { + $cmd = [$cmd] unless ref $cmd eq 'ARRAY'; + for my $run (@$cmd) { + $run .= " /; + my $result = `$run`; + if (defined $result and $result =~ /\S/) { + push @os_info, $name => $result; + last; + } + } +} +my $row = 1; + +% while (my ($name, $output) = splice @os_info, 0, 2) { +"> + + + +% } +
Deployment type<% + $INC{'mod_perl.pm'} ? "mod_perl" : + $INC{'FCGI.pm'} ? "fastcgi" : + "standalone" %> +
<% $name %><% $output %>
+ + +<%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::EscapeHTML(\$output); + $output =~ s/ / /g; + $output =~ s!\n!
!g; + return $output; +} +