From df10d52d9ce26aa0400a5223a8171b1f5e23cf67 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Mon, 9 Sep 2013 23:29:48 +0200 Subject: Rename index.html to infos.html and advisories.html to index.html --- NEWS | 1 + lib/MGA/Advisories.pm | 1 + static/advisories.css | 5 ++ tmpl/advisories.html | 151 ------------------------------------------ tmpl/index.html | 178 +++++++++++++++++++++++++++++++++++++++----------- tmpl/infos.html | 51 +++++++++++++++ 6 files changed, 198 insertions(+), 189 deletions(-) delete mode 100644 tmpl/advisories.html create mode 100644 tmpl/infos.html diff --git a/NEWS b/NEWS index 0b95855..c310dc1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- move advisories to index, and infos to a separate page - add menu to filter advisories list Version 0.15 diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index 61f2cef..4343d47 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -239,6 +239,7 @@ sub output_pages { }; process_template($template, 'index', $vars, 'index'); process_template($template, 'advisories', $vars, 'advisories'); + process_template($template, 'infos', $vars, 'infos'); process_template($template, 'CVE', $vars, 'CVE'); } diff --git a/static/advisories.css b/static/advisories.css index e1c8737..5bd97f9 100644 --- a/static/advisories.css +++ b/static/advisories.css @@ -17,3 +17,8 @@ padding-top: 1em; background: #fff; } + +#more_infos_link { + padding-left: 2em; + font-size: 1.2em; +} diff --git a/tmpl/advisories.html b/tmpl/advisories.html deleted file mode 100644 index eab4bf8..0000000 --- a/tmpl/advisories.html +++ /dev/null @@ -1,151 +0,0 @@ -[%- USE JSON ( pretty => 1 ) -%] -[%- USE date -%] -[%- - jsadvdb = []; - mga_releases = {}; - FOREACH adv IN advdb.sorted; - a = {}; - a.src = []; - pkgs = {}; - FOREACH rel IN advdb.advisories.$adv.src.keys; - FOREACH media IN advdb.advisories.$adv.src.$rel.keys; - FOREACH srpm IN advdb.advisories.$adv.src.$rel.$media; - SET srcname = tools.pkgname(srpm); - IF ! pkgs.$srcname; - pkgs.$srcname = 1; - a.src.push(srcname); - END; - END; - END; - END; - a.CVE = advdb.advisories.$adv.CVE; - a.rel = advdb.advisories.$adv.src.keys; - FOREACH rel IN a.rel; - mga_releases.$rel = 1; - END; - a.type = advdb.advisories.$adv.type; - html = BLOCK -%] - - - [% date.format(advdb.advisories.$adv.status.published, format => '%Y-%m-%d', gmt => 1) %] - - [% adv %] - - [% SET sep = '' %] - [% FOREACH srcname IN a.src -%] - [%- sep -%] - [%- SET sep = ', ' -%] - [% srcname %] - [%- END -%] - - [% advdb.advisories.$adv.type %] - - [% SET sep = '' %] - [% FOREACH rel IN advdb.advisories.$adv.src.keys %] - [% sep %] - [% SET sep = ', ' %] - [% rel %] - [% END %] - - - [% SET sep = '' %] - [% FOREACH cve IN advdb.advisories.$adv.CVE %] - [% sep %] - [% SET sep = ', ' %] - [% cve %] - [% END %] - - - [%- END; - a.html = html.collapse; - jsadvdb.push(a); - END; --%] - - - - Mageia Advisories - - [%- INCLUDE head.html -%] - - - - [%- INCLUDE body_top.html -%] -

Advisories » All rss

- -
-
- Mageia release: - - Type: - - Source package: - - CVE: - -
-
-
-
- - - diff --git a/tmpl/index.html b/tmpl/index.html index 671f917..f48b658 100644 --- a/tmpl/index.html +++ b/tmpl/index.html @@ -1,51 +1,153 @@ -[%- USE date(format='%Y/%m/%d') -%] +[%- USE JSON ( pretty => 1 ) -%] +[%- USE date -%] +[%- + jsadvdb = []; + mga_releases = {}; + FOREACH adv IN advdb.sorted; + a = {}; + a.src = []; + pkgs = {}; + FOREACH rel IN advdb.advisories.$adv.src.keys; + FOREACH media IN advdb.advisories.$adv.src.$rel.keys; + FOREACH srpm IN advdb.advisories.$adv.src.$rel.$media; + SET srcname = tools.pkgname(srpm); + IF ! pkgs.$srcname; + pkgs.$srcname = 1; + a.src.push(srcname); + END; + END; + END; + END; + a.CVE = advdb.advisories.$adv.CVE; + a.rel = advdb.advisories.$adv.src.keys; + FOREACH rel IN a.rel; + mga_releases.$rel = 1; + END; + a.type = advdb.advisories.$adv.type; + html = BLOCK -%] + + + [% date.format(advdb.advisories.$adv.status.published, format => '%Y-%m-%d', gmt => 1) %] + + [% adv %] + + [% SET sep = '' %] + [% FOREACH srcname IN a.src -%] + [%- sep -%] + [%- SET sep = ', ' -%] + [% srcname %] + [%- END -%] + + [% advdb.advisories.$adv.type %] + + [% SET sep = '' %] + [% FOREACH rel IN advdb.advisories.$adv.src.keys %] + [% sep %] + [% SET sep = ', ' %] + [% rel %] + [% END %] + + + [% SET sep = '' %] + [% FOREACH cve IN advdb.advisories.$adv.CVE %] + [% sep %] + [% SET sep = ', ' %] + [% cve %] + [% END %] + + + [%- END; + a.html = html.collapse; + jsadvdb.push(a); + END; +-%] Mageia Advisories + [%- INCLUDE head.html -%] + [%- INCLUDE body_top.html -%] -

Mageia Advisories

-
-
-

Advisories

- -
+

Advisories rss

-
-

CVE list

- A list of fixed CVE is available. -
+
+
+ Mageia release: + + Type: + + Source package: + + CVE: + -
-

Command line tool

- A command line tool is available to list and display advisories. - More details. -
- -
-

Older Advisories

- Older advisories are available on Mageia wiki. -
- -
-

DB Dump

- A dump of all advisories is available as a yaml file. -
- -
-

Source code

- Source code for the tool used to generate this website is - available on svn. - Patches or ideas can be posted on the sysadmin-discuss mailing list. -
+ More infos ... +
+
+
+ diff --git a/tmpl/infos.html b/tmpl/infos.html new file mode 100644 index 0000000..a6b57f4 --- /dev/null +++ b/tmpl/infos.html @@ -0,0 +1,51 @@ +[%- USE date(format='%Y/%m/%d') -%] + + + + Mageia Advisories + [%- INCLUDE head.html -%] + + + [%- INCLUDE body_top.html -%] +

Advisories » Infos

+
+
+

Advisories

+ +
+ +
+

CVE list

+ A list of fixed CVE is available. +
+ +
+

Command line tool

+ A command line tool is available to list and display advisories. + More details. +
+ +
+

Older Advisories

+ Older advisories are available on Mageia wiki. +
+ +
+

DB Dump

+ A dump of all advisories is available as a yaml file. +
+ +
+

Source code

+ Source code for the tool used to generate this website is + available on svn. + Patches or ideas can be posted on the sysadmin-discuss mailing list. +
+
+ + -- cgit v1.2.1