ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject [2/5] git commit: AMBARI-3730. Create user 'Settings' option on user dropdown menu.(xiwang)
Date Mon, 11 Nov 2013 21:57:45 GMT
AMBARI-3730. Create user 'Settings' option on user dropdown menu.(xiwang)


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

Branch: refs/heads/trunk
Commit: e308a772fcfec29219c9a552668b7bc80d5b2c50
Parents: 695a3bc
Author: Xi Wang <xiwang@apache.org>
Authored: Fri Nov 8 15:50:26 2013 -0800
Committer: Xi Wang <xiwang@apache.org>
Committed: Mon Nov 11 13:57:24 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers.js                   |   1 -
 ambari-web/app/controllers/application.js       | 101 +++++++++++++++++++
 .../global/background_operations_controller.js  |   2 +-
 .../app/controllers/main/admin/user_settings.js |  95 -----------------
 ambari-web/app/controllers/main/host/details.js |  14 +--
 ambari-web/app/controllers/main/service.js      |   2 +-
 ambari-web/app/controllers/main/service/item.js |   8 +-
 ambari-web/app/messages.js                      |   6 +-
 ambari-web/app/routes/main.js                   |   7 --
 ambari-web/app/templates/application.hbs        |   1 +
 ambari-web/app/templates/common/settings.hbs    |  26 +++++
 .../app/templates/main/admin/userSettings.hbs   |  29 ------
 ambari-web/app/utils/host_progress_popup.js     |   6 +-
 ambari-web/app/views.js                         |   1 -
 ambari-web/app/views/common/modal_popup.js      |   2 -
 ambari-web/app/views/main/admin.js              |   5 -
 .../app/views/main/admin/user_settings.js       |  34 -------
 17 files changed, 147 insertions(+), 193 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 78a5f45..80bfac9 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -44,7 +44,6 @@ require('controllers/main/admin/rollbackHA/step2_controller');
 require('controllers/main/admin/rollbackHA/step3_controller');
 require('controllers/main/admin/rollbackHA/rollback_wizard_controller');
 require('controllers/main/admin/cluster');
-require('controllers/main/admin/user_settings');
 require('controllers/main/admin/stack_upgrade_controller');
 require('controllers/main/admin/user');
 require('controllers/main/admin/misc_controller');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index 2b1a547..1b41900 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -39,5 +39,106 @@ App.ApplicationController = Em.Controller.extend({
 
   init: function(){
     this._super();
+  },
+
+  loadShowBgChecked: function () {
+    if (App.testMode) {
+      return true;
+    } else {
+      this.getUserPref(this.persistKey());
+      var currentPrefObject = this.get('currentPrefObject');
+      if (currentPrefObject != null) {
+        return currentPrefObject;
+      } else {
+        // post persist
+        this.postUserPref(this.persistKey(), true);
+        return true;
+      }
+    }
+  },
+  persistKey: function () {
+    var loginName = App.router.get('loginName');
+    return 'admin-settings-show-bg-' + loginName;
+  },
+  currentPrefObject: null,
+  /**
+   * get persist value from server with persistKey
+   */
+  getUserPref: function (key) {
+    var self = this;
+    var url = App.apiPrefix + '/persist/' + key;
+    jQuery.ajax(
+      {
+        url: url,
+        context: this,
+        async: false,
+        success: function (response) {
+          if (response) {
+            var value = jQuery.parseJSON(response);
+            console.log('Got persist value from server with key: ' + key + '. Value is: '
+ response);
+            self.set('currentPrefObject', value);
+            return value;
+          }
+        },
+        error: function (xhr) {
+          // this user is first time login
+          if (xhr.status == 404) {
+            console.log('Persist did NOT find the key: '+ key);
+            self.set('currentPrefObject', null);
+            return null;
+          }
+        },
+        statusCode: require('data/statusCodes')
+      }
+    );
+  },
+  /**
+   * post persist key/value to server, value is object
+   */
+  postUserPref: function (key, value) {
+    var url = App.apiPrefix + '/persist/';
+    var keyValuePair = {};
+    keyValuePair[key] = JSON.stringify(value);
+    jQuery.ajax({
+      async: false,
+      context: this,
+      type: "POST",
+      url: url,
+      data: JSON.stringify(keyValuePair),
+      beforeSend: function () {
+        console.log('BeforeSend to persist: persistKeyValues', keyValuePair);
+      }
+    });
+  },
+  showSettingsPopup: function() {
+    var self = this;
+    var initValue = this.loadShowBgChecked();
+    var curValue = null;
+    App.ModalPopup.show({
+      header: Em.I18n.t('common.userSettings'),
+      bodyClass: Em.View.extend({
+        templateName: require('templates/common/settings'),
+        isShowBgChecked: initValue,
+        updateValue: function () {
+          curValue = this.get('isShowBgChecked');
+        }.observes('isShowBgChecked')
+      }),
+      primary: Em.I18n.t('common.save'),
+      onPrimary: function() {
+        if (curValue == null) {
+          curValue = initValue;
+        }
+        var key = self.persistKey();
+        if (!App.testMode) {
+          self.postUserPref(key, curValue);
+        }
+        this.hide();
+      },
+      onSecondary: function() {
+        this.hide();
+      }
+    })
   }
+
+
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers/global/background_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/background_operations_controller.js b/ambari-web/app/controllers/global/background_operations_controller.js
index aad4dbe..78d162a 100644
--- a/ambari-web/app/controllers/global/background_operations_controller.js
+++ b/ambari-web/app/controllers/global/background_operations_controller.js
@@ -226,7 +226,7 @@ App.BackgroundOperationsController = Em.Controller.extend({
     App.updater.immediateRun('requestMostRecent');
 
     if(this.get('popupView') && App.HostPopup.get('isBackgroundOperations')){
-      this.set ('popupView.isNotShowBgChecked', !App.router.get('mainAdminUserSettingsController').loadShowBgChecked());
+      this.set ('popupView.isNotShowBgChecked', !App.router.get('applicationController').loadShowBgChecked());
       this.set('popupView.isOpen', true);
       $(this.get('popupView.element')).appendTo('#wrapper');
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers/main/admin/user_settings.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/user_settings.js b/ambari-web/app/controllers/main/admin/user_settings.js
deleted file mode 100644
index 19b1a21..0000000
--- a/ambari-web/app/controllers/main/admin/user_settings.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminUserSettingsController = Em.Controller.extend({
-  name:'mainAdminUserSettingsController',
-  loadShowBgChecked: function () {
-    if (App.testMode) {
-      return true;
-    } else {
-      this.getUserPref(this.persistKey());
-      var currentPrefObject = this.get('currentPrefObject');
-      if (currentPrefObject != null) {
-        return currentPrefObject;
-      } else {
-        // post persist
-        this.postUserPref(this.persistKey(), true);
-        return true;
-      }
-    }
-  },
-
-  persistKey: function () {
-    var loginName = App.router.get('loginName');
-    return 'admin-settings-show-bg-' + loginName;
-  },
-  currentPrefObject: null,
-
-  /**
-   * get persist value from server with persistKey
-   */
-  getUserPref: function (key) {
-    var self = this;
-    var url = App.apiPrefix + '/persist/' + key;
-    jQuery.ajax(
-      {
-        url: url,
-        context: this,
-        async: false,
-        success: function (response) {
-          if (response) {
-            var value = jQuery.parseJSON(response);
-            console.log('Got persist value from server with key: ' + key + '. Value is: '
+ response);
-            self.set('currentPrefObject', value);
-            return value;
-          }
-        },
-        error: function (xhr) {
-          // this user is first time login
-          if (xhr.status == 404) {
-            console.log('Persist did NOT find the key: '+ key);
-            self.set('currentPrefObject', null);
-            return null;
-          }
-        },
-        statusCode: require('data/statusCodes')
-      }
-    );
-  },
-  /**
-   * post persist key/value to server, value is object
-   */
-  postUserPref: function (key, value) {
-    var url = App.apiPrefix + '/persist/';
-    var keyValuePair = {};
-    keyValuePair[key] = JSON.stringify(value);
-
-    jQuery.ajax({
-      async: false,
-      context: this,
-      type: "POST",
-      url: url,
-      data: JSON.stringify(keyValuePair),
-      beforeSend: function () {
-        console.log('BeforeSend to persist: persistKeyValues', keyValuePair);
-      }
-    });
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index b8d89be..b901653 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -156,7 +156,7 @@ App.MainHostDetailsController = Em.Controller.extend({
       } else {
         App.router.get('clusterController').loadUpdatedStatusDelayed(500);
       }
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     });
@@ -278,7 +278,7 @@ App.MainHostDetailsController = Em.Controller.extend({
               App.router.get('clusterController').loadUpdatedStatusDelayed(500);
             }
 
-            if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+            if (App.router.get('applicationController').loadShowBgChecked()) {
               App.router.get('backgroundOperationsController').showPopup();
             }
 
@@ -356,7 +356,7 @@ App.MainHostDetailsController = Em.Controller.extend({
         App.router.get('clusterController').loadUpdatedStatusDelayed(500);
       }
 
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     });
@@ -471,7 +471,7 @@ App.MainHostDetailsController = Em.Controller.extend({
               App.router.get('clusterController').loadUpdatedStatusDelayed(500);
             }
 
-            if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked() &&
showPopup) {
+            if (App.router.get('applicationController').loadShowBgChecked() && showPopup)
{
               App.router.get('backgroundOperationsController').showPopup();
             }
           });
@@ -527,7 +527,7 @@ App.MainHostDetailsController = Em.Controller.extend({
               App.router.get('clusterController').loadUpdatedStatusDelayed(500);
             }
 
-            if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+            if (App.router.get('applicationController').loadShowBgChecked()) {
               App.router.get('backgroundOperationsController').showPopup();
             }
 
@@ -557,7 +557,7 @@ App.MainHostDetailsController = Em.Controller.extend({
         }
         self.doDatanodeDecommission(decommissionHostNames, true);
       }
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     });
@@ -662,7 +662,7 @@ App.MainHostDetailsController = Em.Controller.extend({
         decommissionHostNames.splice(index, 1);
         self.doDatanodeDecommission(decommissionHostNames, false);
       }
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers/main/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service.js b/ambari-web/app/controllers/main/service.js
index 979e4fb..b5674b6 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -109,7 +109,7 @@ App.MainServiceController = Em.ArrayController.extend({
     var requestId = data.Requests.id;
     console.log('requestId is: ' + requestId);
 
-    if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+    if (App.router.get('applicationController').loadShowBgChecked()) {
       App.router.get('backgroundOperationsController').showPopup();
     }
   },

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 8910f65..c24c4f9 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -76,7 +76,7 @@ App.MainServiceItemController = Em.Controller.extend({
     else {
       App.router.get('clusterController').loadUpdatedStatusDelayed(500);// @todo check working
without param 500
     }
-    if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+    if (App.router.get('applicationController').loadShowBgChecked()) {
       App.router.get('backgroundOperationsController').showPopup();
     }
   },
@@ -142,7 +142,7 @@ App.MainServiceItemController = Em.Controller.extend({
     var self = this;
     App.showConfirmationPopup(function() {
       self.content.set('runRebalancer', true);
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     });
@@ -156,7 +156,7 @@ App.MainServiceItemController = Em.Controller.extend({
     var self = this;
     App.showConfirmationPopup(function() {
       self.content.set('runCompaction', true);
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     });
@@ -192,7 +192,7 @@ App.MainServiceItemController = Em.Controller.extend({
 
   runSmokeTestSuccessCallBack: function(data) {
     if (data.Requests.id) {
-      if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) {
+      if (App.router.get('applicationController').loadShowBgChecked()) {
         App.router.get('backgroundOperationsController').showPopup();
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index ad4db57..56bb4df 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -25,6 +25,9 @@ Em.I18n.translations = {
 
   'app.loadingPlaceholder': 'Loading...',
   'app.signout':'Sign out',
+  'app.settings':'Settings',
+  'app.settings.showBgOperations': 'Show background operations dialog when an operation is
started',
+  'app.settings.notShowBgOperations': 'Do not show this dialog again when starting a background
operation',
 
   'apply':'apply',
   'and':'and',
@@ -882,9 +885,6 @@ Em.I18n.translations = {
   'admin.cluster.repositories.os':'OS',
   'admin.cluster.repositories.baseUrl':'Base URL',
 
-  'admin.userSettings.header': 'Customize User Settings',
-  'admin.userSettings.showBgOperations': 'Show background operations dialog when an operation
is started',
-  'admin.userSettings.notShowBgOperations': 'Do not show this dialog again when starting
a background operation',
   'admin.misc.header': 'Service Users and Groups',
   'admin.misc.nothingToShow': 'No user accounts to display',
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index c12e06d..4239052 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -793,13 +793,6 @@ module.exports = Em.Route.extend({
         router.get('mainAdminController').connectOutlet('mainAdminAdvanced');
       }
     }),
-    adminUserSettings: Em.Route.extend({
-      route: '/userSettings',
-      connectOutlets: function (router) {
-        router.set('mainAdminController.category', "userSettings");
-        router.get('mainAdminController').connectOutlet('mainAdminUserSettings');
-      }
-    }),
     adminMisc: Em.Route.extend({
       route: '/misc',
       connectOutlets: function (router) {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index 3bf3104..0f5611e 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -46,6 +46,7 @@
               </button>
               <ul class="dropdown-menu">
                 <li><a href="" {{action logoff}}>{{t app.signout}}</a></li>
+                <li><a href="" {{action showSettingsPopup target="controller"}}>{{t
app.settings}}</a></li>
               </ul>
             </div>
           {{/if}}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/templates/common/settings.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/settings.hbs b/ambari-web/app/templates/common/settings.hbs
new file mode 100644
index 0000000..5f6fcb9
--- /dev/null
+++ b/ambari-web/app/templates/common/settings.hbs
@@ -0,0 +1,26 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+<div class="admin-user-settings">
+  <div>
+    <label>
+      {{view Ember.Checkbox checkedBinding="view.isShowBgChecked" class="checkbox"}}
+      {{t app.settings.showBgOperations}}
+    </label>
+  </div>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/templates/main/admin/userSettings.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/userSettings.hbs b/ambari-web/app/templates/main/admin/userSettings.hbs
deleted file mode 100644
index 9d87b9b..0000000
--- a/ambari-web/app/templates/main/admin/userSettings.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<div class="admin-user-settings">
-  <div class="header">
-    <strong>{{t admin.userSettings.header}}</strong>
-  </div>
-  <div>
-    <label>
-      {{view Ember.Checkbox checkedBinding="view.isShowBgChecked" classNames="checkbox"}}
-      {{t admin.userSettings.showBgOperations}}
-    </label>
-  </div>
-</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/utils/host_progress_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js
index 65eb4db..bcd0043 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -473,7 +473,7 @@ App.HostPopup = Em.Object.create({
       isOpen: false,
       didInsertElement: function(){
         this.set('isOpen', true);
-        this.set ('isNotShowBgChecked', !App.router.get('mainAdminUserSettingsController').loadShowBgChecked());
+        this.set ('isNotShowBgChecked', !App.router.get('applicationController').loadShowBgChecked());
       },
       headerClass: Ember.View.extend({
         controller: this,
@@ -485,9 +485,9 @@ App.HostPopup = Em.Object.create({
       isNotShowBgChecked : null,
       updateNotShowBgChecked: function () {
         var curVal = !this.get('isNotShowBgChecked');
-        var key = App.router.get('mainAdminUserSettingsController').persistKey();
+        var key = App.router.get('applicationController').persistKey();
         if (!App.testMode) {
-          App.router.get('mainAdminUserSettingsController').postUserPref(key, curVal);
+          App.router.get('applicationController').postUserPref(key, curVal);
         }
       }.observes('isNotShowBgChecked'),
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 16be05b..c7980cb 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -72,7 +72,6 @@ require('views/main/admin/rollbackHA/step3_view');
 require('views/main/admin/rollbackHA/rollback_wizard_view');
 require('views/main/admin/cluster');
 require('views/main/admin/misc_view');
-require('views/main/admin/user_settings');
 require('views/main/admin/stack_upgrade');
 require('views/main/admin/advanced');
 require('views/main/admin/advanced/password');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/views/common/modal_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popup.js b/ambari-web/app/views/common/modal_popup.js
index de1bc27..f20d01b 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -21,9 +21,7 @@ var App = require('app');
 App.ModalPopup = Ember.View.extend({
 
   viewName: 'modalPopup',
-
   templateName: require('templates/common/modal_popup'),
-
   header: '&nbsp;',
   body: '&nbsp;',
   encodeBody: true,

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/views/main/admin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin.js b/ambari-web/app/views/main/admin.js
index 33479a5..0d6ec6c 100644
--- a/ambari-web/app/views/main/admin.js
+++ b/ambari-web/app/views/main/admin.js
@@ -47,11 +47,6 @@ App.MainAdminView = Em.View.extend({
       label: Em.I18n.t('common.cluster')
     });
     items.push({
-      name: 'userSettings',
-      url: 'adminUserSettings',
-      label: Em.I18n.t('common.userSettings')
-    });
-    items.push({
       name: 'misc',
       url: 'adminMisc',
       label: Em.I18n.t('common.misc')

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e308a772/ambari-web/app/views/main/admin/user_settings.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/user_settings.js b/ambari-web/app/views/main/admin/user_settings.js
deleted file mode 100644
index a4852b2..0000000
--- a/ambari-web/app/views/main/admin/user_settings.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainAdminUserSettingsView = Em.View.extend({
-  templateName: require('templates/main/admin/userSettings'),
-  didInsertElement: function() {
-    this.set ('isShowBgChecked', this.get('controller').loadShowBgChecked());
-  },
-  isShowBgChecked: null,
-  updateShowBgchecked: function () {
-    var curVal = this.get('isShowBgChecked');
-    var key = this.get('controller').persistKey();
-    if (!App.testMode) {
-      this.get('controller').postUserPref(key, curVal);
-    }
-  }.observes('isShowBgChecked')
-});
\ No newline at end of file


Mime
View raw message