[Rt-commit] rt branch, 4.2/config-page-extensions, created. rt-4.2.13-53-g8cd8411

Dustin Collins strega at bestpractical.com
Wed Aug 31 18:50:08 EDT 2016


The branch, 4.2/config-page-extensions has been created
        at  8cd8411090e783a460d84a4725e7f33a81145d2f (commit)

- Log -----------------------------------------------------------------
commit 8cd8411090e783a460d84a4725e7f33a81145d2f
Author: Dustin Collins <strega at bestpractical.com>
Date:   Wed Aug 31 18:45:15 2016 -0400

    Add loaded RT Extension names and version numbers to admin config page
    
    Fixes: I#31482

diff --git a/lib/RT/Plugin.pm b/lib/RT/Plugin.pm
index d10f639..07a2e05 100644
--- a/lib/RT/Plugin.pm
+++ b/lib/RT/Plugin.pm
@@ -84,6 +84,17 @@ sub Name {
     return $self->{name};
 }
 
+=head2 Version
+
+Returns the extension version.
+
+=cut
+
+sub Version {
+    my $self = shift;
+    return $self->Name->VERSION;
+}
+
 =head2 Path
 
 Takes a name of sub directory and returns its full path, for example:
diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index 4535827..26ffcc8 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -241,6 +241,23 @@ for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers Unprivileged
 </table>
 </&>
 
+
+<&|/Widgets/TitleBox, title => loc("Loaded RT Extensions")&>
+<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
+<tr class="collection-as-table">
+<th class="collection-as-table"><&|/l&>Extension</&></th>
+<th class="collection-as-table"><&|/l&>Version</&></th>
+% my $row = 0;
+% foreach my $pluginName (grep $_, RT->Config->Get('Plugins')) {
+% my $plugin = RT::Plugin->new( name => $pluginName );
+<tr class="<% $row++ %2 ? 'oddline' : 'evenline'%>">
+<td class="collection-as-table"><%$plugin->Name%></td>
+<td class="collection-as-table"><%$plugin->Version%></td>
+</tr>
+% }
+</table>
+</&>
+
 <&|/Widgets/TitleBox, title => loc("Loaded perl modules")&>
 <table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
 <tr class="collection-as-table">

-----------------------------------------------------------------------


More information about the rt-commit mailing list