diff options
-rwxr-xr-x | src/usr/local/www/head.inc | 2 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 30 |
2 files changed, 25 insertions, 7 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index fe8d34c..be0d572 100755 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -188,7 +188,7 @@ function output_menu($arrayitem, $target = null) { $system_menu = array(); $system_menu[] = array(gettext("Logout"), "/index.php?logout"); $system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php"); -$system_menu[] = array(gettext("Firmware"), "/system_firmware.php"); +$system_menu[] = array(gettext("Upgrade"), "/pkg_mgr_install.php?id=firmware"); $system_menu[] = array(gettext("General Setup"), "/system.php"); $system_menu[] = array(gettext("High Avail. Sync"), "/system_hasync.php"); if ($g['platform'] == $g['product_name'] or $g['platform'] == "nanobsd") { diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index b567f2f..23bae87 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -242,6 +242,10 @@ if ($_POST) { } } +if($_GET && $_GET['id'] == "firmware") { + print_array(get_system_pkg_version()); +} + $pgtitle = array(gettext("System"),gettext("Package Manager"), $headline); include("head.inc"); @@ -277,26 +281,24 @@ display_top_tabs($tab_array); break; } ?> - <br /> + <br /> <div class="panel panel-default"> <div class="panel-heading"> - <div class="content"> <?php if ($pkgmode == 'reinstallall') { ?> - <p><?=gettext("All packages will be reinstalled.");?></p> + <?=gettext("All packages will be reinstalled.");?> <?php } else if ($_GET['from'] && $_GET['from']) { ?> - <p>Package: <b><?=$pkgname;?></b> will be upgraded from <b><?=$_GET['from']?></b> to <b><?=$_GET['to']?></b>.</p> + Package: <b><?=$pkgname;?></b> will be upgraded from <b><?=$_GET['from']?></b> to <b><?=$_GET['to']?></b>. <?php } else { ?> - <p>Package: <b><?=$pkgname;?></b> will be <?=$pkgtxt;?>.</p> + Package: <b><?=$pkgname;?></b> will be <?=$pkgtxt;?>. <?php } ?> - </div> </div> <div class="panel-body"> <br /> @@ -345,6 +347,9 @@ if (!empty($_POST['id']) || $_POST['mode'] == "reinstallall"): <div id="final" class="alert" role="alert" style=":display: none;"></div> <?php endif?> </form> + +<div id="clock" style="text-align: center;"></div> +<div id="countdown" style="text-align: center;"></div> <?php ob_flush(); @@ -522,6 +527,16 @@ function scrollToBottom() { $('#output').scrollTop($('#output')[0].scrollHeight); } +function startCountdown(time) { + $('#clock').html('<img src="/321.gif" />'); + + setInterval(function(){ + $('#countdown').html('<h4>Rebooting in ' +time+ ' seconds.</h4>'); + + time-- != 0 || (window.location="/index.php"); + },1000); +} + events.push(function(){ if ("<?=$start_polling?>") { setTimeout(getLogsStatus, 1000); @@ -535,6 +550,9 @@ events.push(function(){ show_success(); setTimeout(scrollToBottom, 200); } + + startCountdown(60); + }); //]]> </script> |