From ef4efb88ccafbb01fc94ffc1bcca120cb4f3fe6f Mon Sep 17 00:00:00 2001 From: 10069681 Date: Wed, 3 May 2017 11:11:02 +0800 Subject: [PATCH 1/1] KYLIN-2582 'Server Config' should be refreshed automatically in web page 'System', after we update it successfully. --- webapp/app/js/controllers/admin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/app/js/controllers/admin.js b/webapp/app/js/controllers/admin.js index 783ab1794..10e2c380e 100644 --- a/webapp/app/js/controllers/admin.js +++ b/webapp/app/js/controllers/admin.js @@ -71,6 +71,7 @@ KylinApp.controller('AdminCtrl', function ($scope, AdminService, CacheService, T if (isConfirm) { CacheService.reloadConfig({}, function () { SweetAlert.swal('Success!', 'config reload successfully', 'success'); + $scope.getConfig(); }, function (e) { if (e.data && e.data.exception) { var message = e.data.exception; @@ -214,6 +215,7 @@ KylinApp.controller('AdminCtrl', function ($scope, AdminService, CacheService, T $modal.open({ templateUrl: 'updateConfig.html', controller: updateConfigCtrl, + scope: $scope, resolve: {} }); } @@ -256,11 +258,10 @@ KylinApp.controller('AdminCtrl', function ($scope, AdminService, CacheService, T $modalInstance.dismiss('cancel'); }; $scope.update = function () { - - AdminService.updateConfig({}, {key: $scope.state.key, value: $scope.state.value}, function (result) { SweetAlert.swal('Success!', 'Config updated successfully!', 'success'); $modalInstance.dismiss(); + $scope.getConfig(); }, function (e) { if (e.data && e.data.exception) { var message = e.data.exception; -- 2.11.0.windows.1