diff --git a/README.md b/README.md new file mode 100644 index 0000000..d7d3f65 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# About + +This app was built to support the development of Portal do Software Público Brasileiro. + +It shows versions for published packages in EPEL7 Fedora Copr repositories. + +Note that this app consists of a single PSGI script, a template file and Bootstrap. + +# Instalation + +In order to use this app you will need perl 5 and the following perl modules installed: + +Plack +LWP::Simple +JSON +Text::Template + +# License + +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +This program 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, see http://www.gnu.org/licenses/. diff --git a/spb_copr_status.psgi b/spb_copr_status.psgi index 3ee60ba..2fd522d 100644 --- a/spb_copr_status.psgi +++ b/spb_copr_status.psgi @@ -39,7 +39,15 @@ sub info2html { my $table_entries=""; foreach my $key (%{$inforef}) { next if(ref($key) eq 'HASH'); - $table_entries .= " + my $fill_row; + if($inforef->{$key}->{'v4_version'} eq $inforef->{$key}->{'v5_version'}) { + $fill_row = "success"; + } + else { + $fill_row = "danger"; + } + + $table_entries .= " $key $inforef->{$key}->{'v4_version'} $inforef->{$key}->{'v5_version'} @@ -70,6 +78,6 @@ my $app = sub { }; builder { - enable "Static", path => qr!^(/css|/js|/fonts)!; + enable "Static", path => qr!^(/css|/js)!; $app; } diff --git a/template.html.tt b/template.html.tt index 11281d3..a812a62 100644 --- a/template.html.tt +++ b/template.html.tt @@ -13,14 +13,49 @@ - - - - - - - {$table_entries} -
PACKAGEsoftwarepublico/v4softwarepublico/v5
+
+ +
+ +

SPB Copr Status

+
+ +
+

This app fetches data from softwarepublico Copr EPEL7 repositories and compare package versions. In short, red rows mean package versions differ among the repositories (note that this it NOT necessarily a bad thing).

+
+
+ + + + + + + +
Versions match
Versions do not match
+
+
+
+ + + + + + + + {$table_entries} +
PACKAGEsoftwarepublico/v4softwarepublico/v5
+ + + +
-- libgit2 0.21.2