1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 13:37:40 +02:00

Add link to firmware release info

This commit is contained in:
Jan Schneider 2017-05-02 21:53:23 +02:00
parent a060d2150c
commit 1fcb2afff8
2 changed files with 4 additions and 2 deletions

View File

@ -289,6 +289,7 @@ proc ::rmupdate::get_version_from_filename {filename} {
} }
proc ::rmupdate::get_firmware_info {} { proc ::rmupdate::get_firmware_info {} {
variable release_url
set current [get_current_firmware_version] set current [get_current_firmware_version]
set versions [list $current] set versions [list $current]
foreach e [get_available_firmware_downloads] { foreach e [get_available_firmware_downloads] {
@ -318,7 +319,8 @@ proc ::rmupdate::get_firmware_info {} {
catch { set image $images($v) } catch { set image $images($v) }
set url "" set url ""
catch { set url $downloads($v) } catch { set url $downloads($v) }
append json "\{\"version\":\"${v}\",\"installed\":${installed},\"latest\":${latest}\,\"url\":\"${url}\",\"image\":\"${image}\"\}," set info_url "${release_url}/tag/${v}"
append json "\{\"version\":\"${v}\",\"installed\":${installed},\"latest\":${latest}\,\"url\":\"${url}\"\,\"info_url\":\"${info_url}\",\"image\":\"${image}\"\},"
set latest "false" set latest "false"
} }
if {[llength versions] > 0} { if {[llength versions] > 0} {

View File

@ -170,7 +170,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
if (fw.installed) cls = ' class="warning"'; if (fw.installed) cls = ' class="warning"';
if (fw.latest) cls = ' class="positive"'; if (fw.latest) cls = ' class="positive"';
$("#firmware_info tbody").append($('<tr' + cls + '>').append( $("#firmware_info tbody").append($('<tr' + cls + '>').append(
$('<td>').text(fw.version), $('<td>').append($('<a>', {text: fw.version, title: 'Open release info', href: fw.info_url, target: "_blank"})),
$('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+available+'>'),$('<label></label>'))), $('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+available+'>'),$('<label></label>'))),
$('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+downloaded+'>'),$('<label></label>'))), $('<td class="center aligned">').append($('<div class="ui disabled checkbox">').append($('<input type="checkbox" disabled="disabled" '+downloaded+'>'),$('<label></label>'))),
$('<td class="center aligned">').append(bdelete, binstall) $('<td class="center aligned">').append(bdelete, binstall)