[Rt-commit] rt branch, 4.2/fixup-version-history, updated. rt-4.1.17-9-g43f1642

Jim Brandt jbrandt at bestpractical.com
Wed Sep 4 15:58:44 EDT 2013


The branch, 4.2/fixup-version-history has been updated
       via  43f1642d264013684f1c852ec0d63d7ee25433b2 (commit)
       via  a5ab2c5db0145727572ace8c856903cc120248a9 (commit)
      from  476012566a751de9f6c63195c6998977bd7238c1 (commit)

Summary of changes:
 share/html/Admin/Tools/Configuration.html | 14 ++++++++++----
 share/static/css/base/collection.css      |  4 ++++
 2 files changed, 14 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit a5ab2c5db0145727572ace8c856903cc120248a9
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Sep 4 15:53:43 2013 -0400

    Show one-off inserts at same level as full upgrades

diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index bca7adf..a4a967a 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -315,11 +315,14 @@ for my $package (@packages) {
 <%perl>
     my @upgrades;
     my @failed;
+    my $full_id = '';
 UPGRADE: foreach my $upgrade ( @{$upgrade_history->{$package}} ){
         my $i = 0;
         if ( $upgrade->{'stage'}
              and $upgrade->{'stage'} eq 'before' ){
             push @upgrades, $upgrade->{'individual_id'};
+            $full_id = $upgrade->{'full_id'}
+                if $upgrade->{'type'} eq 'full upgrade';
         }
         elsif ( $upgrade->{'stage'}
                 and $upgrade->{'stage'} eq 'after' ){
@@ -335,7 +338,10 @@ UPGRADE: foreach my $upgrade ( @{$upgrade_history->{$package}} ){
 
         my $tr_class = 'oddline';
         if ( $package eq 'RT' ){
-            if ( $upgrade->{'type'} ne 'full upgrade' ) {
+            # Check the full_id to confirm an individual upgrade step is part
+            # of a full upgrade before setting the class.
+            if ( $upgrade->{'type'} ne 'full upgrade'
+                 and $full_id eq $upgrade->{'full_id'} ) {
                 $tr_class = 'evenline';
                 $tr_class .= ' upgrade-history-' . $upgrade->{'full_id'}
                     if $upgrade->{'full_id'};
@@ -355,8 +361,8 @@ UPGRADE: foreach my $upgrade ( @{$upgrade_history->{$package}} ){
 <tr class="<% $tr_class %>">
 <td class="collection-as-table"></td>
 %       }
-%       if ( $upgrade->{'type'} ne 'full upgrade' ){
-%#            and $full_upgrade ){
+%       if ( $upgrade->{'type'} ne 'full upgrade'
+%            and $full_id eq $upgrade->{'full_id'} ){
 <td class="collection-as-table" style="padding-left:15px">
 %       } else {
 <td class="collection-as-table">

commit 43f1642d264013684f1c852ec0d63d7ee25433b2
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Sep 4 15:58:08 2013 -0400

    Add some shading to upgrade failures

diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index a4a967a..48e0f15 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -410,7 +410,7 @@ foreach my $id ( @failed, @upgrades ){
         . ' did not finish.';
     }
 </%perl>
-<tr class="oddline"><td class="collection-as-table" colspan=4><% $message %></td></tr>
+<tr><td class="upgrade-history-error" colspan=4><% $message %></td></tr>
 % }
 </table>
 % }
diff --git a/share/static/css/base/collection.css b/share/static/css/base/collection.css
index d690192..e3cb7dc 100644
--- a/share/static/css/base/collection.css
+++ b/share/static/css/base/collection.css
@@ -14,3 +14,7 @@ table.collection td:first-child, table.collection th:first-child {
 .collection-as-table .user a:visited {
     color: inherit;
 }
+
+td.upgrade-history-error {
+    background-color: #ffffcc;
+}

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


More information about the Rt-commit mailing list