KYLIN-2582 'Server Config' should be refreshed automatically in web page 
'System', after we update it successfully.

Signed-off-by: Yang Li <liy...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/42f7e7da
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/42f7e7da
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/42f7e7da

Branch: refs/heads/KYLIN-2624
Commit: 42f7e7dad7f34f9d0849c72f1a20c3e2d4475b99
Parents: 41c7a4d
Author: 10069681 <peng.jian...@zte.com.cn>
Authored: Wed May 3 11:11:02 2017 +0800
Committer: Yang Li <liy...@apache.org>
Committed: Tue May 9 07:06:03 2017 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/admin.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/42f7e7da/webapp/app/js/controllers/admin.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/admin.js 
b/webapp/app/js/controllers/admin.js
index 783ab17..10e2c38 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;

Reply via email to