blob: f48b658afb76367982634379b57a7d3971a409e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
[%- 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 -%]
<tr>
<td width='100'>
[% date.format(advdb.advisories.$adv.status.published, format => '%Y-%m-%d', gmt => 1) %]
</td>
<td width='150'><a href="[% basename.ID(adv) %].html">[% adv %]</a></td>
<td>
[% SET sep = '' %]
[% FOREACH srcname IN a.src -%]
[%- sep -%]
[%- SET sep = ', ' -%]
<a href="[% basename.src(srcname) %].html">[% srcname %]</a>
[%- END -%]
</td>
<td>[% advdb.advisories.$adv.type %]</td>
<td>
[% SET sep = '' %]
[% FOREACH rel IN advdb.advisories.$adv.src.keys %]
[% sep %]
[% SET sep = ', ' %]
<a href="[% basename.rel(rel) %].html">[% rel %]</a>
[% END %]
</td>
<td>
[% SET sep = '' %]
[% FOREACH cve IN advdb.advisories.$adv.CVE %]
[% sep %]
[% SET sep = ', ' %]
<a href="[% basename.CVE(cve) %].html">[% cve %]</a>
[% END %]
</td>
</tr>
[%- END;
a.html = html.collapse;
jsadvdb.push(a);
END;
-%]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mageia Advisories</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="[% config.site_url %]/advisories.rss" />
[%- INCLUDE head.html -%]
<script type="text/javascript">
function make_table() {
var advdb = [% jsadvdb.json %];
var table_start = "<table id='adv_table' border='0'>\
<tr>\
<th>\
Date\
</th>\
<th>\
ID\
</th>\
<th>\
Source Package(s)\
</th>\
<th>\
Type\
</th>\
<th>\
Affected release(s)\
</th>\
<th>\
CVE\
</th>\
</tr>";
var table_end = "</table>";
var table_content = '';
var rel_index = document.getElementById('sel_rel').selectedIndex;
var rel = document.getElementById('sel_rel').options[rel_index].text;
var type_index = document.getElementById('sel_type').selectedIndex;
var type = document.getElementById('sel_type').options[type_index].text;
for (var i = 0; i < advdb.length; i++) {
if (rel != 'all' && advdb[i].rel.indexOf(rel) == -1)
continue;
if (type != 'all' && type != advdb[i].type)
continue;
var input_src = document.getElementById("txt_src").value;
if (input_src != '' && advdb[i].src.indexOf(input_src) == -1)
continue;
var input_cve = document.getElementById("txt_cve").value;
if (input_cve != '' && advdb[i].CVE.indexOf(input_cve) == -1)
continue;
table_content += advdb[i].html;
}
if (table_content == '')
document.getElementById("adv_table").innerHTML = 'No matching advisory found';
else
document.getElementById("adv_table").innerHTML = table_start + table_content + table_end;
}
</script>
</head>
<body>
[%- INCLUDE body_top.html -%]
<h1 id='mgnavt'><a href="index.html">Advisories</a> <a href="advisories.rss"><img src="http://static.mageia.org/g/images/smi/feed-16x16.png" alt="rss" /></a></h1>
<div id="adv_menu">
<form name="adv_form">
Mageia release:
<select id="sel_rel" onchange="make_table();">
<option>all</option>
[%- FOREACH rel IN mga_releases.keys.sort %]
<option>[% rel %]</option>
[%- END %]
</select>
Type:
<select id="sel_type" onchange="make_table();">
<option>all</option>
<option>security</option>
<option>bugfix</option>
</select>
Source package:
<input type="text" id="txt_src" size="10" onchange="make_table();" oninput="make_table();" />
CVE:
<input type="text" id="txt_cve" size="10" onchange="make_table();" oninput="make_table();" />
<a href="infos.html" id="more_infos_link">More infos ...</a>
</form>
</div>
<div id="adv_table" class="content">
</div>
<script type="text/javascript">
make_table();
</script>
</body>
</html>
|