You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/04/12 01:01:08 UTC

svn commit: r1467129 - in /incubator/ambari/trunk: ./ ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/ ambari-web/app/ ambari-web/app/controllers/main/ ambari-web/app/controllers/main/admin/ ambari-web/app/controllers/mai...

Author: jaimin
Date: Thu Apr 11 23:01:07 2013
New Revision: 1467129

URL: http://svn.apache.org/r1467129
Log:
AMBARI-1892. Restrict user on a Disable security popup while the poccess is in progress.

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml
    incubator/ambari/trunk/ambari-web/app/config.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
    incubator/ambari/trunk/ambari-web/app/messages.js
    incubator/ambari/trunk/ambari-web/app/routes/main.js
    incubator/ambari/trunk/ambari-web/app/templates/main/admin/security.hbs
    incubator/ambari/trunk/ambari-web/app/views/main/admin/security.js
    incubator/ambari/trunk/ambari-web/app/views/main/admin/security/disable.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Apr 11 23:01:07 2013
@@ -243,6 +243,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1892. Restrict user on a Disable security popup while the poccessi
+ is in progress. (jaimin)
+
  AMBARI-1879. Show error message when hostname is undefined for quick_links.
  (yusaku)
 

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml (original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml Thu Apr 11 23:01:07 2013
@@ -351,5 +351,15 @@
     not fail gracefully if multi-update is invoked (see ZOOKEEPER-1495).
     </description>
   </property>
-  
+  <property>
+    <name>zookeeper.znode.parent</name>
+    <value></value>
+    <description>Root ZNode for HBase in ZooKeeper. All of HBase's ZooKeeper
+      files that are configured with a relative path will go under this node.
+      By default, all of HBase's ZooKeeper file path are configured with a
+      relative path, so they will all go under this directory unless changed.
+    </description>
+  </property>
+
+
 </configuration>

Modified: incubator/ambari/trunk/ambari-web/app/config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/config.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/config.js Thu Apr 11 23:01:07 2013
@@ -25,6 +25,7 @@ if(location.port == '3333'){
 App.testModeDelayForActions = 10000;
 App.skipBootstrap = false;
 App.alwaysGoToInstaller = false;
+App.testEnableSecurity = true;                          // By default enable security is tested
 App.apiPrefix = '/api/v1';
 App.defaultStackVersion = 'HDP-1.2.1';
 App.defaultLocalStackVersion = 'HDPLocal-1.2.1';

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin.js Thu Apr 11 23:01:07 2013
@@ -20,100 +20,5 @@ var App = require('app');
 
 App.MainAdminController = Em.Controller.extend({
   name: 'mainAdminController',
-  category: 'user',
-  securityEnabled: false,
-  serviceUsers: [],
-
-  deferred: null,
-
-  tag: null,
-
-  /**
-   * return true if security status is loaded and false otherwise
-   */
-  securityStatusLoading: function () {
-    var self = this;
-    this.set('deferred', $.Deferred());
-    if (App.testMode) {
-      window.setTimeout(function () {
-        self.get('deferred').resolve();
-      }, 50);
-    }
-    else {
-      //get Security Status From Server
-      App.ajax.send({
-        name: 'admin.security_status',
-        sender: this,
-        success: 'getSecurityStatusFromServerSuccessCallback',
-        error: 'errorCallback'
-      });
-    }
-    return this.get('deferred').promise();
-  },
-
-  errorCallback: function() {
-    this.get('deferred').reject();
-  },
-
-  getSecurityStatusFromServerSuccessCallback: function (data) {
-    var configs = data.Clusters.desired_configs;
-    if ('global' in configs) {
-      this.set('tag', configs['global'].tag);
-      this.getServiceConfigsFromServer();
-    }
-    else {
-      this.get('deferred').reject();
-    }
-  },
-
-  getServiceConfigsFromServer: function () {
-    App.ajax.send({
-      name: 'admin.service_config',
-      sender: this,
-      data: {
-        siteName: 'global',
-        tagName: this.get('tag')
-      },
-      success: 'getServiceConfigsFromServerSuccessCallback',
-      error: 'errorCallback'
-    });
-  },
-
-  getServiceConfigsFromServerSuccessCallback: function (data) {
-    console.log("TRACE: In success function for the GET getServiceConfigsFromServer call");
-    var configs = data.items.findProperty('tag', this.get('tag')).properties;
-    if (configs && configs['security_enabled'] === 'true') {
-      this.set('securityEnabled', true);
-    }
-    else {
-      this.loadUsers(configs);
-      this.set('securityEnabled', false);
-    }
-    this.get('deferred').resolve();
-  },
-
-  loadUsers: function (configs) {
-    var serviceUsers = this.get('serviceUsers');
-    serviceUsers.pushObject({
-      id: 'puppet var',
-      name: 'hdfs_user',
-      value: configs['hdfs_user'] ? configs['hdfs_user'] : 'hdfs'
-    });
-    serviceUsers.pushObject({
-      id: 'puppet var',
-      name: 'mapred_user',
-      value: configs['mapred_user'] ? configs['mapred_user'] : 'mapred'
-    });
-    serviceUsers.pushObject({
-      id: 'puppet var',
-      name: 'hbase_user',
-      value: configs['hbase_user'] ? configs['hbase_user'] : 'hbase'
-    });
-    serviceUsers.pushObject({
-      id: 'puppet var',
-      name: 'hive_user',
-      value: configs['hive_user'] ? configs['hive_user'] : 'hive'
-    });
-  }
-
+  category: 'user'
 });
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security.js Thu Apr 11 23:01:07 2013
@@ -19,8 +19,11 @@
 var App = require('app');
 App.MainAdminSecurityController = Em.Controller.extend({
   name: 'mainAdminSecurityController',
-  securityEnabledBinding: 'App.router.mainAdminController.securityEnabled',
   isSubmitDisabled: false,
+  securityEnabled: false,
+  dataIsLoaded: false,
+  serviceUsers: [],
+  tag: null,
   getAddSecurityWizardStatus: function () {
     return App.db.getSecurityWizardStatus();
   },
@@ -39,7 +42,6 @@ App.MainAdminSecurityController = Em.Con
         secondary: null,
         onPrimary: function () {
           App.router.transitionTo('disableSecurity');
-          self.set('isSubmitDisabled', true);
           this.hide();
         },
         bodyClass: Ember.View.extend({
@@ -47,8 +49,104 @@ App.MainAdminSecurityController = Em.Con
         })
       });
     }
-  }
+  },
+  //
+  /**
+   * return true if security status is loaded and false otherwise
+   */
+  setSecurityStatus: function () {
+    if (App.testMode) {
+      this.set('securityEnabled', !App.testEnableSecurity);
+      this.set('dataIsLoaded', true);
+    } else {
+      //get Security Status From Server
+      App.ajax.send({
+        name: 'admin.security_status',
+        sender: this,
+        success: 'getSecurityStatusFromServerSuccessCallback',
+        error: 'errorCallback'
+      });
+    }
+  },
+
+  errorCallback: function() {
+    this.set('dataIsLoaded', true);
+    this.showSecurityErrorPopup();
+  },
+
+  getSecurityStatusFromServerSuccessCallback: function (data) {
+    var configs = data.Clusters.desired_configs;
+    if ('global' in configs) {
+      this.set('tag', configs['global'].tag);
+      this.getServiceConfigsFromServer();
+    }
+    else {
+      this.showSecurityErrorPopup();
+    }
+  },
+
+  getServiceConfigsFromServer: function () {
+    App.ajax.send({
+      name: 'admin.service_config',
+      sender: this,
+      data: {
+        siteName: 'global',
+        tagName: this.get('tag')
+      },
+      success: 'getServiceConfigsFromServerSuccessCallback',
+      error: 'errorCallback'
+    });
+  },
+
+  getServiceConfigsFromServerSuccessCallback: function (data) {
+    console.log("TRACE: In success function for the GET getServiceConfigsFromServer call");
+    var configs = data.items.findProperty('tag', this.get('tag')).properties;
+    if (configs && configs['security_enabled'] === 'true') {
+      this.set('securityEnabled', true);
+    }
+    else {
+      this.loadUsers(configs);
+      this.set('securityEnabled', false);
+    }
+    this.set('dataIsLoaded', true);
+  },
 
+  loadUsers: function (configs) {
+    var serviceUsers = this.get('serviceUsers');
+    serviceUsers.pushObject({
+      id: 'puppet var',
+      name: 'hdfs_user',
+      value: configs['hdfs_user'] ? configs['hdfs_user'] : 'hdfs'
+    });
+    serviceUsers.pushObject({
+      id: 'puppet var',
+      name: 'mapred_user',
+      value: configs['mapred_user'] ? configs['mapred_user'] : 'mapred'
+    });
+    serviceUsers.pushObject({
+      id: 'puppet var',
+      name: 'hbase_user',
+      value: configs['hbase_user'] ? configs['hbase_user'] : 'hbase'
+    });
+    serviceUsers.pushObject({
+      id: 'puppet var',
+      name: 'hive_user',
+      value: configs['hive_user'] ? configs['hive_user'] : 'hive'
+    });
+  },
+
+  showSecurityErrorPopup: function () {
+    App.ModalPopup.show({
+      header: Em.I18n.translations['common.error'],
+      secondary: false,
+      onPrimary: function () {
+        this.hide();
+      },
+      bodyClass: Ember.View.extend({
+        template: Ember.Handlebars.compile('<p>{{t admin.security.status.error}}</p>')
+      })
+    });
+  }
 });
 
 

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js Thu Apr 11 23:01:07 2013
@@ -38,7 +38,7 @@ App.MainAdminSecurityAddStep3Controller 
     return this.get('content.services').someProperty('serviceName', 'WEBHCAT');
   }.property('content.services'),
 
-  serviceUsersBinding: 'App.router.mainAdminController.serviceUsers',
+  serviceUsersBinding: 'App.router.mainAdminSecurityController.serviceUsers',
   hasHostPopup: true,
   services: [],
   serviceTimestamp: null,
@@ -329,7 +329,7 @@ App.MainAdminSecurityAddStep3Controller 
     if (!this.get('serviceUsers').length) {
       this.loadUsersFromServer();
     }
-    App.router.get('mainAdminController.serviceUsers').forEach(function (_user) {
+    App.router.get('mainAdminSecurityController.serviceUsers').forEach(function (_user) {
       this.get('globalProperties').pushObject(_user);
     }, this);
   },
@@ -343,7 +343,7 @@ App.MainAdminSecurityAddStep3Controller 
       serviceUsers.pushObject({id: 'puppet var', name: 'hbase_user', value: 'hbase'});
       serviceUsers.pushObject({id: 'puppet var', name: 'hive_user', value: 'hive'});
     } else {
-      App.router.get('mainAdminController').getSecurityStatusFromServer();
+      App.router.get('mainAdminSecurityController').getSecurityStatusFromServer();
     }
   },
 

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js Thu Apr 11 23:01:07 2013
@@ -20,7 +20,8 @@ var App = require('app');
 App.MainAdminSecurityDisableController = Em.Controller.extend({
 
   name: 'mainAdminSecurityDisableController',
-  configMapping: require('data/secure_mapping').slice(0),
+  secureMapping: require('data/secure_mapping'),
+  configMapping: require('data/config_mapping'),
   secureProperties: require('data/secure_properties').configProperties.slice(0),
   stages: [],
   configs: [],
@@ -28,6 +29,10 @@ App.MainAdminSecurityDisableController =
   secureServices: [],
   serviceConfigTags: [],
   globalProperties: [],
+  hasHostPopup: true,
+  services: [],
+  serviceTimestamp: null,
+  isSubmitDisabled: true,
 
   clearStep: function () {
     this.get('stages').clear();
@@ -57,11 +62,16 @@ App.MainAdminSecurityDisableController =
     var nextStage = this.get('stages').findProperty('isStarted', false);
     if (nextStage) {
       nextStage.set('isStarted', true);
-    } else {
-      this.set('isSubmitDisabled', false);
     }
   },
 
+  enableSubmit: function () {
+    if (this.get('stages').someProperty('isError', true) || this.get('stages').everyProperty('isSuccess', true)) {
+      this.set('isSubmitDisabled', false);
+      App.router.get('addSecurityController').setStepsEnable();
+    }
+  }.observes('stages.@each.isCompleted'),
+
   startStage: function () {
     var startedStages = this.get('stages').filterProperty('isStarted', true);
     if (startedStages.length) {
@@ -94,6 +104,26 @@ App.MainAdminSecurityDisableController =
     }
   }.observes('stages.@each.isCompleted'),
 
+  updateServices: function () {
+    this.services.clear();
+    var services = this.get("services");
+    this.get("stages").forEach(function (stages) {
+      var newService = Ember.Object.create({
+        name: stages.label,
+        hosts: []
+      });
+      var hostNames = stages.get("polledData").mapProperty('Tasks.host_name').uniq();
+      hostNames.forEach(function (name) {
+        newService.hosts.push({
+          name: name,
+          publicName: name,
+          logTasks: stages.polledData.filterProperty("Tasks.host_name", name)
+        });
+      });
+      services.push(newService);
+    });
+    this.set('serviceTimestamp', new Date().getTime());
+  }.observes("stages.@each.polledData"),
 
   addInfoToStages: function () {
     this.addInfoToStage2();
@@ -190,7 +220,7 @@ App.MainAdminSecurityDisableController =
     }
   },
 
-  getAllConfigurationsSuccessCallback: function(data) {
+  getAllConfigurationsSuccessCallback: function (data) {
     console.log("TRACE: In success function for the GET getServiceConfigsFromServer call");
     this.get('serviceConfigTags').forEach(function (_tag) {
       _tag.configs = data.items.findProperty('type', _tag.siteName).properties;
@@ -206,7 +236,7 @@ App.MainAdminSecurityDisableController =
   },
 
 
-loadSecureServices: function () {
+  loadSecureServices: function () {
     var secureServices = require('data/secure_configs');
     var installedServices = App.Service.find().mapProperty('serviceName');
     //General (only non service tab) tab is always displayed
@@ -255,14 +285,6 @@ loadSecureServices: function () {
     this.get('stages').findProperty('stage', 'stage3').set('isError', true);
   },
 
-  getAllConfigsFromServer: function () {
-    this.set('noOfWaitingAjaxCalls', this.get('serviceConfigTags').length - 1);
-    this.get('serviceConfigTags').forEach(function (_serviceConfigTags) {
-      if (_serviceConfigTags.serviceName !== 'MAPREDUCE' || _serviceConfigTags.siteName !== 'core-site') {   //skip MapReduce core-site configuration
-        this.getServiceConfigsFromServer(_serviceConfigTags);
-      }
-    }, this);
-  },
 
   removeSecureConfigs: function () {
     this.get('serviceConfigTags').forEach(function (_serviceConfigTags, index) {
@@ -275,7 +297,7 @@ loadSecureServices: function () {
         }, this);
         _serviceConfigTags.configs.security_enabled = false;
       } else {
-        this.get('configMapping').filterProperty('filename', _serviceConfigTags.siteName + '.xml').forEach(function (_config) {
+        this.get('secureMapping').filterProperty('filename', _serviceConfigTags.siteName + '.xml').forEach(function (_config) {
           var configName = _config.name;
           if (configName in _serviceConfigTags.configs) {
             switch (configName) {

Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Thu Apr 11 23:01:07 2013
@@ -566,6 +566,7 @@ Em.I18n.translations = {
   'admin.addSecurity.apply.stage3': '2. Saving Configurations',
   'admin.addSecurity.apply.stage4': '3. Starting Services',
   'admin.addSecurity.apply.stage5': '5. Smoke Test',
+  'admin.removeSecurity.header': 'Disable Security',
   'admin.security.status.error' : 'Error in retrieving cluster security status from Ambari server',
   'admin.users.ldapAuthentionUsed':'LDAP Authentication is being used to authenticate users',
   'admin.users.delete.yourself.message':'You can\'t delete yourself',

Modified: incubator/ambari/trunk/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/main.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/main.js Thu Apr 11 23:01:07 2013
@@ -16,6 +16,8 @@
  * limitations under the License.
  */
 
+var App = require('app');
+
 module.exports = Em.Route.extend({
   route: '/main',
   enter: function (router) {
@@ -595,7 +597,6 @@ module.exports = Em.Route.extend({
     adminSecurity: Em.Route.extend({
       route: '/security',
       enter: function (router) {
-        //alert("1.. I am in enter path");
         router.set('mainAdminController.category', "security");
         var controller = router.get('mainAdminSecurityController');
         if (!(controller.getAddSecurityWizardStatus() === 'RUNNING')) {
@@ -614,23 +615,7 @@ module.exports = Em.Route.extend({
         connectOutlets: function (router, context) {
           var controller = router.get('mainAdminController');
           controller.set('category', "security");
-          controller.connectOutlet('loading');
-          var securityStatus = controller.securityStatusLoading();
-          securityStatus.done(function () {
-            controller.connectOutlet('mainAdminSecurity');
-          });
-          securityStatus.fail(function () {
-            App.ModalPopup.show({
-              header: Em.I18n.translations['common.error'],
-              secondary: false,
-              onPrimary: function () {
-                this.hide();
-              },
-              bodyClass: Ember.View.extend({
-                template: Ember.Handlebars.compile('<p>{{t admin.security.status.error}}</p>')
-              })
-            });
-          });
+          controller.connectOutlet('mainAdminSecurity');
         }
       }),
 
@@ -640,8 +625,43 @@ module.exports = Em.Route.extend({
 
       disableSecurity: Ember.Route.extend({
         route: '/',
-        connectOutlets: function (router, context) {
-          router.get('mainAdminSecurityController').connectOutlet('mainAdminSecurityDisable');
+        enter: function (router) {
+          Ember.run.next(function () {
+            App.router.get('updateController').set('isWorking', false);
+            App.ModalPopup.show({
+              classNames: ['full-width-modal'],
+              header: Em.I18n.t('admin.removeSecurity.header'),
+              bodyClass: App.MainAdminSecurityDisableView.extend({
+                controllerBinding: 'App.router.mainAdminSecurityDisableController'
+              }),
+              primary: Em.I18n.t('form.cancel'),
+              secondary: null,
+              showFooter: false,
+
+              onPrimary: function () {
+                this.hide();
+                App.router.get('updateController').set('isWorking', true);
+              },
+              onClose: function () {
+                if (router.get('mainAdminSecurityDisableController.isSubmitDisabled') === false) {
+                  this.hide();
+                  App.router.get('updateController').set('isWorking', true);
+                  router.transitionTo('adminSecurity.index');
+                }
+              },
+              didInsertElement: function () {
+                this.fitHeight();
+              }
+            });
+          });
+        },
+
+        unroutePath: function () {
+          return false;
+        },
+
+        done: function (router, context) {
+          $(context.currentTarget).parents("#modal").find(".close").trigger('click');
         }
       }),
 
@@ -665,7 +685,7 @@ module.exports = Em.Route.extend({
 
     adminMisc: Em.Route.extend({
       route: '/misc',
-      connectOutlets: function(router) {
+      connectOutlets: function (router) {
         router.set('mainAdminController.category', "misc");
         router.get('mainAdminController').connectOutlet('mainAdminMisc');
       }

Modified: incubator/ambari/trunk/ambari-web/app/templates/main/admin/security.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/admin/security.hbs?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/admin/security.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/admin/security.hbs Thu Apr 11 23:01:07 2013
@@ -15,24 +15,27 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
-
-{{#if securityEnabled}}
-  <div>
-    <p class="text-success">{{t admin.security.enabled}}
-      <a
-              class="btn btn-padding btn-warning" {{bindAttr disabled="isSubmitDisabled"}} {{action notifySecurityOffPopup target="controller"}}>{{t admin.security.button.disable}}
-      </a> <br/>
-    </p>
-  </div>
-  <div>
-    {{outlet}}
-  </div>
+{{#if dataIsLoaded}}
+  {{#if securityEnabled}}
+    <div>
+      <p class="text-success">{{t admin.security.enabled}}
+        <a
+                class="btn btn-padding btn-warning" {{bindAttr disabled="isSubmitDisabled"}} {{action notifySecurityOffPopup target="controller"}}>{{t admin.security.button.disable}}
+        </a> <br/>
+      </p>
+    </div>
+    <div>
+      {{outlet}}
+    </div>
+  {{else}}
+    <div>
+      <p class="text-error">{{t admin.security.disabled}}
+        <a
+                class="btn btn-padding btn-success" {{action addSecurity}}>{{t admin.security.button.enable}}
+        </a> <br/>
+      </p>
+    </div>
+  {{/if}}
 {{else}}
-  <div>
-    <p class="text-error">{{t admin.security.disabled}}
-      <a
-              class="btn btn-padding btn-success" {{action addSecurity}}>{{t admin.security.button.enable}}
-      </a> <br/>
-    </p>
-  </div>
+  <div class="spinner"></div>
 {{/if}}
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-web/app/views/main/admin/security.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/admin/security.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/admin/security.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/admin/security.js Thu Apr 11 23:01:07 2013
@@ -19,6 +19,9 @@
 var App = require('app');
 
 App.MainAdminSecurityView = Em.View.extend({
-  templateName: require('templates/main/admin/security')
+  templateName: require('templates/main/admin/security'),
+  didInsertElement: function() {
+    this.get('controller').setSecurityStatus();
+  }
 
 });
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-web/app/views/main/admin/security/disable.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/admin/security/disable.js?rev=1467129&r1=1467128&r2=1467129&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/admin/security/disable.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/admin/security/disable.js Thu Apr 11 23:01:07 2013
@@ -20,7 +20,7 @@ var App = require('app');
 
 App.MainAdminSecurityDisableView = Em.View.extend({
 
-  templateName: require('templates/main/service/reconfigure'),
+  templateName: require('templates/main/admin/security/disable'),
 
   didInsertElement: function () {
     this.get('controller').loadStep();