mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
firmware: hint to installed version's changelog
This commit is contained in:
parent
7127524124
commit
b16dec50be
@ -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'] + '">' +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user