Commit b16dec50 authored by Franco Fichtner's avatar Franco Fichtner

firmware: hint to installed version's changelog

parent 71275241
......@@ -473,6 +473,9 @@ class FirmwareController extends ApiControllerBase
$response['changelog'] = $changelogs;
/* allows us to match the version against the specific changelog */
$response['product_version'] = file_get_contents('/usr/local/opnsense/version/opnsense');
return $response;
}
......
......@@ -299,9 +299,15 @@ POSSIBILITY OF SUCH DAMAGE.
$("#updatelist").html("<tr><th>{{ lang._('Version') }}</th>" +
"<th>{{ lang._('Date') }}</th><th></th></tr>");
installed_version = data['product_version'].replace(/[_-].*/, '');
$.each(data['changelog'], function(index, row) {
installed_text = '';
if (installed_version == row['version']) {
installed_text = ' ({{ lang._('installed') }})';
}
$('#updatelist').append(
'<tr><td>' + row['version'] + '</td>' +
'<tr><td>' + row['version'] + installed_text + '</td>' +
'<td>' + row['date'] + '</td>' +
'<td><button class="btn btn-default btn-xs act_changelog" data-version="' + row['version'] + '" ' +
'data-toggle="tooltip" title="View ' + row['version'] + '">' +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment