From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Mon, 4 May 2026 14:45:03 +0000 (+0300) Subject: Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:45:03 04.05.2026. X-Git-Url: https://git.vados.ru/gitweb.cgi?a=commitdiff_plain;h=0878acaae069c08ac30022f9b6a693086f3d544b;p=Mikrotiks%2Fros.vados.ru.git Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:45:03 04.05.2026. --- diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index e92f73555..cad809517 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/577/ab2aad07"; +:global CommitId "main/578/c7ab46ac"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:35:03 04.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:45:03 04.05.2026."; # The variables are received right here. :global GlobalConfVersion 140; @@ -85,8 +85,6 @@ :global RandomDelay; :global GetRandomNumber; :global EscapeForRegEx; -:global ExitError; -:global ExitOnError; :global CharacterMultiply; :global CharacterReplace; :global CleanFilePath; @@ -134,48 +132,47 @@ :global GlobalConfMigration; :global VersionToNum; :global RequiredRouterOS; - +:global ExitError; +:global ExitOnError; +:global FetchLargeFiles; +:global FetchHuge; :global FetchUserAgentStr; :global CertificateAvailable; :global CertificateDownload; :global CertificateNameByCN; :global CharacterMultiply; -:global FetchLargeFiles; + :global InspectVar; :global InspectVarRet; :global ParseCustom; :set IsCheckUpdates do={ :local isInfo [:tobool $1]; - :global LogPrint; :global updateChannel; :global PkgUpdStatus; :global currentUpdateChannel; :global ROsVerAvail; :global arrDeviceInfo; - $LogPrint debug $0 ("\$isInfo = " . $isInfo); + :log info ($0 . " \$isInfo = " . $isInfo); :local CurrentChannel [ /system/package/update/get channel ]; :if ([ :len $updateChannel ] > 0 && $CurrentChannel != $updateChannel) do={ :retry command={/system/package/update set channel=$updateChannel} delay=300ms max=5 on-error={}; - $LogPrint debug $0 ("Set updates channel to: $updateChannel"); + :log info ($0 . " Set updates channel to: $updateChannel"); } - :local Update [ /system/package/update/get ]; :local Channel [ :tostr ($Update->"channel") ]; :set currentUpdateChannel $Channel; - $LogPrint debug $0 ("Update Channel: " . $Channel . "."); - - + :log info ($0 . " Update Channel: " . $Channel . "."); :local StatusPkg "undefined"; - $LogPrint debug $0 ("Checking for updates..."); + :log info ($0 . " Checking for updates..."); :retry command={:set $StatusPkg ([/system/package/update/check-for-updates without-paging as-value]->"status")} \ delay=300ms max=5 on-error={}; - $LogPrint debug $0 ("\$StatusPkg = " . $StatusPkg); + :log info ($0 . " \$StatusPkg = " . $StatusPkg); :if ($StatusPkg = "New version is available") do={ :set PkgUpdStatus true; } else={ :set PkgUpdStatus false; } :set ROsVerAvail [ :tostr [ /system/package/update/get latest-version ] ]; - $LogPrint debug $0 ("\$PkgUpdStatus = " . $PkgUpdStatus); + :log info ($0 . " \$PkgUpdStatus = " . $PkgUpdStatus); :if ($isInfo != false || $PkgUpdStatus = true) do={ - $LogPrint debug $0 ("\$PkgUpdStatus = " . $PkgUpdStatus); + :log info ($0 . " \$PkgUpdStatus = " . $PkgUpdStatus); :if ([ :typeof $arrDeviceInfo ] != "array") do={ :set arrDeviceInfo [:toarray $arrDeviceInfo]; } @@ -192,22 +189,18 @@ :global currentUpdateChannel; :global ROsVerAvail; :global arrDeviceInfo; - :local Status ""; :local Update; :local WaitCount 0; - :if ([ $IsCheckUpdates true ] = false) do={ :return false; } - :set Status [ :tostr [ /system/package/update/get status ] ]; :while (($Status = "" || $Status = "finding out latest version...") && $WaitCount < 60) do={ :delay 1s; :set WaitCount ($WaitCount + 1); :set Status [ :tostr [ /system/package/update/get status ] ]; } - :set Update [ /system/package/update/get ]; :set currentUpdateChannel [ :tostr ($Update->"channel") ]; :set ROsVerAvail [ :tostr ($Update->"latest-version") ]; @@ -220,7 +213,6 @@ :set arrDeviceInfo [:toarray $arrDeviceInfo]; } :set ($arrDeviceInfo->"devUpdates") $Update; - :if ($Status = "" || $Status = "finding out latest version...") do={ :return false; } @@ -237,7 +229,6 @@ :set GetArrDeviceInfo do={ :global LogPrint; :global arrDeviceInfo; - :global devBoardName; :global devModel; :global devRunning;