ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: Revert "AMBARI-21205 Make ToggleKerberos and AddDeleteService experimental features (Duc Le via rzang)"
Date Mon, 09 Oct 2017 18:35:34 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 363018c02 -> 1739777ad


Revert "AMBARI-21205 Make ToggleKerberos and AddDeleteService experimental features (Duc Le
via rzang)"

This reverts commit d4d145a8b385c944293b8aa64d53bf55d4993853.


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

Branch: refs/heads/branch-2.5
Commit: 1739777ad19a8d2e83b955be89c0941d2d0f91eb
Parents: 363018c
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Oct 9 11:35:17 2017 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Oct 9 11:35:17 2017 -0700

----------------------------------------------------------------------
 ambari-web/app/config.js                        |  4 +--
 ambari-web/app/routes/add_service_routes.js     |  2 +-
 ambari-web/app/routes/main.js                   |  2 +-
 .../app/templates/main/admin/kerberos.hbs       | 38 +++++++++-----------
 .../main/service/all_services_actions.hbs       | 14 ++++----
 ambari-web/app/views/main/admin.js              | 14 ++++----
 .../main/admin/stack_upgrade/services_view.js   |  2 +-
 ambari-web/app/views/main/menu.js               | 14 ++++----
 ambari-web/app/views/main/service/item.js       |  2 +-
 .../admin/stack_upgrade/services_view_test.js   |  1 -
 10 files changed, 40 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index f5959f0..451416d 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -89,9 +89,7 @@ App.supports = {
   kerberosStackAdvisor: true,
   logCountVizualization: false,
   enabledWizardForHostOrderedUpgrade: true,
-  manageJournalNode: true,
-  enableToggleKerberos: true,
-  enableAddDeleteServices: true
+  manageJournalNode: true
 };
 
 if (App.enableExperimental) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index ee19bb7..13a1345 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -24,7 +24,7 @@ module.exports = App.WizardRoute.extend({
   route: '/service/add',
 
   enter: function (router) {
-    if (App.isAuthorized('SERVICE.ADD_DELETE_SERVICES') && App.supports.enableAddDeleteServices)
{
+    if (App.isAuthorized('SERVICE.ADD_DELETE_SERVICES')) {
       // `getSecurityStatus` call is required to retrieve information related to kerberos
type: Manual or automated kerberos
       router.get('mainController').isLoading.call(router.get('clusterController'),'isClusterNameLoaded').done(function
() {
         App.router.get('mainAdminKerberosController').getSecurityStatus().always(function
() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 529c289..02b561d 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -403,7 +403,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
     adminKerberos: Em.Route.extend({
       route: '/kerberos',
       enter: function (router, transition) {
-        if (router.get('loggedIn') && (!App.isAuthorized('CLUSTER.TOGGLE_KERBEROS')
|| !App.supports.enableToggleKerberos)) {
+        if (router.get('loggedIn') && !App.isAuthorized('CLUSTER.TOGGLE_KERBEROS'))
{
           router.transitionTo('main.dashboard.index');
         }
       },

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/templates/main/admin/kerberos.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/kerberos.hbs b/ambari-web/app/templates/main/admin/kerberos.hbs
index 4fc97d1..4f35fd5 100644
--- a/ambari-web/app/templates/main/admin/kerberos.hbs
+++ b/ambari-web/app/templates/main/admin/kerberos.hbs
@@ -20,23 +20,21 @@
     <div>
       <p class="text-success">{{t admin.security.enabled}}
         {{#isAuthorized "CLUSTER.TOGGLE_KERBEROS"}}
-          {{#if App.supports.enableToggleKerberos}}
-            <button class="btn btn-padding btn-warning admin-disable-security-btn" {{bindAttr
disabled="isKerberosButtonsDisabled"}} {{action notifySecurityOffPopup target="controller"}}>{{t
admin.kerberos.button.disable}} </button>
-            {{#unless isManualKerberos}}
-              <button class="btn btn-success" id="regenerate-keytabs" {{bindAttr disabled="isKerberosButtonsDisabled"}}
{{action regenerateKeytabs target="controller"}}>
-                <i class="icon-repeat"></i> {{t admin.kerberos.button.regenerateKeytabs}}</button>
-              {{#if App.isCredentialStorePersistent}}
-                <button class="btn btn-primary" {{action showManageKDCCredentialsPopup
target="controller"}}>{{t admin.kerberos.credentials.store.menu.label}}</button>
-              {{/if}}
-            {{/unless}}
-            <br/>
-            {{#unless isEditMode}}
-              <a {{action makeConfigsEditable target="controller"}}
-                      class="pull-right edit-link">
-                {{t common.edit}}
-              </a>
-            {{/unless}}
-          {{/if}}
+          <button class="btn btn-padding btn-warning admin-disable-security-btn" {{bindAttr
disabled="isKerberosButtonsDisabled"}} {{action notifySecurityOffPopup target="controller"}}>{{t
admin.kerberos.button.disable}} </button>
+          {{#unless isManualKerberos}}
+            <button class="btn btn-success" id="regenerate-keytabs" {{bindAttr disabled="isKerberosButtonsDisabled"}}
{{action regenerateKeytabs target="controller"}}>
+              <i class="icon-repeat"></i> {{t admin.kerberos.button.regenerateKeytabs}}</button>
+            {{#if App.isCredentialStorePersistent}}
+              <button class="btn btn-primary" {{action showManageKDCCredentialsPopup target="controller"}}>{{t
admin.kerberos.credentials.store.menu.label}}</button>
+            {{/if}}
+          {{/unless}}
+          <br/>
+          {{#unless isEditMode}}
+            <a {{action makeConfigsEditable target="controller"}}
+                    class="pull-right edit-link">
+              {{t common.edit}}
+            </a>
+          {{/unless}}
         {{/isAuthorized}}
       </p>
     </div>
@@ -54,10 +52,8 @@
     <div>
       <p class="muted background-text">{{t admin.security.disabled}}
       {{#isAuthorized "CLUSTER.TOGGLE_KERBEROS"}}
-        {{#if App.supports.enableToggleKerberos}}
-          <a class="btn btn-padding btn-success admin-enable-security-btn" {{action checkAndStartKerberosWizard
target="controller"}}>{{t admin.kerberos.button.enable}} </a>
-          <br/>
-        {{/if}}
+        <a class="btn btn-padding btn-success admin-enable-security-btn" {{action checkAndStartKerberosWizard
target="controller"}}>{{t admin.kerberos.button.enable}} </a>
+        <br/>
       {{/isAuthorized}}
       </p>
     </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/templates/main/service/all_services_actions.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/all_services_actions.hbs b/ambari-web/app/templates/main/service/all_services_actions.hbs
index 30901a9..0ca1cd5 100644
--- a/ambari-web/app/templates/main/service/all_services_actions.hbs
+++ b/ambari-web/app/templates/main/service/all_services_actions.hbs
@@ -24,14 +24,12 @@
             </a>
             <ul class="pull-left dropdown-menu">
                 {{#isAuthorized "SERVICE.ADD_DELETE_SERVICES"}}
-                    {{#if App.supports.enableAddDeleteServices}}
-                        <li {{bindAttr class="view.serviceController.isAllServicesInstalled:disabled
:add-service-button"}}>
-                            <a href="#"
-                                {{bindAttr class="view.serviceController.isAllServicesInstalled:disabled"}}
-                                {{action gotoAddService target="view.serviceController"}}>
-                                <i class="icon-plus icon-white"></i> {{t services.service.add}}</a>
-                        </li>
-                    {{/if}}
+                    <li {{bindAttr class="view.serviceController.isAllServicesInstalled:disabled
:add-service-button"}}>
+                        <a href="#"
+                            {{bindAttr class="view.serviceController.isAllServicesInstalled:disabled"}}
+                            {{action gotoAddService target="view.serviceController"}}>
+                            <i class="icon-plus icon-white"></i> {{t services.service.add}}</a>
+                    </li>
                 {{/isAuthorized}}
                 {{#isAuthorized "SERVICE.START_STOP"}}
                     <li class="divider"></li>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/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 05d0f56..509f380 100644
--- a/ambari-web/app/views/main/admin.js
+++ b/ambari-web/app/views/main/admin.js
@@ -39,14 +39,12 @@ App.MainAdminView = Em.View.extend({
       });
     }
     if (!App.get('isHadoopWindowsStack') && App.isAuthorized('CLUSTER.TOGGLE_KERBEROS')
|| (App.get('upgradeInProgress') || App.get('upgradeHolding')) ) {
-      if (App.supports.enableToggleKerberos) {
-        items.push({
-          name: 'kerberos',
-          url: 'adminKerberos.index',
-          label: Em.I18n.t('common.kerberos'),
-          disabled: App.get('upgradeInProgress') || App.get('upgradeHolding')
-        });
-      }
+      items.push({
+        name: 'kerberos',
+        url: 'adminKerberos.index',
+        label: Em.I18n.t('common.kerberos'),
+        disabled: App.get('upgradeInProgress') || App.get('upgradeHolding')
+      });
     }
     if ((App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS') && App.isAuthorized('SERVICE.MANAGE_AUTO_START,
CLUSTER.MANAGE_AUTO_START')) || (App.get('upgradeInProgress') || App.get('upgradeHolding')))
{
       if (App.supports.serviceAutoStart) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/views/main/admin/stack_upgrade/services_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/services_view.js b/ambari-web/app/views/main/admin/stack_upgrade/services_view.js
index 25efffe..f566814 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/services_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/services_view.js
@@ -56,7 +56,7 @@ App.MainAdminStackServicesView = Em.View.extend({
    * @param event
    */
   goToAddService: function (event) {
-    if (!App.isAuthorized('SERVICE.ADD_DELETE_SERVICES') || !App.supports.enableAddDeleteServices)
{
+    if (!App.isAuthorized('SERVICE.ADD_DELETE_SERVICES')) {
       return;
     } else if (event.context == "KERBEROS") {
       App.router.get('mainAdminKerberosController').checkAndStartKerberosWizard();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/views/main/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js
index 06bb282..00b1c38 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -121,14 +121,12 @@ App.MainMenuView = Em.CollectionView.extend({
           });
         }
         if (!App.get('isHadoopWindowsStack') && App.isAuthorized('CLUSTER.TOGGLE_KERBEROS')
|| (App.get('upgradeInProgress') || App.get('upgradeHolding'))) {
-          if (App.supports.enableToggleKerberos) {
-            categories.push({
-              name: 'kerberos',
-              url: 'kerberos/',
-              label: Em.I18n.t('common.kerberos'),
-              disabled: App.get('upgradeInProgress') || App.get('upgradeHolding')
-            });
-          }
+          categories.push({
+            name: 'kerberos',
+            url: 'kerberos/',
+            label: Em.I18n.t('common.kerberos'),
+            disabled: App.get('upgradeInProgress') || App.get('upgradeHolding')
+          });
         }
         if ((App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS') && App.isAuthorized('SERVICE.MANAGE_AUTO_START,
CLUSTER.MANAGE_AUTO_START')) || (App.get('upgradeInProgress') || App.get('upgradeHolding')))
{
           if (App.supports.serviceAutoStart) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index e9b1055..09457f2 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -288,7 +288,7 @@ App.MainServiceItemView = Em.View.extend({
       options.push(actionMap.DOWNLOAD_CLIENT_CONFIGS);
     }
 
-    if (App.isAuthorized("SERVICE.ADD_DELETE_SERVICES") && App.supports.enableAddDeleteServices)
{
+    if (App.isAuthorized("SERVICE.ADD_DELETE_SERVICES")) {
       options.push(actionMap.DELETE_SERVICE);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1739777a/ambari-web/test/views/main/admin/stack_upgrade/services_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/services_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/services_view_test.js
index da75cf2..70d182c 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/services_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/services_view_test.js
@@ -34,7 +34,6 @@ describe('App.MainAdminStackServicesView', function () {
       sinon.stub(App.router, 'get').returns(mock);
       sinon.spy(mock, 'checkAndStartKerberosWizard');
       isAccessibleMock = sinon.stub(App, 'isAuthorized');
-      App.set('supports.enableAddDeleteServices', true);
     });
     afterEach(function() {
       App.get('router').transitionTo.restore();


Mime
View raw message