ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [11/16] ambari git commit: AMBARI-14899. UI part of rename Admin Setting API (alexantonenko)
Date Wed, 03 Feb 2016 19:14:25 GMT
AMBARI-14899. UI part of rename Admin Setting API (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/079a5b3b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/079a5b3b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/079a5b3b

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 079a5b3b129eb217cbded5b0cc4859a0a62db86e
Parents: 1d9f1bb
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Feb 3 17:17:33 2016 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Feb 3 18:03:39 2016 +0200

----------------------------------------------------------------------
 .../controllers/loginActivities/LoginMessageMainCtrl.js   | 10 +++++-----
 ambari-web/app/assets/data/settings/motd.json             |  4 ++--
 ambari-web/app/router.js                                  |  2 +-
 ambari-web/app/utils/ajax/ajax.js                         |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/079a5b3b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
index 88c4d27..af78dde 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
@@ -25,11 +25,11 @@ angular.module('ambariAdminConsole')
     $scope.status = false;
     $scope.motdExists = false;
     $scope.text = "";
-    $scope.buttonText = "Ok";
+    $scope.buttonText = "OK";
     $scope.submitDisabled = true;
 
-    $http.get('/api/v1/admin-settings/motd').then(function (res) {
-      var response = JSON.parse(res.data.AdminSettings.content);
+    $http.get('/api/v1/settings/motd').then(function (res) {
+      var response = JSON.parse(res.data.Settings.content);
       $scope.text = response.text ? response.text : "";
       $scope.buttonText = response.button ? response.button : "";
       $scope.status = response.status && response.status == "true" ? true : false;
@@ -53,7 +53,7 @@ angular.module('ambariAdminConsole')
     $scope.saveLoginMsg = function(targetUrl) {
       var method = $scope.motdExists ? 'PUT' : 'POST';
       var data = {
-        'AdminSettings' : {
+        'Settings' : {
           'content' : '{"text":"' + $scope.text + '", "button":"' + $scope.buttonText + '",
"status":"' + $scope.status + '"}',
           'name' : 'motd',
           'setting_type' : 'ambari-server'
@@ -64,7 +64,7 @@ angular.module('ambariAdminConsole')
         $scope.submitDisabled = true;
         return $http({
           method: method,
-          url: '/api/v1/admin-settings/' + ($scope.motdExists ? 'motd' : ''),
+          url: '/api/v1/settings/' + ($scope.motdExists ? 'motd' : ''),
           data: data
         }).then(function successCallback() {
           $scope.motdExists = true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/079a5b3b/ambari-web/app/assets/data/settings/motd.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/settings/motd.json b/ambari-web/app/assets/data/settings/motd.json
index c051a90..64eb411 100644
--- a/ambari-web/app/assets/data/settings/motd.json
+++ b/ambari-web/app/assets/data/settings/motd.json
@@ -1,6 +1,6 @@
 {
-  "href" : "/api/v1/admin-settings/motd",
-  "AdminSettings" : {
+  "href" : "/api/v1/settings/motd",
+  "Settings" : {
     "content" : "{\"text\":\"You are using test mode\", \"button\":\"\", \"status\":\"true\"}",
     "name" : "motd",
     "setting_type" : "ambari-server",

http://git-wip-us.apache.org/repos/asf/ambari/blob/079a5b3b/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 08df9c5..c7cba27 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -363,7 +363,7 @@ App.Router = Em.Router.extend({
    * @param {object} data
    */
   showLoginMessage: function (data){
-    var response = JSON.parse(data.AdminSettings.content),
+    var response = JSON.parse(data.Settings.content),
       text = response.text ? response.text : "",
       buttonText = response.button ? response.button : Em.I18n.t('ok'),
       status = response.status && response.status == "true" ? true : false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/079a5b3b/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 9cd54d2..5ec03d4 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2089,7 +2089,7 @@ var urls = {
     'mock': '/data/clusters/info.json'
   },
   'router.login.message': {
-    'real': '/admin-settings/motd',
+    'real': '/settings/motd',
     'mock': '/data/settings/motd.json'
   },
   'router.logoff': {


Mime
View raw message