yWeb/Y_About_Image: fix check for updates

Origin commit data
------------------
Branch: ni/coolstream
Commit: 801a0788a4
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-03-17 (Fri, 17 Mar 2023)

Origin message was:
------------------
- yWeb/Y_About_Image: fix check for updates

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-03-17 21:20:16 +01:00
parent c8acbe720e
commit 351eb6489e
3 changed files with 15 additions and 16 deletions

View File

@@ -90,11 +90,12 @@ function getBuild(_version)
function get_update_txt()
{
//show_waitbox(true);
loadSyncURL("/control/exec?Y_Tools&get_update_txt");
loadSyncURL("/control/exec?Y_Tools&get_update_txt&{=func:get_revision=}&\"{=func:get_boxname=}\"&{=func:get_chip_type=}&nightly");
window.document.location.href="/Y_About_Image.yhtm?ani=false";
}
jQuery(document).ready(function(){
jQuery(document).ready(function()
{
if ("{=ani=}" == "false")
{
jQuery('#_root_used_graph').css({ width: "{=var-get:_root_used_percent=}%"});
@@ -107,6 +108,8 @@ jQuery(document).ready(function(){
jQuery('#_var_used_graph').delay(750).animate({ width: "{=var-get:_var_used_percent=}%"}, 750);
jQuery('#_mem_used_graph').delay(750).animate({ width: "{=var-get:_mem_used_percent=}%"}, 750);
}
loadSyncURL("/control/exec?Y_Tools&rm_update_txt");
});
</script>
{=include-block:Y_Blocks.txt;head_close=}
@@ -149,7 +152,6 @@ jQuery(document).ready(function(){
</abbr>
{=ini-get:/.version;creator=}<br/>
</td>
<!--
<td valign="top" width="38%">
{=if-file-exists:/tmp/update.txt~
<script>compareVersion("{=ini-get:/.version;version=}", "{=ini-get:/tmp/update.txt;version=}");</script>
@@ -157,9 +159,7 @@ jQuery(document).ready(function(){
<span class="upd_yes">{=L:info.about.image_upd_yes=}</span>
<br/>
<abbr class="version" title="{=L:info.about.actual_image=}">
<script>getVersion("{=ini-get:/tmp/update.txt;version=}");</script>
<br/>
<br/>
<script>getVersion("{=ini-get:/tmp/update.txt;version=}");</script><br/>
<script>getBuild("{=ini-get:/tmp/update.txt;version=}");</script><br/>
</abbr>
<br/>
@@ -167,7 +167,6 @@ jQuery(document).ready(function(){
<input type="button" onclick='get_update_txt();' value="{=L:info.check_for_updates=}" />
=}
</td>
-->
</tr>
<tr>
<td colspan="4">
@@ -269,8 +268,5 @@ jQuery(document).ready(function(){
</table>
</div>
</div>
<script>
loadSyncURL("/control/exec?Y_Tools&rm_update_txt");
</script>
</body>
</html>

View File

@@ -1,3 +1,3 @@
version=3.1.2
date=12.03.2023
version=3.1.3
date=17.03.2023
info=NI-Neutrino-Webinterface

View File

@@ -687,11 +687,14 @@ case "$action" in
;;
get_update_txt)
version="n/a"
#FIXME align url to box specs
wget -O /tmp/release.txt "http://neutrino-images.de/neutrino-images/update.php"
test -e /tmp/release.txt && version=$(cat /tmp/release.txt | grep ".img" | cut -d" " -f2)
revision=$1
boxname=${2// /%20}
chip_type=$3
image_type=$4
wget -O /tmp/${image_type}.txt "https://neutrino-images.de/neutrino-images/update.php?revision=$revision&boxname=$boxname&chip_type=$chip_type&image_type=$image_type"
test -e /tmp/${image_type}.txt && version=$(cat /tmp/${image_type}.txt | cut -d" " -f2)
echo "version=${version// /}" > /tmp/update.txt
rm -f /tmp/release.txt
rm -f /tmp/${image_type}.txt
;;
rm_update_txt)
rm -f /tmp/update.txt