mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 08:16:09 +02:00
Version management: fix upgrade polling, branch dropdown, log visibility
- Fix ReferenceError: use $timeout instead of timeout, store timer for cancel - Add v2.5.5-dev to Select Branch dropdown (remove dev filter) - Limit branch list to latest 10 by version - Fix Upgrade Progress Log text visibility (light text on dark bg)
This commit is contained in:
@@ -579,6 +579,7 @@ app.controller('versionManagment', function ($scope, $http, $timeout) {
|
||||
$scope.updateFinish = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
var upgradeStatusTimer = null;
|
||||
|
||||
$scope.upgrade = function () {
|
||||
|
||||
@@ -660,7 +661,8 @@ app.controller('versionManagment', function ($scope, $http, $timeout) {
|
||||
if (response.data.upgradeStatus === 1) {
|
||||
|
||||
if (response.data.finished === 1) {
|
||||
$timeout.cancel();
|
||||
if (upgradeStatusTimer) $timeout.cancel(upgradeStatusTimer);
|
||||
upgradeStatusTimer = null;
|
||||
$scope.upgradelogBox = false;
|
||||
$scope.upgradeLog = response.data.upgradeLog;
|
||||
$scope.upgradeLoading = true;
|
||||
@@ -672,7 +674,7 @@ app.controller('versionManagment', function ($scope, $http, $timeout) {
|
||||
} else {
|
||||
$scope.upgradelogBox = false;
|
||||
$scope.upgradeLog = response.data.upgradeLog;
|
||||
timeout(getUpgradeStatus, 2000);
|
||||
upgradeStatusTimer = $timeout(getUpgradeStatus, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user