Commit f3c7a21c472f6d0f53f9f2cec5c4c1bb673897a5
1 parent
d2bc5b9d
Exists in
master
and in
2 other branches
only compare versions against git ones
Showing
3 changed files
with
19 additions
and
11 deletions
Show diff stats
README.md
spb_copr_status.psgi
... | ... | @@ -59,19 +59,27 @@ sub info2html { |
59 | 59 | my $table_entries=""; |
60 | 60 | foreach my $key (%{$info}) { |
61 | 61 | next if(ref($key) eq 'HASH'); |
62 | - my $fill_row; | |
63 | - if($info->{$key}->{'v4_version'} eq $info->{$key}->{'v5_version'} && $info->{$key}->{'v4_version'} eq $info->{$key}->{git_version}) { | |
64 | - $fill_row = "success"; | |
62 | + my $fill_v4_row; | |
63 | + my $fill_v5_row; | |
64 | + if($info->{$key}->{'v4_version'} eq $info->{$key}->{git_version}) { | |
65 | + $fill_v4_row = "success"; | |
65 | 66 | } |
66 | 67 | else { |
67 | - $fill_row = "danger"; | |
68 | + $fill_v4_row = "danger"; | |
68 | 69 | } |
69 | 70 | |
70 | - $table_entries .= "<tr class=\"$fill_row\"> | |
71 | - <td>$key</td> | |
72 | - <td>$info->{$key}->{'v4_version'}</td> | |
73 | - <td>$info->{$key}->{'v5_version'}</td> | |
71 | + if($info->{$key}->{'v5_version'} eq $info->{$key}->{git_version}) { | |
72 | + $fill_v5_row = "success"; | |
73 | + } | |
74 | + else { | |
75 | + $fill_v5_row = "danger"; | |
76 | + } | |
77 | + | |
78 | + $table_entries .= "<tr> | |
79 | + <td><b>$key</b></td> | |
74 | 80 | <td>$info->{$key}->{'git_version'}</td> |
81 | + <td class=\"$fill_v4_row\">$info->{$key}->{'v4_version'}</td> | |
82 | + <td class=\"$fill_v5_row\">$info->{$key}->{'v5_version'}</td> | |
75 | 83 | </tr>"; |
76 | 84 | } |
77 | 85 | ... | ... |
template.html.tt
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | </div> |
28 | 28 | |
29 | 29 | <div class="jumbotron"> |
30 | - <p class="lead">This app fetches data from softwarepublico Copr EPEL7 repositories and compares package versions. In short, red rows mean package versions differ among the repositories and/or git (<b>note that this is NOT necessarily a bad thing</b>).</p> | |
30 | + <p class="lead">This app fetches data from softwarepublico Copr EPEL7 repositories and compares package versions. In short, a red cell means that the package version differ from the git one (<b>note that this is NOT necessarily a bad thing</b>).</p> | |
31 | 31 | <div class="row"> |
32 | 32 | <div class="col-md-6 col-md-offset-3"> |
33 | 33 | <table class="table table-striped"> |
... | ... | @@ -45,9 +45,9 @@ |
45 | 45 | <table class="table table-striped"> |
46 | 46 | <tr> |
47 | 47 | <th>PACKAGE</th> |
48 | + <th>git</th> | |
48 | 49 | <th>softwarepublico/v4</th> |
49 | 50 | <th>softwarepublico/v5</th> |
50 | - <th>git</th> | |
51 | 51 | </tr> |
52 | 52 | {$table_entries} |
53 | 53 | </table> | ... | ... |