You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2017/10/19 20:10:24 UTC

[01/12] ambari git commit: AMBARI-22263. Disable Actions menu while Wizard in progress instead of hide (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-20859 06676d66e -> d57ebbc2d


AMBARI-22263. Disable Actions menu while Wizard in progress instead of hide (alexantonenko)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 84342f6a851daa12ef612a96e0076ea893fd12f2
Parents: ee509e0
Author: Alex Antonenko <aa...@hortonworks.com>
Authored: Wed Oct 18 18:26:08 2017 +0300
Committer: Alex Antonenko <aa...@hortonworks.com>
Committed: Wed Oct 18 18:26:08 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/app.js                           |  24 ++-
 .../models/configs/service_config_version.js    |   9 +-
 ambari-web/app/models/host_stack_version.js     |   4 +-
 .../common/configs/config_history_flow.hbs      |   8 +-
 .../common/configs/service_version_box.hbs      |   8 +-
 .../templates/common/host_progress_popup.hbs    |   6 +-
 .../modal_popups/widget_browser_popup.hbs       |   6 +-
 ambari-web/app/templates/experimental.hbs       |   6 +-
 .../main/admin/stack_upgrade/versions.hbs       |   6 +-
 ambari-web/app/templates/main/host.hbs          |   4 +-
 .../templates/main/host/bulk_operation_menu.hbs |   4 +-
 .../main/host/details/host_component.hbs        | 176 ++++++++++---------
 .../app/templates/main/host/stack_versions.hbs  |   4 +-
 ambari-web/app/templates/main/host/summary.hbs  | 120 +++++++------
 ambari-web/app/utils/helper.js                  |  23 +++
 ambari-web/app/views/main/service/item.js       |   2 +-
 ambari-web/test/views/main/service/item_test.js |   6 +-
 17 files changed, 224 insertions(+), 192 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 2c638e4..6432849 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -131,27 +131,18 @@ module.exports = Em.Application.create({
   }.property('upgradeIsRunning', 'upgradeAborted', 'router.wizardWatcherController.isNonWizardUser', 'upgradeSuspended'),
 
   /**
-   * Options:
-   *  - ignoreWizard: ignore when some wizard is running by another user (default `false`)
-   *
    * @param {string} authRoles
-   * @param {object} options
    * @returns {boolean}
    */
-  isAuthorized: function (authRoles, options) {
-    options = $.extend({ignoreWizard: false}, options);
+  havePermissions: function (authRoles) {
     var result = false;
     authRoles = $.map(authRoles.split(","), $.trim);
 
     // When Upgrade running(not suspended) only operations related to upgrade should be allowed
     if ((!this.get('upgradeSuspended') && !authRoles.contains('CLUSTER.UPGRADE_DOWNGRADE_STACK')) &&
-        !App.get('supports.opsDuringRollingUpgrade') &&
-        !['NOT_REQUIRED', 'COMPLETED'].contains(this.get('upgradeState')) ||
-        !App.auth){
-      return false;
-    }
-
-    if (!options.ignoreWizard && App.router.get('wizardWatcherController.isNonWizardUser')) {
+      !App.get('supports.opsDuringRollingUpgrade') &&
+      !['NOT_REQUIRED', 'COMPLETED'].contains(this.get('upgradeState')) ||
+      !App.auth){
       return false;
     }
 
@@ -161,6 +152,13 @@ module.exports = Em.Application.create({
 
     return result;
   },
+  /**
+   * @param {string} authRoles
+   * @returns {boolean}
+   */
+  isAuthorized: function (authRoles) {
+    return this.havePermissions(authRoles) && !App.router.get('wizardWatcherController.isNonWizardUser');
+  },
 
   isStackServicesLoaded: false,
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/models/configs/service_config_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/service_config_version.js b/ambari-web/app/models/configs/service_config_version.js
index 4120681..7645377 100644
--- a/ambari-web/app/models/configs/service_config_version.js
+++ b/ambari-web/app/models/configs/service_config_version.js
@@ -141,12 +141,13 @@ App.ServiceConfigVersion = DS.Model.extend({
    * {{view: (string|boolean), compare: (string|boolean), revert: (string|boolean)}} disabledActionAttr
    */
   disabledActionAttr: function () {
+    var isNonWizardUser = App.router.get('wizardWatcherController.isNonWizardUser');
     return {
-      view: (this.get('isDisplayed')) ? 'disabled' : false,
-      compare: (this.get('isDisabled') || this.get('isDisplayed')) ? 'disabled' : false,
-      revert: (this.get('isDisabled') || this.get('isCurrent')) ? 'disabled' : false
+      view: (this.get('isDisplayed') || isNonWizardUser) ? 'disabled' : false,
+      compare: (this.get('isDisabled') || isNonWizardUser || this.get('isDisplayed')) ? 'disabled' : false,
+      revert: (this.get('isDisabled') || isNonWizardUser || this.get('isCurrent')) ? 'disabled' : false
     }
-  }.property('isDisplayed', 'isCurrent', 'isDisabled')
+  }.property('isDisplayed', 'isCurrent', 'isDisabled', 'App.router.wizardWatcherController.isNonWizardUser')
 });
 
 App.ServiceConfigVersion.FIXTURES = [];

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/models/host_stack_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_stack_version.js b/ambari-web/app/models/host_stack_version.js
index 7e6d0a0..15e62f4 100644
--- a/ambari-web/app/models/host_stack_version.js
+++ b/ambari-web/app/models/host_stack_version.js
@@ -61,7 +61,9 @@ App.HostStackVersion = DS.Model.extend({
    */
   installEnabled: Em.computed.existsIn('status', ['OUT_OF_SYNC', 'INSTALL_FAILED']),
 
-  installDisabled: Em.computed.not('installEnabled')
+  installDisabled: function(){
+    return !this.get('installEnabled') || App.router.get('wizardWatcherController.isNonWizardUser');
+  }.property('installEnabled', 'App.routerwizardWatcherController.isNonWizardUser')
 });
 
 App.HostStackVersion.FIXTURES = [];

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/common/configs/config_history_flow.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index f063406..99cd140 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -70,12 +70,12 @@
         </div>
         <div class="version-operations-buttons">
           <button {{bindAttr disabled="view.parentView.hoveredServiceVersion.disabledActionAttr.view" class=":btn :btn-default view.parentView.hoveredServiceVersion.isDisplayed:not-allowed-cursor" title="view.parentView.hoveredServiceVersion.disabledActionMessages.view"}} {{action doAction undefined view.parentView.actionTypes.SWITCH target="view.parentView"}}><i class="glyphicon glyphicon-search"></i>&nbsp;{{t common.view}}</button>
-          {{#isAuthorized "SERVICE.COMPARE_CONFIGS"}}
+          {{#havePermissions "SERVICE.COMPARE_CONFIGS"}}
             <button {{bindAttr disabled="view.parentView.hoveredServiceVersion.disabledActionAttr.compare" class=":btn :btn-default view.parentView.hoveredServiceVersion.isDisplayed:not-allowed-cursor" title="view.parentView.hoveredServiceVersion.disabledActionMessages.compare"}} {{action doAction undefined view.parentView.actionTypes.COMPARE target="view.parentView"}}><i class="glyphicon glyphicon-copy"></i>&nbsp;{{t common.compare}}</button>
-          {{/isAuthorized}}
-          {{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}
+          {{/havePermissions}}
+          {{#havePermissions "SERVICE.MODIFY_CONFIGS"}}
             <button {{bindAttr disabled="view.parentView.hoveredServiceVersion.disabledActionAttr.revert" class=":btn :btn-default view.parentView.hoveredServiceVersion.isCurrent:not-allowed-cursor view.parentView.hoveredServiceVersion.isCompatible::hidden" title="view.parentView.hoveredServiceVersion.disabledActionMessages.revert"}} {{action doAction undefined view.parentView.actionTypes.REVERT target="view.parentView"}}>{{t dashboard.configHistory.info-bar.revert.button}}</button>
-          {{/isAuthorized}}
+          {{/havePermissions}}
         </div>
       {{/if}}
     {{/view}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/common/configs/service_version_box.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_version_box.hbs b/ambari-web/app/templates/common/configs/service_version_box.hbs
index aaa4520..738b83d 100644
--- a/ambari-web/app/templates/common/configs/service_version_box.hbs
+++ b/ambari-web/app/templates/common/configs/service_version_box.hbs
@@ -46,16 +46,16 @@
         <button {{bindAttr disabled="view.disabledActionAttr.view" class=":btn :btn-default view.serviceVersion.isDisplayed:not-allowed-cursor" title="view.disabledActionMessages.view"}} {{action doAction view.serviceVersion view.actionTypes.SWITCH target="view.parentView"}}>
           <i class="glyphicon glyphicon-search"></i>&nbsp;{{t common.view}}
         </button>
-        {{#isAuthorized "SERVICE.COMPARE_CONFIGS"}}
+        {{#havePermissions "SERVICE.COMPARE_CONFIGS"}}
           <button {{bindAttr disabled="view.disabledActionAttr.compare" class=":btn :btn-default view.serviceVersion.isDisplayed:not-allowed-cursor" title="view.disabledActionMessages.compare"}} {{action doAction view.serviceVersion view.actionTypes.COMPARE target="view.parentView"}}>
             <i class="glyphicon glyphicon-copy"></i>&nbsp;{{t common.compare}}
           </button>
-        {{/isAuthorized}}
-        {{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}
+        {{/havePermissions}}
+        {{#havePermissions "SERVICE.MODIFY_CONFIGS"}}
           <button {{bindAttr disabled="view.disabledActionAttr.revert" class=":btn :btn-default view.serviceVersion.isCurrent:not-allowed-cursor view.serviceVersion.isCompatible::hidden" title="view.disabledActionMessages.revert"}} {{action doAction view.serviceVersion view.actionTypes.REVERT target="view.parentView"}}>
             {{t dashboard.configHistory.info-bar.revert.button}}
           </button>
-        {{/isAuthorized}}
+        {{/havePermissions}}
       </div>
     </div>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/common/host_progress_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/host_progress_popup.hbs b/ambari-web/app/templates/common/host_progress_popup.hbs
index f5b1c73..31358e4 100644
--- a/ambari-web/app/templates/common/host_progress_popup.hbs
+++ b/ambari-web/app/templates/common/host_progress_popup.hbs
@@ -256,11 +256,11 @@
           <div class="col-sm-12">
             {{#if App.supports.logSearch}}
               {{#if view.isLogSearchInstalled}}
-                {{#isAuthorized "SERVICE.VIEW_OPERATIONAL_LOGS"}}
-                  <button type="button" class="btn btn-link pull-right" {{action navigateToHostLogs target="view"}} {{bindAttr class="view.isLogsLinkVisible::hidden"}}>
+                {{#havePermissions "SERVICE.VIEW_OPERATIONAL_LOGS"}}
+                  <button type="button" class="btn btn-link pull-right" {{action navigateToHostLogs target="view"}} {{bindAttr class="view.isLogsLinkVisible::hidden" disabled="App.router.wizardWatcherController.isNonWizardUser"}}>
                     <i class="glyphicon glyphicon-file"></i>&nbsp;{{t common.host}} {{t common.logs}}
                   </button>
-                {{/isAuthorized}}
+                {{/havePermissions}}
               {{/if}}
             {{/if}}
             <button type="button" class="btn btn-link pull-right" {{translateAttr title="common.openNewWindow"}} {{action openTaskLogInDialog}}>

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs b/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
index 2cc40c2..9910d07 100644
--- a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
@@ -26,13 +26,13 @@
           <li {{bindAttr class="service.isActive:active"}}>
             <a {{action "filterByService" service.value target="view"}}>{{service.label}}</a></li>
         {{/each}}
-        {{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}
+        {{#havePermissions "SERVICE.MODIFY_CONFIGS"}}
           <li class="pull-right">
-            <button type="button" class="btn btn-primary" {{action "createWidget" target="view"}} >
+            <button type="button" class="btn btn-primary" {{bindAttr disabled="App.router.wizardWatcherController.isNonWizardUser"}} {{action "createWidget" target="view"}} >
               <i class="glyphicon glyphicon-plus"></i> &nbsp; {{t dashboard.widgets.create}}
             </button>
           </li>
-        {{/isAuthorized}}
+        {{/havePermissions}}
       </ul>
 
       <!--Widgets table two column-->

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/experimental.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/experimental.hbs b/ambari-web/app/templates/experimental.hbs
index c3d9eba..80d9e3d 100644
--- a/ambari-web/app/templates/experimental.hbs
+++ b/ambari-web/app/templates/experimental.hbs
@@ -56,14 +56,14 @@
   </div>
     <hr>
     <div class="control-group" style="margin-bottom: 100px;">
-      {{#isAuthorized "CLUSTER.MANAGE_USER_PERSISTED_DATA"}}
+      {{#havePermissions "CLUSTER.MANAGE_USER_PERSISTED_DATA"}}
         <div class="pull-left" style="margin-bottom: 100px;">
-          <button class="btn btn-danger" {{action doResetUIStates target="controller"}}>{{t reset.ui.states}}</button>
+          <button class="btn btn-danger" {{bindAttr disabled="App.router.wizardWatcherController.isNonWizardUser"}} {{action doResetUIStates target="controller"}}>{{t reset.ui.states}}</button>
           <p class="pull-right" style="margin-left: 10px; padding-top: 5px;">
               Reset UI state locally and on the server
           </p>
         </div>
-      {{/isAuthorized}}
+      {{/havePermissions}}
     </div>
   {{else}}
     <div class="alert alert-danger">

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
index edcb37c..47f9a2d 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
@@ -17,11 +17,11 @@
 }}
 
 <div id="versions-filter-section" class="btn-toolbar">
-  {{#isAuthorized "AMBARI.MANAGE_STACK_VERSIONS"}}
-    <button class="btn btn-primary" {{action goToVersions target="view"}} id="manage-versions-link">
+  {{#havePermissions "AMBARI.MANAGE_STACK_VERSIONS"}}
+    <button class="btn btn-primary" {{action goToVersions target="view"}}  {{bindAttr disabled="App.router.wizardWatcherController.isNonWizardUser"}} id="manage-versions-link">
         <i class="icon-external-link"></i>&nbsp;{{t admin.stackVersions.manageVersions}}
     </button>
-  {{/isAuthorized}}
+  {{/havePermissions}}
   <div class="btn-group display-inline-block">
     <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
       <span class="filters-label">{{t common.filter}}: </span>

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/main/host.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host.hbs b/ambari-web/app/templates/main/host.hbs
index b373c40..07a9e7f 100644
--- a/ambari-web/app/templates/main/host.hbs
+++ b/ambari-web/app/templates/main/host.hbs
@@ -22,9 +22,9 @@
     <h2 class="table-title col-sm-1">{{t common.hosts}}</h2>
     <div class="table-controls row col-sm-10 pull-right">
       <div class="col-sm-12">
-        {{#isAuthorized "HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE, HOST.ADD_DELETE_HOSTS"}}
+        {{#havePermissions "HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE, HOST.ADD_DELETE_HOSTS"}}
           {{view App.HostTableMenuView}}
-        {{/isAuthorized}}
+        {{/havePermissions}}
         <div class="col-sm-10 pull-right">
           {{outlet}}
         </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/bulk_operation_menu.hbs b/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
index 89551ca..d7bf8bd 100644
--- a/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
+++ b/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
@@ -16,7 +16,8 @@
 * limitations under the License.
 }}
 
-<button class="btn btn-success dropdown-toggle" data-toggle="dropdown" href="#">{{t common.actions}} <span class="caret"></span></button>
+<button class="btn btn-success dropdown-toggle" data-toggle="dropdown" href="#" {{bindAttr disabled="App.router.wizardWatcherController.isNonWizardUser"}}>{{t common.actions}} <span class="caret"></span></button>
+{{#unless App.router.wizardWatcherController.isNonWizardUser}}
 <ul class="dropdown-menu">
   {{#isAuthorized "HOST.ADD_DELETE_HOSTS"}}
     <li><a href="#" {{action addHost}}><i class="glyphicon glyphicon-plus glyphicon-white"></i> {{t hosts.host.add}}</a></li>
@@ -151,3 +152,4 @@
     </div>
   </li>
 </ul>
+{{/unless}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/main/host/details/host_component.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/host_component.hbs b/ambari-web/app/templates/main/host/details/host_component.hbs
index d94dd3b..28d2acf 100644
--- a/ambari-web/app/templates/main/host/details/host_component.hbs
+++ b/ambari-web/app/templates/main/host/details/host_component.hbs
@@ -54,112 +54,114 @@
   </span>
 </div>
 <div class="col-md-5 col-lg-4">
-  {{#isAuthorized "SERVICE.DECOMMISSION_RECOMMISSION"}}
+  {{#havePermissions "SERVICE.DECOMMISSION_RECOMMISSION"}}
     <div class="dropdown">
-      <button {{ bindAttr class="view.disabled :btn :btn-default :btn-block :dropdown-toggle"}} data-toggle="dropdown">
+      <button {{ bindAttr class="view.disabled :btn :btn-default :btn-block :dropdown-toggle" disabled="App.router.wizardWatcherController.isNonWizardUser"}} data-toggle="dropdown">
         {{view.componentTextStatus}}
         <span class="caret pull-right button-caret-margin"></span>
       </button>
-      <ul class="dropdown-menu">
-        {{#if view.isComponentDecommissionAvailable}}
-          {{view view.decommissionView}}
-        {{/if}}
-        {{#if view.isComponentRecommissionAvailable}}
-          {{view view.decommissionView}}
-        {{/if}}
-        {{#if view.isRestartableComponent}}
-          <li {{bindAttr class="view.isRestartComponentDisabled:hidden"}}>
-            <a href="javascript:void(null)" data-toggle="modal" {{action "restartComponent" view.content target="controller"}}>
-              {{t common.restart}}
-            </a>
-          </li>
-        {{/if}}
-        {{#unless view.isInstalling}}
-          {{#isAuthorized "SERVICE.START_STOP"}}
-            {{#if view.isStart}}
-              <li {{bindAttr class="view.isComponentDecommissioning:hidden view.noActionAvailable"}}>
-                <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
-                  {{t common.stop}}
+      {{#unless App.router.wizardWatcherController.isNonWizardUser}}
+        <ul class="dropdown-menu">
+          {{#if view.isComponentDecommissionAvailable}}
+            {{view view.decommissionView}}
+          {{/if}}
+          {{#if view.isComponentRecommissionAvailable}}
+            {{view view.decommissionView}}
+          {{/if}}
+          {{#if view.isRestartableComponent}}
+            <li {{bindAttr class="view.isRestartComponentDisabled:hidden"}}>
+              <a href="javascript:void(null)" data-toggle="modal" {{action "restartComponent" view.content target="controller"}}>
+                {{t common.restart}}
+              </a>
+            </li>
+          {{/if}}
+          {{#unless view.isInstalling}}
+            {{#isAuthorized "SERVICE.START_STOP"}}
+              {{#if view.isStart}}
+                <li {{bindAttr class="view.isComponentDecommissioning:hidden view.noActionAvailable"}}>
+                  <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
+                    {{t common.stop}}
+                  </a>
+                </li>
+              {{/if}}
+              {{#unless view.isStart}}
+                {{#unless view.isInit}}
+                  <li {{bindAttr class="view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable"}}>
+                    <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
+                      {{t common.start}}
+                    </a>
+                  </li>
+                {{/unless}}
+              {{/unless}}
+            {{/isAuthorized}}
+            {{#if view.isUpgradeFailed}}
+              <li {{bindAttr class="view.noActionAvailable"}}>
+                <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
+                  {{t common.reUpgrade}}
+                </a>
+              </li>
+            {{/if}}
+            {{#if view.isInstallFailed}}
+              <li {{bindAttr class="view.noActionAvailable"}}>
+                <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
+                  {{t common.reinstall}}
                 </a>
               </li>
             {{/if}}
-            {{#unless view.isStart}}
-              {{#unless view.isInit}}
-                <li {{bindAttr class="view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable"}}>
-                  <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
-                    {{t common.start}}
+            {{#if view.isReassignable}}
+              {{#isAuthorized "SERVICE.MOVE"}}
+                <li {{bindAttr class="view.noActionAvailable view.isMoveComponentDisabled:disabled"}}>
+                  <a href="javascript:void(null)" data-toggle="modal" {{action "moveComponent" view.content target="controller"}}>
+                    {{t common.move}}
                   </a>
                 </li>
-              {{/unless}}
-            {{/unless}}
-          {{/isAuthorized}}
-          {{#if view.isUpgradeFailed}}
-            <li {{bindAttr class="view.noActionAvailable"}}>
-              <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
-                {{t common.reUpgrade}}
+              {{/isAuthorized}}
+            {{/if}}
+            {{#isAuthorized "HOST.TOGGLE_MAINTENANCE"}}
+              <li {{bindAttr class="view.noActionAvailable view.content.isImpliedState:disabled :allow-tooltip"}}
+                {{bindAttr data-original-title="view.maintenanceTooltip"}} rel="passiveTooltip" >
+              <a href="javascript:void(null)"
+                 data-toggle="modal" {{action "toggleMaintenanceMode" view.content target="controller"}}>
+                {{#if view.isActive}}
+                  {{t passiveState.turnOn}}
+                {{else}}
+                  {{t passiveState.turnOff}}
+                {{/if}}
               </a>
             </li>
-          {{/if}}
-          {{#if view.isInstallFailed}}
-            <li {{bindAttr class="view.noActionAvailable"}}>
+            {{/isAuthorized}}
+          {{/unless}}
+          {{#if view.isInit}}
+            <li>
               <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
                 {{t common.reinstall}}
               </a>
             </li>
           {{/if}}
-          {{#if view.isReassignable}}
-            {{#isAuthorized "SERVICE.MOVE"}}
-              <li {{bindAttr class="view.noActionAvailable view.isMoveComponentDisabled:disabled"}}>
-                <a href="javascript:void(null)" data-toggle="modal" {{action "moveComponent" view.content target="controller"}}>
-                  {{t common.move}}
-                </a>
+          {{#if view.isDeletableComponent}}
+            {{#isAuthorized "HOST.ADD_DELETE_COMPONENTS"}}
+              <li {{bindAttr class="view.isDeleteComponentDisabled:disabled"}}>
+                  <a href="javascript:void(null)" data-toggle="modal" {{action "deleteComponent" view.content target="controller"}}>
+                    {{t common.delete}}
+                  </a>
               </li>
             {{/isAuthorized}}
           {{/if}}
-          {{#isAuthorized "HOST.TOGGLE_MAINTENANCE"}}
-            <li {{bindAttr class="view.noActionAvailable view.content.isImpliedState:disabled :allow-tooltip"}}
-              {{bindAttr data-original-title="view.maintenanceTooltip"}} rel="passiveTooltip" >
-            <a href="javascript:void(null)"
-               data-toggle="modal" {{action "toggleMaintenanceMode" view.content target="controller"}}>
-              {{#if view.isActive}}
-                {{t passiveState.turnOn}}
-              {{else}}
-                {{t passiveState.turnOff}}
-              {{/if}}
-            </a>
-          </li>
-          {{/isAuthorized}}
-        {{/unless}}
-        {{#if view.isInit}}
-          <li>
-            <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
-              {{t common.reinstall}}
-            </a>
-          </li>
-        {{/if}}
-        {{#if view.isDeletableComponent}}
-          {{#isAuthorized "HOST.ADD_DELETE_COMPONENTS"}}
-            <li {{bindAttr class="view.isDeleteComponentDisabled:disabled"}}>
-                <a href="javascript:void(null)" data-toggle="modal" {{action "deleteComponent" view.content target="controller"}}>
-                  {{t common.delete}}
-                </a>
-            </li>
-          {{/isAuthorized}}
-        {{/if}}
-        {{#if view.isRefreshConfigsAllowed}}
-            <li>
-                <a href="javascript:void(null)" data-toggle="modal" {{action "refreshComponentConfigs" view.content target="controller"}}>
-                  {{t hosts.host.details.refreshConfigs}}
-                </a>
-            </li>
-        {{/if}}
+          {{#if view.isRefreshConfigsAllowed}}
+              <li>
+                  <a href="javascript:void(null)" data-toggle="modal" {{action "refreshComponentConfigs" view.content target="controller"}}>
+                    {{t hosts.host.details.refreshConfigs}}
+                  </a>
+              </li>
+          {{/if}}
 
-      {{#each command in view.customCommands}}
-        <li {{bindAttr class="command.disabled:disabled"}}>
-          <a href="javascript:void(null)" {{action "executeCustomCommand" command target="controller" href=true}}>{{command.label}}</a>
-        </li>
-      {{/each}}
-      </ul>
+        {{#each command in view.customCommands}}
+          <li {{bindAttr class="command.disabled:disabled"}}>
+            <a href="javascript:void(null)" {{action "executeCustomCommand" command target="controller" href=true}}>{{command.label}}</a>
+          </li>
+        {{/each}}
+        </ul>
+      {{/unless}}
     </div>
-  {{/isAuthorized}}
+  {{/havePermissions}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/main/host/stack_versions.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/stack_versions.hbs b/ambari-web/app/templates/main/host/stack_versions.hbs
index 60e6571..cf167a4 100644
--- a/ambari-web/app/templates/main/host/stack_versions.hbs
+++ b/ambari-web/app/templates/main/host/stack_versions.hbs
@@ -54,9 +54,9 @@
           {{/if}}
         </td>
         <td class="install-repo-version align-center">
-          {{#isAuthorized "AMBARI.MANAGE_STACK_VERSIONS"}}
+          {{#havePermissions "AMBARI.MANAGE_STACK_VERSIONS"}}
             <button class="btn btn-default" {{action installVersionConfirmation version target="controller"}} {{bindAttr disabled="version.installDisabled"}}><i class="glyphicon glyphicon-off"></i>&nbsp;{{t common.install}}</button>
-          {{/isAuthorized}}
+          {{/havePermissions}}
         </td>
       </tr>
     {{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/templates/main/host/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/summary.hbs b/ambari-web/app/templates/main/host/summary.hbs
index 84a1c5e..3ceb92f 100644
--- a/ambari-web/app/templates/main/host/summary.hbs
+++ b/ambari-web/app/templates/main/host/summary.hbs
@@ -26,38 +26,40 @@
             <h4 class="panel-title">{{t common.components}}</h4>
           </div>
           <div class="col-md-6">
-            {{#isAuthorized "HOST.ADD_DELETE_COMPONENTS"}}
+            {{#havePermissions "HOST.ADD_DELETE_COMPONENTS"}}
               <div class="dropdown pull-right">
-                <button id="add_component" data-toggle="dropdown" {{bindAttr class="view.addComponentDisabled:disabled :btn :btn-default :dropdown-toggle"}}>
+                <button id="add_component" data-toggle="dropdown" {{bindAttr class="view.addComponentDisabled:disabled :btn :btn-default :dropdown-toggle" disabled="App.router.wizardWatcherController.isNonWizardUser"}}>
                   <span class="glyphicon glyphicon-plus"></span>&nbsp;{{t add}}
                 </button>
-                <ul class="dropdown-menu">
-                  {{#each component in view.addableComponents}}
-                    <li>
-                      <a href="javascript:void(null)" data-toggle="modal" {{action addComponentWithCheck component target="controller"}}>
-                        {{component.displayName}}
-                      </a>
-                    </li>
-                  {{/each}}
-                </ul>
+                {{#unless App.router.wizardWatcherController.isNonWizardUser}}
+                  <ul class="dropdown-menu">
+                    {{#each component in view.addableComponents}}
+                      <li>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action addComponentWithCheck component target="controller"}}>
+                          {{component.displayName}}
+                        </a>
+                      </li>
+                    {{/each}}
+                  </ul>
+                {{/unless}}
               </div>
-            {{/isAuthorized}}
+            {{/havePermissions}}
           </div>
         </div>
       </div>
       <div class="host-components panel-body">
           {{#if view.sortedComponents.length}}
 
-              {{#isAuthorized "SERVICE.MODIFY_CONFIGS, SERVICE.START_STOP, HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE"}}
+              {{#havePermissions "SERVICE.MODIFY_CONFIGS, SERVICE.START_STOP, HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE"}}
                   {{#if view.content.componentsWithStaleConfigsCount}}
                     <div class="alert alert-warning clearfix restart-required">
                       <i class="glyphicon glyphicon-refresh"></i> {{view.needToRestartMessage}}
-                      <button {{bindAttr class=":btn :restart-components :pull-right :btn-warning"}} {{action restartAllStaleConfigComponents target="controller"}}>
+                      <button {{bindAttr class=":btn :restart-components :pull-right :btn-warning" disabled="App.router.wizardWatcherController.isNonWizardUser"}} {{action restartAllStaleConfigComponents target="controller"}}>
                           {{t hosts.host.details.needToRestart.button}}
                       </button>
                     </div>
                   {{/if}}
-              {{/isAuthorized}}
+              {{/havePermissions}}
 
               {{#each component in view.sortedComponents}}
                 {{view component.viewClass classNames="row row-no-pad" contentBinding="component"}}
@@ -89,58 +91,60 @@
               {{/if}}
           </div>
           <div class="col-md-5 col-lg-4 pull-right">
-              {{#isAuthorized "SERVICE.MODIFY_CONFIGS, SERVICE.START_STOP, HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE"}}
+              {{#havePermissions "SERVICE.MODIFY_CONFIGS, SERVICE.START_STOP, HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE"}}
                   {{#if view.clients.length}}
                     <div class="dropdown">
                       <button id="add_component"
-                              data-toggle="dropdown" {{bindAttr class=":btn :btn-default :btn-block :dropdown-toggle controller.content.isNotHeartBeating:disabled"}}>
+                              data-toggle="dropdown" {{bindAttr disabled="App.router.wizardWatcherController.isNonWizardUser" class=":btn :btn-default :btn-block :dropdown-toggle controller.content.isNotHeartBeating:disabled"}}>
                           {{t common.installed}}
                         <span class="caret pull-right button-caret-margin"></span>
                       </button>
-                      <ul class="dropdown-menu">
-                        <li>
-                          <a href="javascript:void(null)"
-                             data-toggle="modal" {{action refreshConfigs view.clients target="controller"}}>
-                              {{t hosts.host.details.refreshConfigs}}
-                          </a>
-                        </li>
-                        <li>
-                          <a href="javascript:void(null)" {{bindAttr class="view.areClientsNotInstalled::disabled" }}
-                             data-toggle="modal" {{action installClients target="view"}}>
-                              {{t host.host.details.installClients}}
-                          </a>
-                        </li>
-                          {{#if view.anyClientFailedToInstall}}
-                            <li>
-                              <a href="javascript:void(null)" {{action reinstallClients target="view"}}>
-                                  {{t host.host.details.reinstallClients}}
-                              </a>
-                            </li>
-                          {{/if}}
-                          {{#each option in view.clientsWithCustomCommands}}
-                            <li class="dropdown-submenu submenu-left">
-                              <a href="javascript:void(null)">
-                                <i class="glyphicon glyphicon-play-circle"></i>
-                                  {{option.label}}
-                              </a>
+                      {{#unless App.router.wizardWatcherController.isNonWizardUser}}
+                        <ul class="dropdown-menu">
+                          <li>
+                            <a href="javascript:void(null)"
+                               data-toggle="modal" {{action refreshConfigs view.clients target="controller"}}>
+                                {{t hosts.host.details.refreshConfigs}}
+                            </a>
+                          </li>
+                          <li>
+                            <a href="javascript:void(null)" {{bindAttr class="view.areClientsNotInstalled::disabled" }}
+                               data-toggle="modal" {{action installClients target="view"}}>
+                                {{t host.host.details.installClients}}
+                            </a>
+                          </li>
+                            {{#if view.anyClientFailedToInstall}}
+                              <li>
+                                <a href="javascript:void(null)" {{action reinstallClients target="view"}}>
+                                    {{t host.host.details.reinstallClients}}
+                                </a>
+                              </li>
+                            {{/if}}
+                            {{#each option in view.clientsWithCustomCommands}}
+                              <li class="dropdown-submenu submenu-left">
+                                <a href="javascript:void(null)">
+                                  <i class="glyphicon glyphicon-play-circle"></i>
+                                    {{option.label}}
+                                </a>
 
-                              <div class="dropdown-menu-wrap">
-                                <ul class="dropdown-menu">
-                                    {{#each command in option.commands}}
-                                      <li>
-                                        <a href="javascript:void(null)" {{action "executeCustomCommand" command target="controller" href=true}}>
-                                          {{command.label}}
-                                        </a>
-                                      </li>
-                                    {{/each}}
-                                </ul>
-                              </div>
-                            </li>
-                          {{/each}}
-                      </ul>
+                                <div class="dropdown-menu-wrap">
+                                  <ul class="dropdown-menu">
+                                      {{#each command in option.commands}}
+                                        <li>
+                                          <a href="javascript:void(null)" {{action "executeCustomCommand" command target="controller" href=true}}>
+                                            {{command.label}}
+                                          </a>
+                                        </li>
+                                      {{/each}}
+                                  </ul>
+                                </div>
+                              </li>
+                            {{/each}}
+                        </ul>
+                      {{/unless}}
                     </div>
                   {{/if}}
-              {{/isAuthorized}}
+              {{/havePermissions}}
           </div>
         </div>
       </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/app/utils/helper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index 3bc247c..baacdf3 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -445,6 +445,29 @@ Em.Handlebars.registerHelper('isAuthorized', function (property, options) {
 });
 
 /**
+ * Usage:
+ *
+ * <pre>
+ *   {{#havePermissions "SERVICE.TOGGLE_ALERTS"}}
+ *     {{! some truly code }}
+ *   {{else}}
+ *     {{! some falsy code }}
+ *   {{/havePermissions}}
+ * </pre>
+ */
+Em.Handlebars.registerHelper('havePermissions', function (property, options) {
+  var permission = Ember.Object.create({
+    havePermissions: function() {
+      return App.havePermissions(property);
+    }.property()
+  });
+
+  // wipe out contexts so boundIf uses `this` (the permission) as the context
+  options.contexts = null;
+  return Ember.Handlebars.helpers.boundIf.call(permission, "havePermissions", options);
+});
+
+/**
  * @namespace App
  */
 App = require('app');

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/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 45c783b..945dc8f 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -319,7 +319,7 @@ App.MainServiceItemView = Em.View.extend({
   }.property('maintenance'),
 
   hasConfigTab: function() {
-    return App.isAuthorized('CLUSTER.VIEW_CONFIGS', {ignoreWizard: true}) && !App.get('services.noConfigTypes').contains(this.get('controller.content.serviceName'));
+    return App.havePermissions('CLUSTER.VIEW_CONFIGS') && !App.get('services.noConfigTypes').contains(this.get('controller.content.serviceName'));
   }.property('controller.content.serviceName','App.services.noConfigTypes'),
 
   hasHeatmapTab: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/84342f6a/ambari-web/test/views/main/service/item_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/item_test.js b/ambari-web/test/views/main/service/item_test.js
index e4a1940..b86d021 100644
--- a/ambari-web/test/views/main/service/item_test.js
+++ b/ambari-web/test/views/main/service/item_test.js
@@ -614,7 +614,7 @@ describe('App.MainServiceItemView', function () {
 
   describe('#hasConfigTab', function() {
     beforeEach(function() {
-      this.mockAuthorized = sinon.stub(App, 'isAuthorized');
+      this.mockAuthorized = sinon.stub(App, 'havePermissions');
       this.mockGet = sinon.stub(App, 'get').returns(['S2']);
     });
     afterEach(function() {
@@ -622,7 +622,7 @@ describe('App.MainServiceItemView', function () {
       this.mockGet.restore();
     });
 
-    it('should return false when not authorized', function() {
+    it('should return false when have not permissions', function() {
       this.mockAuthorized.returns(false);
       view.set('controller.content.serviceName', 'S1');
       expect(view.get('hasConfigTab')).to.be.false;
@@ -634,7 +634,7 @@ describe('App.MainServiceItemView', function () {
       expect(view.get('hasConfigTab')).to.be.false;
     });
 
-    it('should return true when authorized', function() {
+    it('should return true when have permissions', function() {
       this.mockAuthorized.returns(true);
       view.set('controller.content.serviceName', 'S1');
       expect(view.get('hasConfigTab')).to.be.true;


[05/12] ambari git commit: AMBARI-22258. Use correct property attribute setter fn(). while setting 'tez.runtime.io.sort.mb' maximum value.

Posted by rl...@apache.org.
AMBARI-22258. Use correct property attribute setter fn(). while setting 'tez.runtime.io.sort.mb' maximum value.


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 3b5cbed0983ef3e47b6a948dcbeeef0ac5d6a604
Parents: 37d59f2
Author: Swapan Shridhar <ss...@hortonworks.com>
Authored: Wed Oct 18 13:05:40 2017 -0700
Committer: Swapan Shridhar <ss...@hortonworks.com>
Committed: Wed Oct 18 13:05:40 2017 -0700

----------------------------------------------------------------------
 .../resources/common-services/YARN/3.0.0.3.0/service_advisor.py | 3 ++-
 .../src/main/resources/stacks/HDP/2.5/services/stack_advisor.py | 3 ++-
 .../src/test/python/stacks/2.5/common/test_stack_advisor.py     | 5 ++++-
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3b5cbed0/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
index ecf245d..70eb5be 100644
--- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
@@ -580,6 +580,7 @@ class YARNRecommender(service_advisor.ServiceAdvisor):
     putHiveInteractiveEnvProperty = self.putProperty(configurations, "hive-interactive-env", services)
     putHiveInteractiveEnvPropertyAttribute = self.putPropertyAttribute(configurations, "hive-interactive-env")
     putTezInteractiveSiteProperty = self.putProperty(configurations, "tez-interactive-site", services)
+    putTezInteractiveSitePropertyAttribute = self.putPropertyAttribute(configurations, "tez-interactive-site")
     llap_daemon_selected_queue_name = None
     selected_queue_is_ambari_managed_llap = None  # Queue named 'llap' at root level is Ambari managed.
     llap_selected_queue_am_percent = None
@@ -1047,7 +1048,7 @@ class YARNRecommender(service_advisor.ServiceAdvisor):
     putTezInteractiveSiteProperty('tez.runtime.io.sort.mb', tez_runtime_io_sort_mb)
     if "tez-site" in services["configurations"] and "tez.runtime.sorter.class" in services["configurations"]["tez-site"]["properties"]:
       if services["configurations"]["tez-site"]["properties"]["tez.runtime.sorter.class"] == "LEGACY":
-        putTezInteractiveSiteProperty("tez.runtime.io.sort.mb", "maximum", 1800)
+        putTezInteractiveSitePropertyAttribute("tez.runtime.io.sort.mb", "maximum", 1800)
 
     putTezInteractiveSiteProperty('tez.runtime.unordered.output.buffer.size-mb', tez_runtime_unordered_output_buffer_size)
     putHiveInteractiveSiteProperty('hive.auto.convert.join.noconditionaltask.size', hive_auto_convert_join_noconditionaltask_size)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3b5cbed0/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 92ce9b9..b6f2478 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -860,6 +860,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
     putHiveInteractiveEnvProperty = self.putProperty(configurations, "hive-interactive-env", services)
     putHiveInteractiveEnvPropertyAttribute = self.putPropertyAttribute(configurations, "hive-interactive-env")
     putTezInteractiveSiteProperty = self.putProperty(configurations, "tez-interactive-site", services)
+    putTezInteractiveSitePropertyAttribute = self.putPropertyAttribute(configurations, "tez-interactive-site")
     llap_daemon_selected_queue_name = None
     selected_queue_is_ambari_managed_llap = None  # Queue named 'llap' at root level is Ambari managed.
     llap_selected_queue_am_percent = None
@@ -1331,7 +1332,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
     putTezInteractiveSiteProperty('tez.runtime.io.sort.mb', tez_runtime_io_sort_mb)
     if "tez-site" in services["configurations"] and "tez.runtime.sorter.class" in services["configurations"]["tez-site"]["properties"]:
       if services["configurations"]["tez-site"]["properties"]["tez.runtime.sorter.class"] == "LEGACY":
-        putTezInteractiveSiteProperty("tez.runtime.io.sort.mb", "maximum", 1800)
+        putTezInteractiveSitePropertyAttribute("tez.runtime.io.sort.mb", "maximum", 1800)
 
     putTezInteractiveSiteProperty('tez.runtime.unordered.output.buffer.size-mb', tez_runtime_unordered_output_buffer_size)
     putHiveInteractiveSiteProperty('hive.auto.convert.join.noconditionaltask.size', hive_auto_convert_join_noconditionaltask_size)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3b5cbed0/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index cf462de..407e78d 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -4446,7 +4446,8 @@ class TestHDP25StackAdvisor(TestCase):
           },
         "tez-site": {
           "properties": {
-            "tez.am.resource.memory.mb": "1024"
+            "tez.am.resource.memory.mb": "1024",
+            "tez.runtime.sorter.class": "LEGACY"
           }
         },
       }
@@ -4481,6 +4482,8 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.llap.io.memory.size'], '186368')
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'], '9830')
+    self.assertEqual(configurations['tez-interactive-site']['properties']['tez.runtime.io.sort.mb'], '1092')
+    self.assertEquals(configurations['tez-interactive-site']['property_attributes']['tez.runtime.io.sort.mb'], {'maximum': '1800'})
 
 
 


[09/12] ambari git commit: AMBARI-22269 Log Search UI: provide navigation between Service and Audit Logs. (ababiichuk)

Posted by rl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.ts
index fc0f6ae..af4933a 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.ts
@@ -20,6 +20,8 @@ import {Component, OnInit, Input, forwardRef} from '@angular/core';
 import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
 import {Moment} from 'moment';
 import {FilteringService} from '@app/services/filtering.service';
+import {ListItem} from '@app/classes/list-item';
+import {TimeUnitListItem} from '@app/classes/filtering';
 
 @Component({
   selector: 'time-range-picker',
@@ -53,7 +55,7 @@ export class TimeRangePickerComponent implements OnInit, ControlValueAccessor {
 
   private onChange: (fn: any) => void;
 
-  get quickRanges(): any[][] {
+  get quickRanges(): (ListItem | TimeUnitListItem[])[] {
     return this.filtering.filters.timeRange.options;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
index 7105624..53afc47 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
@@ -30,6 +30,7 @@ import {ServiceLogsService, serviceLogs} from '@app/services/storage/service-log
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {ComponentActionsService} from '@app/services/component-actions.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {HttpClientService} from '@app/services/http-client.service';
@@ -44,6 +45,14 @@ describe('TimeZonePickerComponent', () => {
   let fixture: ComponentFixture<TimeZonePickerComponent>;
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [
         TimeZonePickerComponent,
@@ -62,7 +71,8 @@ describe('TimeZonePickerComponent', () => {
           serviceLogs,
           serviceLogsFields,
           serviceLogsHistogramData,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -78,9 +88,13 @@ describe('TimeZonePickerComponent', () => {
         ServiceLogsFieldsService,
         ServiceLogsHistogramDataService,
         ServiceLogsTruncatedService,
+        TabsService,
         ComponentActionsService,
         FilteringService,
-        HttpClientService,
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        },
         LogsContainerService
       ],
     })

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
index 3dbd992..e6a02c0 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
@@ -29,6 +29,7 @@ import {AuditLogsFieldsService, auditLogsFields} from '@app/services/storage/aud
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {HttpClientService} from '@app/services/http-client.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
@@ -59,7 +60,8 @@ describe('ComponentActionsService', () => {
           auditLogsFields,
           serviceLogsFields,
           serviceLogsHistogramData,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         })
       ],
       providers: [
@@ -75,6 +77,7 @@ describe('ComponentActionsService', () => {
         ServiceLogsFieldsService,
         ServiceLogsHistogramDataService,
         ServiceLogsTruncatedService,
+        TabsService,
         FilteringService,
         {
           provide: HttpClientService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.ts
index 19b873c..c483cd8 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.ts
@@ -18,16 +18,17 @@
 
 import {Injectable} from '@angular/core';
 import {AppSettingsService} from '@app/services/storage/app-settings.service';
-import {AppStateService} from '@app/services/storage/app-state.service';
+import {TabsService} from '@app/services/storage/tabs.service';
 import {CollectionModelService} from '@app/classes/models/store';
 import {FilteringService} from '@app/services/filtering.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {ServiceLog} from '@app/classes/models/service-log';
+import {getFiltersForm} from '@app/classes/filtering';
 
 @Injectable()
 export class ComponentActionsService {
 
-  constructor(private appSettings: AppSettingsService, private appState: AppStateService, private filtering: FilteringService, private logsContainer: LogsContainerService) {
+  constructor(private appSettings: AppSettingsService, private tabsStorage: TabsService, private filtering: FilteringService, private logsContainer: LogsContainerService) {
   }
 
   //TODO implement actions
@@ -39,8 +40,7 @@ export class ComponentActionsService {
   }
 
   refresh(): void {
-    // TODO implement dynamic definition of logs type
-    this.logsContainer.loadLogs('serviceLogs');
+    this.logsContainer.loadLogs();
   }
 
   openHistory() {
@@ -78,14 +78,25 @@ export class ComponentActionsService {
   }
 
   openLog(log: ServiceLog): void {
-    this.appState.setParameters({
-      isServiceLogsFileView: true,
-      activeLog: {
-        id: log.id,
-        host_name: log.host,
-        component_name: log.type
+    const tab = {
+      id: log.id,
+      type: 'serviceLogs',
+      isActive: true,
+      isCloseable: true,
+      label: `${log.host} >> ${log.type}`,
+      appState: {
+        activeLogsType: 'serviceLogs',
+        isServiceLogsFileView: true,
+        activeLog: {
+          id: log.id,
+          host_name: log.host,
+          component_name: log.type
+        },
+        activeFiltersForm: getFiltersForm('serviceLogs')
       }
-    });
+    };
+    this.tabsStorage.addInstance(tab);
+    this.logsContainer.switchTab(tab);
   }
 
   openContext(log: ServiceLog): void {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.spec.ts
index f043f42..5dc38b4 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.spec.ts
@@ -29,6 +29,7 @@ import {AppStateService, appState} from '@app/services/storage/app-state.service
 import {ClustersService, clusters} from '@app/services/storage/clusters.service';
 import {ComponentsService, components} from '@app/services/storage/components.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {HttpClientService} from '@app/services/http-client.service';
 import {FilteringService} from '@app/services/filtering.service';
@@ -58,7 +59,8 @@ describe('ComponentGeneratorService', () => {
           appState,
           clusters,
           components,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         })
       ],
       providers: [
@@ -79,7 +81,8 @@ describe('ComponentGeneratorService', () => {
         AppStateService,
         ClustersService,
         ComponentsService,
-        ServiceLogsTruncatedService
+        ServiceLogsTruncatedService,
+        TabsService
       ]
     });
   });

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
index 5d79902..2b3e326 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
@@ -19,6 +19,7 @@
 import {TestBed, inject} from '@angular/core/testing';
 import {StoreModule} from '@ngrx/store';
 import {AppSettingsService, appSettings} from '@app/services/storage/app-settings.service';
+import {AppStateService, appState} from '@app/services/storage/app-state.service';
 import {ClustersService, clusters} from '@app/services/storage/clusters.service';
 import {ComponentsService, components} from '@app/services/storage/components.service';
 import {HostsService, hosts} from '@app/services/storage/hosts.service';
@@ -43,6 +44,7 @@ describe('FilteringService', () => {
       imports: [
         StoreModule.provideStore({
           appSettings,
+          appState,
           clusters,
           components,
           hosts
@@ -51,6 +53,7 @@ describe('FilteringService', () => {
       providers: [
         FilteringService,
         AppSettingsService,
+        AppStateService,
         ClustersService,
         ComponentsService,
         HostsService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
index c3177cc..85dc408 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
@@ -17,7 +17,7 @@
  */
 
 import {Injectable, Input} from '@angular/core';
-import {FormControl, FormGroup} from '@angular/forms';
+import {FormGroup} from '@angular/forms';
 import {Response} from '@angular/http';
 import {Subject} from 'rxjs/Subject';
 import {Observable} from 'rxjs/Observable';
@@ -25,17 +25,22 @@ import 'rxjs/add/observable/timer';
 import 'rxjs/add/operator/takeUntil';
 import * as moment from 'moment-timezone';
 import {ListItem} from '@app/classes/list-item';
+import {FilterCondition, filters} from '@app/classes/filtering';
 import {Node} from '@app/classes/models/node';
 import {AppSettingsService} from '@app/services/storage/app-settings.service';
 import {ClustersService} from '@app/services/storage/clusters.service';
 import {ComponentsService} from '@app/services/storage/components.service';
 import {HostsService} from '@app/services/storage/hosts.service';
+import {AppStateService} from '@app/services/storage/app-state.service';
 import {HttpClientService} from '@app/services/http-client.service';
 
 @Injectable()
 export class FilteringService {
 
-  constructor(private httpClient: HttpClientService, private appSettings: AppSettingsService, private clustersStorage: ClustersService, private componentsStorage: ComponentsService, private hostsStorage: HostsService) {
+  constructor(private httpClient: HttpClientService, private appSettings: AppSettingsService, private clustersStorage: ClustersService, private componentsStorage: ComponentsService, private hostsStorage: HostsService, private appState: AppStateService) {
+    this.loadClusters();
+    this.loadComponents();
+    this.loadHosts();
     appSettings.getParameter('timeZone').subscribe(value => this.timeZone = value || this.defaultTimeZone);
     clustersStorage.getAll().subscribe((clusters: string[]): void => {
       this.filters.clusters.options = [...this.filters.clusters.options, ...clusters.map(this.getListItemFromString)];
@@ -46,6 +51,7 @@ export class FilteringService {
     hostsStorage.getAll().subscribe((hosts: Node[]): void => {
       this.filters.hosts.options = [...this.filters.hosts.options, ...hosts.map(this.getListItemFromNode)];
     });
+    appState.getParameter('activeFiltersForm').subscribe((form: FormGroup) => this.activeFiltersForm = form);
   }
 
   /**
@@ -62,7 +68,7 @@ export class FilteringService {
 
   /**
    * Get instance for dropdown list from Node object
-   * @param name {Node}
+   * @param node {Node}
    * @returns {ListItem}
    */
   private getListItemFromNode(node: Node): ListItem {
@@ -74,8 +80,6 @@ export class FilteringService {
 
   private readonly defaultTimeZone = moment.tz.guess();
 
-  private readonly paginationOptions = ['10', '25', '50', '100'];
-
   timeZone: string = this.defaultTimeZone;
 
   /**
@@ -86,326 +90,9 @@ export class FilteringService {
   @Input()
   maximumCaptureTimeLimit: number = 600000;
 
-  filters = {
-    clusters: {
-      label: 'filter.clusters',
-      options: [],
-      defaultValue: ''
-    },
-    timeRange: {
-      options: [
-        [
-          {
-            label: 'filter.timeRange.7d',
-            value: {
-              type: 'LAST',
-              unit: 'd',
-              interval: 7
-            }
-          },
-          {
-            label: 'filter.timeRange.30d',
-            value: {
-              type: 'LAST',
-              unit: 'd',
-              interval: 30
-            }
-          },
-          {
-            label: 'filter.timeRange.60d',
-            value: {
-              type: 'LAST',
-              unit: 'd',
-              interval: 60
-            }
-          },
-          {
-            label: 'filter.timeRange.90d',
-            value: {
-              type: 'LAST',
-              unit: 'd',
-              interval: 90
-            }
-          },
-          {
-            label: 'filter.timeRange.6m',
-            value: {
-              type: 'LAST',
-              unit: 'M',
-              interval: 6
-            }
-          },
-          {
-            label: 'filter.timeRange.1y',
-            value: {
-              type: 'LAST',
-              unit: 'Y',
-              interval: 1
-            }
-          },
-          {
-            label: 'filter.timeRange.2y',
-            value: {
-              type: 'LAST',
-              unit: 'Y',
-              interval: 2
-            }
-          },
-          {
-            label: 'filter.timeRange.5y',
-            value: {
-              type: 'LAST',
-              unit: 'Y',
-              interval: 5
-            }
-          }
-        ],
-        [
-          {
-            label: 'filter.timeRange.yesterday',
-            value: {
-              type: 'PAST',
-              unit: 'd'
-            }
-          },
-          // TODO implement time range calculation
-          /*
-          {
-            label: 'filter.timeRange.beforeYesterday',
-            value: {
-              type: 'PAST',
-              unit: 'd'
-            }
-          },
-          {
-            label: 'filter.timeRange.thisDayLastWeek',
-            value: {
-              type: 'PAST',
-              unit: 'd'
-            }
-          },
-          */
-          {
-            label: 'filter.timeRange.previousWeek',
-            value: {
-              type: 'PAST',
-              unit: 'w'
-            }
-          },
-          {
-            label: 'filter.timeRange.previousMonth',
-            value: {
-              type: 'PAST',
-              unit: 'M'
-            }
-          },
-          {
-            label: 'filter.timeRange.previousYear',
-            value: {
-              type: 'PAST',
-              unit: 'Y'
-            }
-          }
-        ],
-        [
-          {
-            label: 'filter.timeRange.today',
-            value: {
-              type: 'CURRENT',
-              unit: 'd'
-            }
-          },
-          {
-            label: 'filter.timeRange.thisWeek',
-            value: {
-              type: 'CURRENT',
-              unit: 'w'
-            }
-          },
-          {
-            label: 'filter.timeRange.thisMonth',
-            value: {
-              type: 'CURRENT',
-              unit: 'M'
-            }
-          },
-          {
-            label: 'filter.timeRange.thisYear',
-            value: {
-              type: 'CURRENT',
-              unit: 'Y'
-            }
-          }
-        ],
-        [
-          {
-            label: 'filter.timeRange.5min',
-            value: {
-              type: 'LAST',
-              unit: 'm',
-              interval: 5
-            }
-          },
-          {
-            label: 'filter.timeRange.15min',
-            value: {
-              type: 'LAST',
-              unit: 'm',
-              interval: 15
-            }
-          },
-          {
-            label: 'filter.timeRange.30min',
-            value: {
-              type: 'LAST',
-              unit: 'm',
-              interval: 30
-            }
-          },
-          {
-            label: 'filter.timeRange.1hr',
-            value: {
-              type: 'LAST',
-              unit: 'h',
-              interval: 1
-            }
-          },
-          {
-            label: 'filter.timeRange.3hr',
-            value: {
-              type: 'LAST',
-              unit: 'h',
-              interval: 3
-            }
-          },
-          {
-            label: 'filter.timeRange.6hr',
-            value: {
-              type: 'LAST',
-              unit: 'h',
-              interval: 6
-            }
-          },
-          {
-            label: 'filter.timeRange.12hr',
-            value: {
-              type: 'LAST',
-              unit: 'h',
-              interval: 12
-            }
-          },
-          {
-            label: 'filter.timeRange.24hr',
-            value: {
-              type: 'LAST',
-              unit: 'h',
-              interval: 24
-            }
-          },
-        ]
-      ],
-      defaultValue: {
-        type: 'LAST',
-        unit: 'h',
-        interval: 1
-      },
-      defaultLabel: 'filter.timeRange.1hr'
-    },
-    components: {
-      label: 'filter.components',
-      iconClass: 'fa fa-cubes',
-      options: [],
-      defaultValue: ''
-    },
-    levels: {
-      label: 'filter.levels',
-      iconClass: 'fa fa-sort-amount-asc',
-      options: [
-        {
-          label: 'levels.fatal',
-          value: 'FATAL'
-        },
-        {
-          label: 'levels.error',
-          value: 'ERROR'
-        },
-        {
-          label: 'levels.warn',
-          value: 'WARN'
-        },
-        {
-          label: 'levels.info',
-          value: 'INFO'
-        },
-        {
-          label: 'levels.debug',
-          value: 'DEBUG'
-        },
-        {
-          label: 'levels.trace',
-          value: 'TRACE'
-        },
-        {
-          label: 'levels.unknown',
-          value: 'UNKNOWN'
-        }
-      ],
-      defaultValue: ''
-    },
-    hosts: {
-      label: 'filter.hosts',
-      iconClass: 'fa fa-server',
-      options: [],
-      defaultValue: ''
-    },
-    sorting: {
-      label: 'sorting.title',
-      options: [
-        {
-          label: 'sorting.time.asc',
-          value: {
-            key: 'logtime',
-            type: 'asc'
-          }
-        },
-        {
-          label: 'sorting.time.desc',
-          value: {
-            key: 'logtime',
-            type: 'desc'
-          }
-        }
-      ],
-      defaultValue: '',
-      defaultLabel: ''
-    },
-    pageSize: {
-      label: 'pagination.title',
-      options: this.paginationOptions.map(option => {
-        return {
-          label: option,
-          value: option
-        }
-      }),
-      defaultValue: '10',
-      defaultLabel: '10'
-    },
-    page: {
-      defaultValue: 0
-    },
-    query: {}
-  };
-
-  private filtersFormItems = Object.keys(this.filters).reduce((currentObject, key) => {
-    let formControl = new FormControl(),
-      item = {
-        [key]: formControl
-      };
-    formControl.setValue(this.filters[key].defaultValue);
-    return Object.assign(currentObject, item);
-  }, {});
+  filters: {[key: string]: FilterCondition} = Object.assign({}, filters);
 
-  filtersForm = new FormGroup(this.filtersFormItems);
+  activeFiltersForm: FormGroup;
 
   queryParameterNameChange: Subject<any> = new Subject();
 
@@ -428,7 +115,7 @@ export class FilteringService {
   startCaptureTimer(): void {
     this.startCaptureTime = new Date().valueOf();
     const maxCaptureTimeInSeconds = this.maximumCaptureTimeLimit / 1000;
-    Observable.timer(0, 1000).takeUntil(this.stopTimer).subscribe(seconds => {
+    Observable.timer(0, 1000).takeUntil(this.stopTimer).subscribe((seconds: number): void => {
       this.captureSeconds = seconds;
       if (this.captureSeconds >= maxCaptureTimeInSeconds) {
         this.stopCaptureTimer();
@@ -442,7 +129,7 @@ export class FilteringService {
     this.captureSeconds = 0;
     this.stopTimer.next();
     this.setCustomTimeRange(this.startCaptureTime, this.stopCaptureTime);
-    Observable.timer(0, 1000).takeUntil(this.stopAutoRefreshCountdown).subscribe(seconds => {
+    Observable.timer(0, 1000).takeUntil(this.stopAutoRefreshCountdown).subscribe((seconds: number): void => {
       this.autoRefreshRemainingSeconds = autoRefreshIntervalSeconds - seconds;
       if (!this.autoRefreshRemainingSeconds) {
         this.stopAutoRefreshCountdown.next();
@@ -485,7 +172,7 @@ export class FilteringService {
   }
 
   setCustomTimeRange(startTime: number, endTime: number): void {
-    this.filtersForm.controls.timeRange.setValue({
+    this.activeFiltersForm.controls.timeRange.setValue({
       type: 'CUSTOM',
       start: moment(startTime),
       end: moment(endTime)

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.spec.ts
index a762fef..ee0e1e7 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.spec.ts
@@ -29,6 +29,7 @@ import {ClustersService, clusters} from '@app/services/storage/clusters.service'
 import {ComponentsService, components} from '@app/services/storage/components.service';
 import {HostsService, hosts} from '@app/services/storage/hosts.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {HttpClientService} from '@app/services/http-client.service';
 import {FilteringService} from '@app/services/filtering.service';
 
@@ -57,7 +58,8 @@ describe('LogsContainerService', () => {
           clusters,
           components,
           hosts,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         })
       ],
       providers: [
@@ -72,6 +74,7 @@ describe('LogsContainerService', () => {
         ComponentsService,
         HostsService,
         ServiceLogsTruncatedService,
+        TabsService,
         LogsContainerService,
         {
           provide: HttpClientService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.ts
index 0319262..e187b00 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-container.service.ts
@@ -17,6 +17,7 @@
  */
 
 import {Injectable} from '@angular/core';
+import {Response} from '@angular/http';
 import {HttpClientService} from '@app/services/http-client.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {AuditLogsService} from '@app/services/storage/audit-logs.service';
@@ -26,22 +27,28 @@ import {ServiceLogsFieldsService} from '@app/services/storage/service-logs-field
 import {ServiceLogsHistogramDataService} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService} from '@app/services/storage/service-logs-truncated.service';
 import {AppStateService} from '@app/services/storage/app-state.service';
+import {TabsService} from '@app/services/storage/tabs.service';
 import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
+import {Tab} from '@app/classes/models/tab';
+import {AuditLogField} from '@app/classes/models/audit-log-field';
+import {ServiceLogField} from '@app/classes/models/service-log-field';
+import {BarGraph} from '@app/classes/models/bar-graph';
 
 @Injectable()
 export class LogsContainerService {
 
-  constructor(private httpClient: HttpClientService, private auditLogsStorage: AuditLogsService, private auditLogsFieldsStorage: AuditLogsFieldsService, private serviceLogsStorage: ServiceLogsService, private serviceLogsFieldsStorage: ServiceLogsFieldsService, private serviceLogsHistogramStorage: ServiceLogsHistogramDataService, private serviceLogsTruncatedStorage: ServiceLogsTruncatedService, private appState: AppStateService, private filtering: FilteringService) {
+  constructor(private httpClient: HttpClientService, private auditLogsStorage: AuditLogsService, private auditLogsFieldsStorage: AuditLogsFieldsService, private serviceLogsStorage: ServiceLogsService, private serviceLogsFieldsStorage: ServiceLogsFieldsService, private serviceLogsHistogramStorage: ServiceLogsHistogramDataService, private serviceLogsTruncatedStorage: ServiceLogsTruncatedService, private appState: AppStateService, private tabsStorage: TabsService, private filtering: FilteringService) {
     appState.getParameter('activeLog').subscribe((value: ActiveServiceLogEntry | null) => this.activeLog = value);
     appState.getParameter('isServiceLogsFileView').subscribe((value: boolean): void => {
       const activeLog = this.activeLog,
-        filtersForm = this.filtering.filtersForm;
+        filtersForm = this.filtering.activeFiltersForm;
       if (value && activeLog) {
         filtersForm.controls.hosts.setValue(activeLog.host_name);
         filtersForm.controls.components.setValue(activeLog.component_name);
       }
       this.isServiceLogsFileView = value;
     });
+    appState.getParameter('activeLogsType').subscribe((value: string) => this.activeLogsType = value);
   }
 
   readonly colors = {
@@ -78,13 +85,11 @@ export class LogsContainerService {
   readonly logsTypeMap = {
     auditLogs: {
       logsModel: this.auditLogsStorage,
-      fieldsModel: this.auditLogsFieldsStorage,
-      isSetFlag: 'isAuditLogsSet'
+      fieldsModel: this.auditLogsFieldsStorage
     },
     serviceLogs: {
       logsModel: this.serviceLogsStorage,
-      fieldsModel: this.serviceLogsFieldsStorage,
-      isSetFlag: 'isServiceLogsSet'
+      fieldsModel: this.serviceLogsFieldsStorage
     }
   };
 
@@ -94,8 +99,10 @@ export class LogsContainerService {
 
   activeLog: ActiveServiceLogEntry | null = null;
 
-  loadLogs(logsType: string): void {
-    this.httpClient.get(logsType, this.getParams('listFilters')).subscribe(response => {
+  activeLogsType: string;
+
+  loadLogs = (logsType: string = this.activeLogsType): void => {
+    this.httpClient.get(logsType, this.getParams('listFilters')).subscribe((response: Response): void => {
       const jsonResponse = response.json(),
         model = this.logsTypeMap[logsType].logsModel;
       model.clear();
@@ -110,7 +117,7 @@ export class LogsContainerService {
     });
     if (logsType === 'serviceLogs') {
       // TODO rewrite to implement conditional data loading for service logs histogram or audit logs graph
-      this.httpClient.get('serviceLogsHistogram', this.getParams('histogramFilters')).subscribe(response => {
+      this.httpClient.get('serviceLogsHistogram', this.getParams('histogramFilters')).subscribe((response: Response): void => {
         const jsonResponse = response.json();
         this.serviceLogsHistogramStorage.clear();
         if (jsonResponse) {
@@ -130,7 +137,7 @@ export class LogsContainerService {
       component_name: componentName,
       scrollType: scrollType
     };
-    this.httpClient.get('serviceLogsTruncated', params).subscribe(response => {
+    this.httpClient.get('serviceLogsTruncated', params).subscribe((response: Response): void => {
       const jsonResponse = response.json();
       if (!scrollType) {
         this.serviceLogsTruncatedStorage.clear();
@@ -156,8 +163,8 @@ export class LogsContainerService {
 
   private getParams(filtersMapName: string): any {
     let params = {};
-    Object.keys(this[filtersMapName]).forEach(key => {
-      const inputValue = this.filtering.filtersForm.getRawValue()[key],
+    Object.keys(this[filtersMapName]).forEach((key: string): void => {
+      const inputValue = this.filtering.activeFiltersForm.getRawValue()[key],
         paramNames = this[filtersMapName][key];
       paramNames.forEach(paramName => {
         let value;
@@ -179,7 +186,7 @@ export class LogsContainerService {
     return params;
   }
 
-  getHistogramData(data: any[]): any {
+  getHistogramData(data: BarGraph[]): {[key: string]: number} {
     let histogramData = {};
     data.forEach(type => {
       const name = type.name;
@@ -196,4 +203,31 @@ export class LogsContainerService {
     return histogramData;
   }
 
+  loadColumnsNames(): void {
+    this.httpClient.get('serviceLogsFields').subscribe((response: Response): void => {
+      const jsonResponse = response.json();
+      if (jsonResponse) {
+        this.serviceLogsFieldsStorage.addInstances(this.getColumnsArray(jsonResponse, ServiceLogField));
+      }
+    });
+    this.httpClient.get('auditLogsFields').subscribe((response: Response): void => {
+      const jsonResponse = response.json();
+      if (jsonResponse) {
+        this.auditLogsFieldsStorage.addInstances(this.getColumnsArray(jsonResponse, AuditLogField));
+      }
+    });
+  }
+
+  private getColumnsArray(keysObject: any, fieldClass: any): any[] {
+    return Object.keys(keysObject).map((key: string): {fieldClass} => new fieldClass(key));
+  }
+
+  switchTab(activeTab: Tab): void {
+    this.appState.setParameters(activeTab.appState);
+    this.tabsStorage.mapCollection((tab: Tab): Tab => Object.assign({}, tab, {
+      isActive: tab.id === activeTab.id
+    }));
+    this.loadLogs();
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/reducers.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/reducers.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/reducers.service.ts
index ca8a632..d700b16 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/reducers.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/reducers.service.ts
@@ -31,6 +31,7 @@ import {serviceLogsTruncated} from '@app/services/storage/service-logs-truncated
 import {serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {auditLogsFields} from '@app/services/storage/audit-logs-fields.service';
 import {userConfigs} from '@app/services/storage/user-configs.service';
+import {tabs} from '@app/services/storage/tabs.service';
 
 export const reducers = {
   appSettings,
@@ -46,7 +47,8 @@ export const reducers = {
   clusters,
   components,
   serviceLogsFields,
-  auditLogsFields
+  auditLogsFields,
+  tabs
 };
 
 export function reducer(state: any, action: any) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/tabs.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/tabs.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/tabs.service.ts
new file mode 100644
index 0000000..93bf985
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/tabs.service.ts
@@ -0,0 +1,33 @@
+/**
+ * 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.
+ */
+
+import {Injectable} from '@angular/core';
+import {Store} from '@ngrx/store';
+import {initialTabs} from '@app/classes/models/tab';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
+
+export const modelName = 'tabs';
+
+@Injectable()
+export class TabsService extends CollectionModelService {
+  constructor(store: Store<AppStore>) {
+    super(modelName, store);
+  }
+}
+
+export const tabs = getCollectionReducer(modelName, initialTabs);

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json b/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
index 99ddbe5..16b4b32 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
+++ b/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
@@ -2,6 +2,8 @@
   "common.title": "Log Search",
   "common.hide": "Hide",
   "common.show": "Show",
+  "common.serviceLogs": "Service Logs",
+  "common.auditLogs": "Audit Logs",
 
   "modal.submit": "OK",
   "modal.cancel": "Cancel",


[06/12] ambari git commit: AMBARI-22228 - Remove Remote Tea Runtime library dependency from Storm binaries (Arun Mahadevan via jonathanhurley)

Posted by rl...@apache.org.
AMBARI-22228 - Remove Remote Tea Runtime library dependency from Storm binaries (Arun Mahadevan via jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 8852f33b90d4983dd9927184f0c20153eaf3b065
Parents: 3b5cbed
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Wed Oct 18 16:54:16 2017 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Wed Oct 18 17:27:11 2017 -0400

----------------------------------------------------------------------
 .../resources/stacks/HDP/2.3/upgrades/config-upgrade.xml  |  5 +++++
 .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml    |  3 +++
 .../resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml     |  1 +
 .../resources/stacks/HDP/2.4/upgrades/config-upgrade.xml  |  4 ++++
 .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml    |  3 +++
 .../resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml     |  1 +
 .../resources/stacks/HDP/2.5/upgrades/config-upgrade.xml  | 10 ++++++++++
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml    |  3 +++
 .../resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml     |  1 +
 .../HDP/2.6/services/STORM/configuration/storm-site.xml   |  6 +++---
 .../resources/stacks/HDP/2.6/upgrades/config-upgrade.xml  |  4 ++++
 .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml    |  4 ++++
 .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |  1 +
 13 files changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
index ff12150..c4a5b95 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
@@ -660,6 +660,11 @@
                      replace-with="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}"/>
           </definition>
 
+          <definition xsi:type="configure" id="storm_remove_jmxetric" summary="Removing jmxetric from childopts.">
+            <type>storm-site</type>
+            <regex-replace key="content" find=" -javaagent:.*JVM" replace-with=""/>
+          </definition>
+
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
index 4034f4b..907626d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
@@ -671,6 +671,9 @@
           <summary>Update Storm log directory in storm worker log4j</summary>
         </task>
       </execute-stage>
+      <execute-stage service="STORM" component="NIMBUS" title="Removing jmxetric from childopts">
+        <task xsi:type="configure" id="storm_remove_jmxetric"/>
+      </execute-stage>
 
       <!--ATLAS-->
       <execute-stage service="ATLAS" component="ATLAS_SERVER" title="Parameterizing Atlas Log4J Properties">

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
index 2e2c9c3..567e6e1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
@@ -1130,6 +1130,7 @@
           <task xsi:type="configure" id="storm_worker_log4j_parameterize" />
           <task xsi:type="configure" id="storm_cluster_log4j_parameterize" />
           <task xsi:type="configure" id="storm_worker_log4j_directory" />
+          <task xsi:type="configure" id="storm_remove_jmxetric"/>
         </pre-upgrade>
 
         <pre-downgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
index 5c1f33f..64121a4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
@@ -481,6 +481,10 @@
             <replace key="content" find="${sys:storm.log.dir}/${sys:logfile.name}"
                      replace-with="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}"/>
           </definition>
+          <definition xsi:type="configure" id="storm_remove_jmxetric" summary="Removing jmxetric from childopts.">
+            <type>storm-site</type>
+            <regex-replace key="content" find=" -javaagent:.*JVM" replace-with=""/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
index 4703709..faf5b76 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
@@ -591,6 +591,9 @@
           <summary>Update Storm log directory in storm worker log4j</summary>
         </task>
       </execute-stage>
+      <execute-stage service="STORM" component="NIMBUS" title="Removing jmxetric from childopts">
+        <task xsi:type="configure" id="storm_remove_jmxetric"/>
+      </execute-stage>
 
       <!-- KAFKA -->
       <execute-stage service="KAFKA" component="KAFKA_BROKER" title="Apply config changes for Kafka Broker">

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
index 35187c7..572a259 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
@@ -1092,6 +1092,7 @@
           <task xsi:type="configure" id="storm_worker_log4j_parameterize" />
           <task xsi:type="configure" id="storm_cluster_log4j_parameterize" />
           <task xsi:type="configure" id="storm_worker_log4j_directory" />
+          <task xsi:type="configure" id="storm_remove_jmxetric"/>
         </pre-upgrade>
 
         <pre-downgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index cf42e93..d138d60 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -63,6 +63,16 @@
             <regex-replace key="content" find="A1&quot; immediateFlush=&quot;false&quot;&#xA;                 fileName=&quot;\$\{sys:storm.log.dir}/\$\{sys:logfile.name}&quot;&#xA;                 filePattern=&quot;\$\{sys:storm.log.dir}/\$\{sys:logfile.name}.%i.gz&quot;&gt;&#xA;        &lt;PatternLayout&gt;&#xA;            &lt;pattern&gt;\$\{pattern}&lt;/pattern&gt;&#xA;        &lt;/PatternLayout&gt;&#xA;        &lt;Policies&gt;&#xA;            &lt;SizeBasedTriggeringPolicy size=&quot;(?:[0-9]+) MB&quot;/&gt; &lt;!-- Or every 100 MB --&gt;&#xA;        &lt;/Policies&gt;&#xA;        &lt;DefaultRolloverStrategy max=&quot;([0-9]+)"
                                          replace-with="A1&quot; immediateFlush=&quot;false&quot;&#xA;                 fileName=&quot;${sys:storm.log.dir}/${sys:logfile.name}&quot;&#xA;                 filePattern=&quot;${sys:storm.log.dir}/${sys:logfile.name}.%i.gz&quot;&gt;&#xA;        &lt;PatternLayout&gt;&#xA;            &lt;pattern&gt;${pattern}&lt;/pattern&gt;&#xA;        &lt;/PatternLayout&gt;&#xA;        &lt;Policies&gt;&#xA;            &lt;SizeBasedTriggeringPolicy size=&quot;{{storm_a1_maxfilesize}} MB&quot;/&gt; &lt;!-- Or every 100 MB --&gt;&#xA;        &lt;/Policies&gt;&#xA;        &lt;DefaultRolloverStrategy max=&quot;{{storm_a1_maxbackupindex}}"/>
           </definition>
+          <definition xsi:type="configure" id="storm_nimbus_autocred_config" summary="Update Storm's Nimbus AutoCred config">
+            <type>storm-site</type>
+            <set key="nimbus.autocredential.plugins.classes" value="['org.apache.storm.hdfs.security.AutoHDFS', 'org.apache.storm.hbase.security.AutoHBase', 'org.apache.storm.hive.security.AutoHive']" if-type="streamline-common" if-key="authorizer.class.name" if-key-state="present"/>
+            <set key="nimbus.credential.renewers.classes" value="['org.apache.storm.hdfs.security.AutoHDFS', 'org.apache.storm.hbase.security.AutoHBase', 'org.apache.storm.hive.security.AutoHive']" if-type="streamline-common" if-key="authorizer.class.name" if-key-state="present"/>
+            <set key="nimbus.credential.renewers.freq.secs" value="82800" if-type="streamline-common" if-key="authorizer.class.name" if-key-state="present"/>
+          </definition>
+          <definition xsi:type="configure" id="storm_remove_jmxetric" summary="Removing jmxetric from childopts.">
+            <type>storm-site</type>
+            <regex-replace key="content" find=" -javaagent:.*JVM" replace-with=""/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index cd69a9c..8012c90 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -526,6 +526,9 @@
           <summary>Updating the Storm cluster Log4J properties to include parameterizations</summary>
         </task>
       </execute-stage>
+      <execute-stage service="STORM" component="NIMBUS" title="Removing jmxetric from childopts">
+        <task xsi:type="configure" id="storm_remove_jmxetric"/>
+      </execute-stage>
 
       <!-- PIG -->
       <execute-stage service="PIG" component="PIG" title="Apply config changes for Pig">

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index a6d3f29..7c43948 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -1050,6 +1050,7 @@
         <pre-upgrade>
           <task xsi:type="configure" id="storm_worker_log4j_parameterize" />
           <task xsi:type="configure" id="storm_cluster_log4j_parameterize" />
+          <task xsi:type="configure" id="storm_remove_jmxetric"/>
         </pre-upgrade>
         <pre-downgrade/>
         <upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.6/services/STORM/configuration/storm-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/STORM/configuration/storm-site.xml
index 902fdc9..74262b6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/STORM/configuration/storm-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/STORM/configuration/storm-site.xml
@@ -29,7 +29,7 @@
   </property>
   <property>
     <name>nimbus.childopts</name>
-    <value>-Xmx1024m _JAAS_PLACEHOLDER -javaagent:/usr/hdp/current/storm-nimbus/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm-nimbus/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM</value>
+    <value>-Xmx1024m _JAAS_PLACEHOLDER</value>
     <description>This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon.</description>
     <value-attributes>
       <overridable>false</overridable>
@@ -38,7 +38,7 @@
   </property>
   <property>
     <name>worker.childopts</name>
-    <value>-Xmx768m _JAAS_PLACEHOLDER -javaagent:/usr/hdp/current/storm-client/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm-client/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Worker_%ID%_JVM</value>
+    <value>-Xmx768m _JAAS_PLACEHOLDER</value>
     <description>The jvm opts provided to workers launched by this supervisor. All \"%ID%\" substrings are replaced with an identifier for this worker.</description>
     <value-attributes>
       <type>multiLine</type>
@@ -47,7 +47,7 @@
   </property>
   <property>
     <name>supervisor.childopts</name>
-    <value>-Xmx256m _JAAS_PLACEHOLDER -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port={{jmxremote_port}} -javaagent:/usr/hdp/current/storm-supervisor/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm-supervisor/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
+    <value>-Xmx256m _JAAS_PLACEHOLDER -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port={{jmxremote_port}}</value>
     <description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
     <value-attributes>
       <overridable>false</overridable>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
index 91044d8..647bdeb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
@@ -132,6 +132,10 @@
             <set key="ranger.plugin.storm.ambari.cluster.name" value="{{cluster_name}}"
               if-type="ranger-storm-plugin-properties" if-key="ranger-storm-plugin-enabled" if-key-state="present"/>
           </definition>
+          <definition xsi:type="configure" id="storm_remove_jmxetric" summary="Removing jmxetric from childopts.">
+            <type>storm-site</type>
+            <regex-replace key="content" find=" -javaagent:.*JVM" replace-with=""/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
index 0b5e8c1..c9e90a9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
@@ -333,6 +333,10 @@
         <task xsi:type="configure" id="hdp_2_6_maint_ranger_storm_plugin_cluster_name"/>
       </execute-stage>
 
+      <execute-stage service="STORM" component="NIMBUS" title="Removing jmxetric from childopts">
+        <task xsi:type="configure" id="storm_remove_jmxetric"/>
+      </execute-stage>
+
       <!-- YARN -->
       <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Ranger Yarn plugin">
         <task xsi:type="configure" id="hdp_2_6_maint_ranger_yarn_plugin_cluster_name"/>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8852f33b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
index 00597c6..176143c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
@@ -979,6 +979,7 @@
       <component name="NIMBUS">
         <pre-upgrade>
           <task xsi:type="configure" id="hdp_2_6_maint_ranger_storm_plugin_cluster_name"/>
+          <task xsi:type="configure" id="storm_remove_jmxetric"/>
         </pre-upgrade>
         <pre-downgrade/> <!--  no-op to prevent config changes on downgrade -->
         <upgrade>


[08/12] ambari git commit: AMBARI-22267 - Version registration failure during patch upgrade + Debian + Oracle run (jonathanhurley)

Posted by rl...@apache.org.
AMBARI-22267 - Version registration failure during patch upgrade + Debian + Oracle run (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: b4eddc9770eda0e47fe025254ba6143a581a7855
Parents: 2ae81d9
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Wed Oct 18 19:27:34 2017 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Wed Oct 18 19:41:23 2017 -0400

----------------------------------------------------------------------
 .../ambari/server/orm/entities/RepositoryVersionEntity.java    | 5 +----
 .../ambari/server/orm/entities/ServiceDesiredStateEntity.java  | 6 +++---
 2 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4eddc97/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
index b4f59dc..7eedc4d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
@@ -21,13 +21,11 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
-import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.EnumType;
 import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
@@ -92,7 +90,7 @@ import com.google.inject.Provider;
         query = "SELECT repositoryVersion FROM RepositoryVersionEntity repositoryVersion WHERE repositoryVersion.version = :version ORDER BY repositoryVersion.id DESC"),
     @NamedQuery(
         name = "findByServiceDesiredVersion",
-        query = "SELECT DISTINCT sd.desiredRepositoryVersion from ServiceDesiredStateEntity sd WHERE sd.desiredRepositoryVersion IN ?1") })
+        query = "SELECT repositoryVersion FROM RepositoryVersionEntity repositoryVersion WHERE repositoryVersion IN (SELECT DISTINCT sd1.desiredRepositoryVersion FROM ServiceDesiredStateEntity sd1 WHERE sd1.desiredRepositoryVersion IN ?1)") })
 @StaticallyInject
 public class RepositoryVersionEntity {
   private static final Logger LOG = LoggerFactory.getLogger(RepositoryVersionEntity.class);
@@ -129,7 +127,6 @@ public class RepositoryVersionEntity {
   @Enumerated(value = EnumType.STRING)
   private RepositoryType type = RepositoryType.STANDARD;
 
-  @Basic(fetch=FetchType.LAZY)
   @Lob
   @Column(name="version_xml", insertable = true, updatable = true)
   private String versionXml;

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4eddc97/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
index fc26478..dbb999e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
@@ -39,20 +39,20 @@ import org.apache.commons.lang.builder.EqualsBuilder;
 @Entity
 public class ServiceDesiredStateEntity {
 
-  @Column(name = "cluster_id", nullable = false, insertable = false, updatable = false, length = 10)
   @Id
+  @Column(name = "cluster_id", nullable = false, insertable = false, updatable = false, length = 10)  
   private Long clusterId;
 
-  @Column(name = "service_name", nullable = false, insertable = false, updatable = false)
   @Id
+  @Column(name = "service_name", nullable = false, insertable = false, updatable = false)
   private String serviceName;
 
   @Column(name = "desired_state", nullable = false, insertable = true, updatable = true)
   @Enumerated(value = EnumType.STRING)
   private State desiredState = State.INIT;
 
-  @Column(name = "desired_host_role_mapping", nullable = false, insertable = true, updatable = true, length = 10)
   @Basic
+  @Column(name = "desired_host_role_mapping", nullable = false, insertable = true, updatable = true, length = 10)  
   private int desiredHostRoleMapping = 0;
 
   @Column(name = "maintenance_state", nullable = false, insertable = true, updatable = true)


[12/12] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-20859

Posted by rl...@apache.org.
Merge branch 'trunk' into branch-feature-AMBARI-20859


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: d57ebbc2d28ad2b9ff1697125426798d7fb7a624
Parents: 06676d6 e76b563
Author: Robert Levas <rl...@hortonworks.com>
Authored: Thu Oct 19 16:10:14 2017 -0400
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Thu Oct 19 16:10:14 2017 -0400

----------------------------------------------------------------------
 .../ui/admin-web/app/scripts/i18n.config.js     |   2 +-
 .../ambari-logsearch-web/src/app/app.module.ts  |   4 +
 .../src/app/classes/filtering.ts                | 369 +++++++++++++++++++
 .../src/app/classes/models/app-state.ts         |  14 +-
 .../src/app/classes/models/store.ts             |  12 +-
 .../src/app/classes/models/tab.ts               |  53 +++
 .../collapsible-panel.component.spec.ts         |  14 +-
 .../dropdown-button.component.spec.ts           |  18 +-
 .../dropdown-list.component.spec.ts             |   7 +-
 .../filter-button.component.spec.ts             |  18 +-
 .../filter-dropdown.component.spec.ts           |  18 +-
 .../filters-panel/filters-panel.component.html  |  17 +-
 .../filters-panel.component.spec.ts             |   5 +-
 .../filters-panel/filters-panel.component.ts    |  44 ++-
 .../log-context/log-context.component.spec.ts   |   5 +-
 .../logs-container.component.html               |  17 +-
 .../logs-container.component.less               |   7 +-
 .../logs-container.component.spec.ts            |  11 +-
 .../logs-container/logs-container.component.ts  | 108 +++---
 .../logs-list/logs-list.component.html          |  24 +-
 .../components/logs-list/logs-list.component.ts |  25 +-
 .../main-container.component.html               |  10 +-
 .../main-container.component.less               |   4 -
 .../main-container.component.spec.ts            |  15 +-
 .../main-container/main-container.component.ts  |  51 +--
 .../menu-button/menu-button.component.spec.ts   |  18 +-
 .../pagination/pagination.component.html        |   2 +-
 .../pagination/pagination.component.ts          |   6 +-
 .../src/app/components/tabs/tabs.component.html |  25 ++
 .../src/app/components/tabs/tabs.component.less |  22 ++
 .../app/components/tabs/tabs.component.spec.ts  | 125 +++++++
 .../src/app/components/tabs/tabs.component.ts   |  48 +++
 .../time-histogram.component.less               |   1 +
 .../time-range-picker.component.spec.ts         |  13 +-
 .../time-range-picker.component.ts              |   4 +-
 .../timezone-picker.component.spec.ts           |  18 +-
 .../services/component-actions.service.spec.ts  |   5 +-
 .../app/services/component-actions.service.ts   |  33 +-
 .../component-generator.service.spec.ts         |   7 +-
 .../src/app/services/filtering.service.spec.ts  |   3 +
 .../src/app/services/filtering.service.ts       | 341 +----------------
 .../app/services/logs-container.service.spec.ts |   5 +-
 .../src/app/services/logs-container.service.ts  |  60 ++-
 .../app/services/storage/reducers.service.ts    |   4 +-
 .../src/app/services/storage/tabs.service.ts    |  33 ++
 .../src/assets/i18n/en.json                     |   2 +
 .../ambari/server/orm/DBAccessorImpl.java       |   8 +-
 .../orm/entities/RepositoryVersionEntity.java   |   5 +-
 .../orm/entities/ServiceDesiredStateEntity.java |   6 +-
 .../server/upgrade/UpgradeCatalog260.java       |   6 +
 .../YARN/3.0.0.3.0/service_advisor.py           |   3 +-
 .../HDP/2.0.6/properties/stack_packages.json    |   3 +-
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml  |   5 +
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |   3 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml     |   1 +
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml  |   4 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |   3 +
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml     |   1 +
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |  10 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   3 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml     |   1 +
 .../services/STORM/configuration/storm-site.xml |   6 +-
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |   4 +
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   4 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |   1 +
 ambari-web/app/app.js                           |  24 +-
 .../models/configs/service_config_version.js    |   9 +-
 ambari-web/app/models/host_stack_version.js     |   4 +-
 .../common/configs/config_history_flow.hbs      |   8 +-
 .../common/configs/service_version_box.hbs      |   8 +-
 .../templates/common/host_progress_popup.hbs    |   6 +-
 .../modal_popups/widget_browser_popup.hbs       |   6 +-
 ambari-web/app/templates/experimental.hbs       |   6 +-
 .../main/admin/stack_upgrade/versions.hbs       |   6 +-
 ambari-web/app/templates/main/host.hbs          |   4 +-
 .../templates/main/host/bulk_operation_menu.hbs |   4 +-
 .../main/host/details/host_component.hbs        | 176 ++++-----
 .../app/templates/main/host/stack_versions.hbs  |   4 +-
 ambari-web/app/templates/main/host/summary.hbs  | 120 +++---
 ambari-web/app/utils/helper.js                  |  23 ++
 ambari-web/app/views/main/service/item.js       |   2 +-
 ambari-web/test/views/main/service/item_test.js |   6 +-
 docs/pom.xml                                    |  12 +
 83 files changed, 1380 insertions(+), 772 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d57ebbc2/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
----------------------------------------------------------------------


[02/12] ambari git commit: AMBARI-22265. Mahout service check failure after patch upgrade (ncole)

Posted by rl...@apache.org.
AMBARI-22265. Mahout service check failure after patch upgrade (ncole)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 29d1139235ddfa9e21909aa188ef2dcb30014bfb
Parents: 84342f6
Author: Nate Cole <nc...@hortonworks.com>
Authored: Wed Oct 18 13:34:43 2017 -0400
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Wed Oct 18 13:34:43 2017 -0400

----------------------------------------------------------------------
 .../resources/stacks/HDP/2.0.6/properties/stack_packages.json     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/29d11392/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
index b8655d7..20b12a9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
@@ -1177,7 +1177,8 @@
     },
     "upgrade-dependencies" : {
       "YARN": ["TEZ"],
-      "TEZ": ["YARN"]
+      "TEZ": ["YARN"],
+      "MAHOUT": ["MAPREDUCE2"]
     }    
   }
 }


[11/12] ambari git commit: AMBARI-22216. Ambari Schema Upgrade Failed during Ambari Upgrade (configuration: 2.5.2.0 -> 2.6.0.0 upgrade) (dlysnichenko)

Posted by rl...@apache.org.
AMBARI-22216. Ambari Schema Upgrade Failed during Ambari Upgrade (configuration: 2.5.2.0 -> 2.6.0.0 upgrade) (dlysnichenko)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: e76b5636ffd345f13ed7a98f7ee8f5fd5d9eb2d6
Parents: 15cec1c
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Thu Oct 19 18:56:31 2017 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Thu Oct 19 18:58:03 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/orm/DBAccessorImpl.java    | 8 ++++++--
 .../org/apache/ambari/server/upgrade/UpgradeCatalog260.java  | 6 ++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e76b5636/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
index faa58f2..d36367d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
@@ -956,8 +956,12 @@ public class DBAccessorImpl implements DBAccessor {
 
   @Override
   public void dropTable(String tableName) throws SQLException {
-    String query = dbmsHelper.getDropTableStatement(tableName);
-    executeQuery(query);
+    if (tableExists(tableName)){
+      String query = dbmsHelper.getDropTableStatement(tableName);
+      executeQuery(query);
+    } else {
+      LOG.warn("{} table doesn't exists, skipping", tableName);
+    }
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e76b5636/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 71a0ff3..ffcf668 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -156,6 +156,8 @@ public class UpgradeCatalog260 extends AbstractUpgradeCatalog {
   public static final String FK_SERVICEDESIREDSTATE_DESIRED_STACK_ID = "FK_servicedesiredstate_desired_stack_id";
   public static final String FK_HOSTCOMPONENTDESIREDSTATE_DESIRED_STACK_ID = "FK_hostcomponentdesiredstate_desired_stack_id";
   public static final String FK_HOSTCOMPONENTSTATE_CURRENT_STACK_ID = "FK_hostcomponentstate_current_stack_id";
+  public static final String FK_UPGRADE_FROM_REPO_VERSION_ID = "FK_upgrade_from_repo_version_id";
+  public static final String FK_UPGRADE_TO_REPO_VERSION_ID = "FK_upgrade_to_repo_version_id";
 
 
   /**
@@ -213,8 +215,12 @@ public class UpgradeCatalog260 extends AbstractUpgradeCatalog {
    * {@value #FK_SERVICEDESIREDSTATE_DESIRED_STACK_ID}
    * {@value #FK_HOSTCOMPONENTDESIREDSTATE_DESIRED_STACK_ID}
    * {@value #FK_HOSTCOMPONENTSTATE_CURRENT_STACK_ID}
+   * {@value #FK_UPGRADE_FROM_REPO_VERSION_ID}
+   * {@value #FK_UPGRADE_TO_REPO_VERSION_ID}
    */
   private void dropBrokenFK() throws SQLException {
+    dbAccessor.dropFKConstraint(UPGRADE_TABLE, FK_UPGRADE_FROM_REPO_VERSION_ID);
+    dbAccessor.dropFKConstraint(UPGRADE_TABLE, FK_UPGRADE_TO_REPO_VERSION_ID);
     dbAccessor.dropFKConstraint(SERVICE_COMPONENT_DESIRED_STATE_TABLE, FK_SERVICECOMPONENTDESIREDSTATE_DESIRED_STACK_ID);
     dbAccessor.dropFKConstraint(SERVICE_DESIRED_STATE_TABLE, FK_SERVICEDESIREDSTATE_DESIRED_STACK_ID);
     dbAccessor.dropFKConstraint(HOST_COMPONENT_DESIRED_STATE_TABLE, FK_HOSTCOMPONENTDESIREDSTATE_DESIRED_STACK_ID);


[10/12] ambari git commit: AMBARI-22269 Log Search UI: provide navigation between Service and Audit Logs. (ababiichuk)

Posted by rl...@apache.org.
AMBARI-22269 Log Search UI: provide navigation between Service and Audit Logs. (ababiichuk)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 15cec1cb7d6a43361c82e2de31bf320a33005b37
Parents: b4eddc9
Author: ababiichuk <ab...@hortonworks.com>
Authored: Thu Oct 19 15:11:48 2017 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Thu Oct 19 15:11:48 2017 +0300

----------------------------------------------------------------------
 .../ambari-logsearch-web/src/app/app.module.ts  |   4 +
 .../src/app/classes/filtering.ts                | 369 +++++++++++++++++++
 .../src/app/classes/models/app-state.ts         |  14 +-
 .../src/app/classes/models/store.ts             |  12 +-
 .../src/app/classes/models/tab.ts               |  53 +++
 .../collapsible-panel.component.spec.ts         |  14 +-
 .../dropdown-button.component.spec.ts           |  18 +-
 .../dropdown-list.component.spec.ts             |   7 +-
 .../filter-button.component.spec.ts             |  18 +-
 .../filter-dropdown.component.spec.ts           |  18 +-
 .../filters-panel/filters-panel.component.html  |  17 +-
 .../filters-panel.component.spec.ts             |   5 +-
 .../filters-panel/filters-panel.component.ts    |  44 ++-
 .../log-context/log-context.component.spec.ts   |   5 +-
 .../logs-container.component.html               |  17 +-
 .../logs-container.component.less               |   7 +-
 .../logs-container.component.spec.ts            |  11 +-
 .../logs-container/logs-container.component.ts  | 108 +++---
 .../logs-list/logs-list.component.html          |  24 +-
 .../components/logs-list/logs-list.component.ts |  25 +-
 .../main-container.component.html               |  10 +-
 .../main-container.component.less               |   4 -
 .../main-container.component.spec.ts            |  15 +-
 .../main-container/main-container.component.ts  |  51 +--
 .../menu-button/menu-button.component.spec.ts   |  18 +-
 .../pagination/pagination.component.html        |   2 +-
 .../pagination/pagination.component.ts          |   6 +-
 .../src/app/components/tabs/tabs.component.html |  25 ++
 .../src/app/components/tabs/tabs.component.less |  22 ++
 .../app/components/tabs/tabs.component.spec.ts  | 125 +++++++
 .../src/app/components/tabs/tabs.component.ts   |  48 +++
 .../time-histogram.component.less               |   1 +
 .../time-range-picker.component.spec.ts         |  13 +-
 .../time-range-picker.component.ts              |   4 +-
 .../timezone-picker.component.spec.ts           |  18 +-
 .../services/component-actions.service.spec.ts  |   5 +-
 .../app/services/component-actions.service.ts   |  33 +-
 .../component-generator.service.spec.ts         |   7 +-
 .../src/app/services/filtering.service.spec.ts  |   3 +
 .../src/app/services/filtering.service.ts       | 341 +----------------
 .../app/services/logs-container.service.spec.ts |   5 +-
 .../src/app/services/logs-container.service.ts  |  60 ++-
 .../app/services/storage/reducers.service.ts    |   4 +-
 .../src/app/services/storage/tabs.service.ts    |  33 ++
 .../src/assets/i18n/en.json                     |   2 +
 45 files changed, 1080 insertions(+), 565 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 12b95a7..37cd869 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -53,6 +53,7 @@ import {ClustersService} from '@app/services/storage/clusters.service';
 import {ComponentsService} from '@app/services/storage/components.service';
 import {ServiceLogsFieldsService} from '@app/services/storage/service-logs-fields.service';
 import {AuditLogsFieldsService} from '@app/services/storage/audit-logs-fields.service';
+import {TabsService} from '@app/services/storage/tabs.service';
 import {reducer} from '@app/services/storage/reducers.service';
 
 import {AppComponent} from '@app/components/app.component';
@@ -80,6 +81,7 @@ import {TimeRangePickerComponent} from '@app/components/time-range-picker/time-r
 import {DatePickerComponent} from '@app/components/date-picker/date-picker.component';
 import {LogContextComponent} from '@app/components/log-context/log-context.component';
 import {LogFileEntryComponent} from '@app/components/log-file-entry/log-file-entry.component';
+import {TabsComponent} from '@app/components/tabs/tabs.component';
 
 import {TimeZoneAbbrPipe} from '@app/pipes/timezone-abbr.pipe';
 import {TimerSecondsPipe} from '@app/pipes/timer-seconds.pipe';
@@ -131,6 +133,7 @@ export function getXHRBackend(injector: Injector, browser: BrowserXhr, xsrf: XSR
     DatePickerComponent,
     LogContextComponent,
     LogFileEntryComponent,
+    TabsComponent,
     TimeZoneAbbrPipe,
     TimerSecondsPipe
   ],
@@ -173,6 +176,7 @@ export function getXHRBackend(injector: Injector, browser: BrowserXhr, xsrf: XSR
     ComponentsService,
     ServiceLogsFieldsService,
     AuditLogsFieldsService,
+    TabsService,
     {
       provide: XHRBackend,
       useFactory: getXHRBackend,

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
new file mode 100644
index 0000000..dde144b
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
@@ -0,0 +1,369 @@
+/**
+ * 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.
+ */
+
+import {FormGroup, FormControl} from '@angular/forms';
+import {ListItem} from '@app/classes/list-item';
+
+export interface TimeUnit {
+  type: 'CURRENT' | 'LAST' | 'PAST';
+  unit: 'ms' | 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'Y';
+  interval?: number;
+}
+
+export interface TimeUnitListItem extends ListItem {
+  value: TimeUnit;
+}
+
+export interface FilterCondition {
+  label?: string;
+  options?: (ListItem | TimeUnitListItem[])[];
+  defaultValue?: string | number | {[key: string]: any};
+  defaultLabel?: string;
+  iconClass?: string;
+}
+
+const paginationOptions: string[] = ['10', '25', '50', '100'];
+
+export const filters: {[key: string]: FilterCondition} = {
+  clusters: {
+    label: 'filter.clusters',
+    options: [],
+    defaultValue: ''
+  },
+  timeRange: {
+    options: [
+      [
+        {
+          label: 'filter.timeRange.7d',
+          value: {
+            type: 'LAST',
+            unit: 'd',
+            interval: 7
+          }
+        },
+        {
+          label: 'filter.timeRange.30d',
+          value: {
+            type: 'LAST',
+            unit: 'd',
+            interval: 30
+          }
+        },
+        {
+          label: 'filter.timeRange.60d',
+          value: {
+            type: 'LAST',
+            unit: 'd',
+            interval: 60
+          }
+        },
+        {
+          label: 'filter.timeRange.90d',
+          value: {
+            type: 'LAST',
+            unit: 'd',
+            interval: 90
+          }
+        },
+        {
+          label: 'filter.timeRange.6m',
+          value: {
+            type: 'LAST',
+            unit: 'M',
+            interval: 6
+          }
+        },
+        {
+          label: 'filter.timeRange.1y',
+          value: {
+            type: 'LAST',
+            unit: 'Y',
+            interval: 1
+          }
+        },
+        {
+          label: 'filter.timeRange.2y',
+          value: {
+            type: 'LAST',
+            unit: 'Y',
+            interval: 2
+          }
+        },
+        {
+          label: 'filter.timeRange.5y',
+          value: {
+            type: 'LAST',
+            unit: 'Y',
+            interval: 5
+          }
+        }
+      ],
+      [
+        {
+          label: 'filter.timeRange.yesterday',
+          value: {
+            type: 'PAST',
+            unit: 'd'
+          }
+        },
+        // TODO implement time range calculation
+        /*
+         {
+         label: 'filter.timeRange.beforeYesterday',
+         value: {
+         type: 'PAST',
+         unit: 'd'
+         }
+         },
+         {
+         label: 'filter.timeRange.thisDayLastWeek',
+         value: {
+         type: 'PAST',
+         unit: 'd'
+         }
+         },
+         */
+        {
+          label: 'filter.timeRange.previousWeek',
+          value: {
+            type: 'PAST',
+            unit: 'w'
+          }
+        },
+        {
+          label: 'filter.timeRange.previousMonth',
+          value: {
+            type: 'PAST',
+            unit: 'M'
+          }
+        },
+        {
+          label: 'filter.timeRange.previousYear',
+          value: {
+            type: 'PAST',
+            unit: 'Y'
+          }
+        }
+      ],
+      [
+        {
+          label: 'filter.timeRange.today',
+          value: {
+            type: 'CURRENT',
+            unit: 'd'
+          }
+        },
+        {
+          label: 'filter.timeRange.thisWeek',
+          value: {
+            type: 'CURRENT',
+            unit: 'w'
+          }
+        },
+        {
+          label: 'filter.timeRange.thisMonth',
+          value: {
+            type: 'CURRENT',
+            unit: 'M'
+          }
+        },
+        {
+          label: 'filter.timeRange.thisYear',
+          value: {
+            type: 'CURRENT',
+            unit: 'Y'
+          }
+        }
+      ],
+      [
+        {
+          label: 'filter.timeRange.5min',
+          value: {
+            type: 'LAST',
+            unit: 'm',
+            interval: 5
+          }
+        },
+        {
+          label: 'filter.timeRange.15min',
+          value: {
+            type: 'LAST',
+            unit: 'm',
+            interval: 15
+          }
+        },
+        {
+          label: 'filter.timeRange.30min',
+          value: {
+            type: 'LAST',
+            unit: 'm',
+            interval: 30
+          }
+        },
+        {
+          label: 'filter.timeRange.1hr',
+          value: {
+            type: 'LAST',
+            unit: 'h',
+            interval: 1
+          }
+        },
+        {
+          label: 'filter.timeRange.3hr',
+          value: {
+            type: 'LAST',
+            unit: 'h',
+            interval: 3
+          }
+        },
+        {
+          label: 'filter.timeRange.6hr',
+          value: {
+            type: 'LAST',
+            unit: 'h',
+            interval: 6
+          }
+        },
+        {
+          label: 'filter.timeRange.12hr',
+          value: {
+            type: 'LAST',
+            unit: 'h',
+            interval: 12
+          }
+        },
+        {
+          label: 'filter.timeRange.24hr',
+          value: {
+            type: 'LAST',
+            unit: 'h',
+            interval: 24
+          }
+        },
+      ]
+    ],
+    defaultValue: {
+      type: 'LAST',
+      unit: 'h',
+      interval: 1
+    },
+    defaultLabel: 'filter.timeRange.1hr'
+  },
+  components: {
+    label: 'filter.components',
+    iconClass: 'fa fa-cubes',
+    options: [],
+    defaultValue: ''
+  },
+  levels: {
+    label: 'filter.levels',
+    iconClass: 'fa fa-sort-amount-asc',
+    options: [
+      {
+        label: 'levels.fatal',
+        value: 'FATAL'
+      },
+      {
+        label: 'levels.error',
+        value: 'ERROR'
+      },
+      {
+        label: 'levels.warn',
+        value: 'WARN'
+      },
+      {
+        label: 'levels.info',
+        value: 'INFO'
+      },
+      {
+        label: 'levels.debug',
+        value: 'DEBUG'
+      },
+      {
+        label: 'levels.trace',
+        value: 'TRACE'
+      },
+      {
+        label: 'levels.unknown',
+        value: 'UNKNOWN'
+      }
+    ],
+    defaultValue: ''
+  },
+  hosts: {
+    label: 'filter.hosts',
+    iconClass: 'fa fa-server',
+    options: [],
+    defaultValue: ''
+  },
+  sorting: {
+    label: 'sorting.title',
+    options: [
+      {
+        label: 'sorting.time.asc',
+        value: {
+          key: 'logtime',
+          type: 'asc'
+        }
+      },
+      {
+        label: 'sorting.time.desc',
+        value: {
+          key: 'logtime',
+          type: 'desc'
+        }
+      }
+    ],
+    defaultValue: '',
+    defaultLabel: ''
+  },
+  pageSize: {
+    label: 'pagination.title',
+    options: paginationOptions.map((option: string): ListItem => {
+      return {
+        label: option,
+        value: option
+      }
+    }),
+    defaultValue: '10',
+    defaultLabel: '10'
+  },
+  page: {
+    defaultValue: 0
+  },
+  query: {}
+};
+
+export const filtersFormItemsMap: {[key: string]: string[]} = {
+  serviceLogs: ['clusters', 'timeRange', 'components', 'levels', 'hosts', 'sorting', 'pageSize', 'page', 'query'],
+  auditLogs: ['clusters', 'timeRange', 'sorting', 'pageSize', 'page', 'query'] // TODO add all the required fields
+};
+
+export const getFiltersForm = (listType: string): FormGroup => {
+  const itemsList = filtersFormItemsMap[listType],
+    keys = Object.keys(filters).filter((key: string): boolean => itemsList.indexOf(key) > -1),
+    items = keys.reduce((currentObject: any, key: string): any => {
+      let formControl = new FormControl(),
+        item = {
+          [key]: formControl
+        };
+      formControl.setValue(filters[key].defaultValue);
+      return Object.assign(currentObject, item);
+    }, {});
+  return new FormGroup(items);
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
index beeb670..2c5c083 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
@@ -16,28 +16,28 @@
  * limitations under the License.
  */
 
+import {FormGroup} from '@angular/forms';
 import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
+import {Tab, initialTabs} from '@app/classes/models/tab';
 
 export interface AppState {
   isAuthorized: boolean;
   isInitialLoading: boolean;
   isLoginInProgress: boolean;
-  isAuditLogsSet: boolean;
-  isServiceLogsSet: boolean;
   activeLogsType?: string;
   isServiceLogsFileView: boolean;
   isServiceLogContextView: boolean;
   activeLog: ActiveServiceLogEntry | null;
+  activeFiltersForm: FormGroup;
 }
 
 export const initialState: AppState = {
   isAuthorized: false,
   isInitialLoading: false,
   isLoginInProgress: false,
-  isAuditLogsSet: false,
-  isServiceLogsSet: false,
-  activeLogsType: 'serviceLogs', // TODO implement setting the parameter depending on user's navigation
+  activeLogsType: 'serviceLogs',
   isServiceLogsFileView: false,
   isServiceLogContextView: false,
-  activeLog: null
-}
+  activeLog: null,
+  activeFiltersForm: initialTabs.find((tab: Tab): boolean => tab.isActive).appState.activeFiltersForm
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/store.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/store.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/store.ts
index c62d3ee..d912b35 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/store.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/store.ts
@@ -29,6 +29,7 @@ import {UserConfig} from '@app/classes/models/user-config';
 import {Filter} from '@app/classes/models/filter';
 import {AuditLogField} from '@app/classes/models/audit-log-field';
 import {ServiceLogField} from '@app/classes/models/service-log-field';
+import {Tab} from '@app/classes/models/tab';
 
 export const storeActions = {
   'ARRAY.ADD': 'ADD',
@@ -56,6 +57,7 @@ export interface AppStore {
   components: Node[];
   serviceLogsFields: ServiceLogField[];
   auditLogsFields: AuditLogField[];
+  tabs: Tab[];
 }
 
 export class ModelService {
@@ -115,7 +117,7 @@ export class CollectionModelService extends ModelService {
     });
   }
 
-  mapCollection(modifier: (item: any) => {}): void {
+  mapCollection(modifier: (item: any) => any): void {
     this.store.dispatch({
       type: `${storeActions['ARRAY.MAP']}_${this.modelName}`,
       payload: {
@@ -124,6 +126,14 @@ export class CollectionModelService extends ModelService {
     });
   }
 
+  findInCollection(findFunction): Observable<any> {
+    return this.getAll().map((result: any[]): any => result.find(findFunction));
+  }
+
+  filterCollection(filterFunction): Observable<any[]> {
+    return this.getAll().map((result: any[]): any[] => result.filter(filterFunction));
+  }
+
 }
 
 export class ObjectModelService extends ModelService {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/tab.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/tab.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/tab.ts
new file mode 100644
index 0000000..bb8028a
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/tab.ts
@@ -0,0 +1,53 @@
+/**
+ * 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.
+ */
+
+import {getFiltersForm} from '@app/classes/filtering';
+
+export interface Tab {
+  id: string;
+  type: string;
+  isActive: boolean;
+  isCloseable?: boolean;
+  label: string;
+  appState: any;
+}
+
+export const initialTabs: Tab[] = [
+  {
+    id: 'serviceLogs',
+    type: 'serviceLogs',
+    isActive: true,
+    label: 'common.serviceLogs',
+    appState: {
+      activeLogsType: 'serviceLogs',
+      isServiceLogsFileView: false,
+      activeFiltersForm: getFiltersForm('serviceLogs')
+    }
+  },
+  {
+    id: 'auditLogs',
+    type: 'auditLogs',
+    isActive: false,
+    label: 'common.auditLogs',
+    appState: {
+      activeLogsType: 'auditLogs',
+      isServiceLogsFileView: false,
+      activeFiltersForm: getFiltersForm('auditLogs')
+    }
+  }
+];

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/collapsible-panel/collapsible-panel.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/collapsible-panel/collapsible-panel.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/collapsible-panel/collapsible-panel.component.spec.ts
index 60b7d63..5f5f1b0 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/collapsible-panel/collapsible-panel.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/collapsible-panel/collapsible-panel.component.spec.ts
@@ -21,7 +21,6 @@ import {By} from '@angular/platform-browser';
 import {TranslationModules} from '@app/test-config.spec';
 import {HttpClientService} from '@app/services/http-client.service';
 
-//import {AppModule} from '@app/app.module';
 import {CollapsiblePanelComponent} from './collapsible-panel.component';
 
 describe('CollapsiblePanelComponent', () => {
@@ -31,11 +30,22 @@ describe('CollapsiblePanelComponent', () => {
   let el: HTMLElement;
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [CollapsiblePanelComponent],
       imports: TranslationModules,
       providers: [
-        HttpClientService
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        }
       ]
     })
     .compileComponents();

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
index e795986..f11ca09 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
@@ -31,6 +31,7 @@ import {ServiceLogsService, serviceLogs} from '@app/services/storage/service-log
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
 import {ComponentActionsService} from '@app/services/component-actions.service';
@@ -44,6 +45,14 @@ describe('DropdownButtonComponent', () => {
   let fixture: ComponentFixture<DropdownButtonComponent>;
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [DropdownButtonComponent],
       imports: [
@@ -58,7 +67,8 @@ describe('DropdownButtonComponent', () => {
           serviceLogs,
           serviceLogsFields,
           serviceLogsHistogramData,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -74,10 +84,14 @@ describe('DropdownButtonComponent', () => {
         ServiceLogsFieldsService,
         ServiceLogsHistogramDataService,
         ServiceLogsTruncatedService,
+        TabsService,
         FilteringService,
         UtilsService,
         ComponentActionsService,
-        HttpClientService,
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        },
         LogsContainerService
       ],
       schemas: [NO_ERRORS_SCHEMA]

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.spec.ts
index 759a0e1..5455e67 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.spec.ts
@@ -30,6 +30,7 @@ import {AppStateService, appState} from '@app/services/storage/app-state.service
 import {ClustersService, clusters} from '@app/services/storage/clusters.service';
 import {ComponentsService, components} from '@app/services/storage/components.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {ComponentGeneratorService} from '@app/services/component-generator.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {HttpClientService} from '@app/services/http-client.service';
@@ -66,7 +67,8 @@ describe('DropdownListComponent', () => {
           appState,
           clusters,
           components,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         })
       ],
       providers: [
@@ -88,7 +90,8 @@ describe('DropdownListComponent', () => {
         AppStateService,
         ClustersService,
         ComponentsService,
-        ServiceLogsTruncatedService
+        ServiceLogsTruncatedService,
+        TabsService
       ]
     })
     .compileComponents();

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.spec.ts
index 4e6f460..3e40455 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.spec.ts
@@ -31,6 +31,7 @@ import {ServiceLogsService, serviceLogs} from '@app/services/storage/service-log
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {ComponentActionsService} from '@app/services/component-actions.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
@@ -44,6 +45,14 @@ describe('FilterButtonComponent', () => {
   let fixture: ComponentFixture<FilterButtonComponent>;
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [FilterButtonComponent],
       imports: [
@@ -58,7 +67,8 @@ describe('FilterButtonComponent', () => {
           serviceLogs,
           serviceLogsFields,
           serviceLogsHistogramData,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -74,10 +84,14 @@ describe('FilterButtonComponent', () => {
         ServiceLogsFieldsService,
         ServiceLogsHistogramDataService,
         ServiceLogsTruncatedService,
+        TabsService,
         ComponentActionsService,
         FilteringService,
         UtilsService,
-        HttpClientService,
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        },
         LogsContainerService
       ],
       schemas: [NO_ERRORS_SCHEMA]

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-dropdown/filter-dropdown.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-dropdown/filter-dropdown.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-dropdown/filter-dropdown.component.spec.ts
index f5b9330..c294e8e 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-dropdown/filter-dropdown.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-dropdown/filter-dropdown.component.spec.ts
@@ -27,6 +27,7 @@ import {ServiceLogsService, serviceLogs} from '@app/services/storage/service-log
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
 import {ComponentActionsService} from '@app/services/component-actions.service';
@@ -56,6 +57,14 @@ describe('FilterDropdownComponent', () => {
   };
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [FilterDropdownComponent],
       imports: [
@@ -67,7 +76,8 @@ describe('FilterDropdownComponent', () => {
           serviceLogs,
           serviceLogsFields,
           serviceLogsHistogramData,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -80,6 +90,7 @@ describe('FilterDropdownComponent', () => {
         ServiceLogsFieldsService,
         ServiceLogsHistogramDataService,
         ServiceLogsTruncatedService,
+        TabsService,
         {
           provide: FilteringService,
           useValue: filtering
@@ -87,7 +98,10 @@ describe('FilterDropdownComponent', () => {
         UtilsService,
         ComponentActionsService,
         LogsContainerService,
-        HttpClientService
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        }
       ],
       schemas: [NO_ERRORS_SCHEMA]
     })

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
index 22ec8fe..fa739a4 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<form class="col-md-12" [formGroup]="filtersForm">
+<form [formGroup]="filtersForm">
   <div class="form-inline filter-input-container col-md-8">
     <filter-dropdown [label]="filters.clusters.label" formControlName="clusters" [options]="filters.clusters.options"
                      [defaultLabel]="filters.clusters.defaultLabel" [isMultipleChoice]="true"
@@ -33,15 +33,16 @@
   <div class="filter-buttons col-md-4">
     <dropdown-button [options]="searchBoxItems" iconClass="fa fa-search-minus" label="filter.excluded"
                      [hideCaret]="true" [showSelectedValue]="false" action="proceedWithExclude"></dropdown-button>
-    <filter-button formControlName="hosts" label="{{filters.hosts.label | translate}}"
-                   [iconClass]="filters.hosts.iconClass" [subItems]="filters.hosts.options"
-                   [isMultipleChoice]="true" [isRightAlign]="true"
+    <filter-button *ngIf="isFilterConditionDisplayed('hosts')" formControlName="hosts"
+                   label="{{filters.hosts.label | translate}}" [iconClass]="filters.hosts.iconClass"
+                   [subItems]="filters.hosts.options" [isMultipleChoice]="true" [isRightAlign]="true"
                    additionalLabelComponentSetter="getDataForHostsNodeBar"></filter-button>
-    <filter-button formControlName="components" label="{{filters.components.label | translate}}"
-                   [iconClass]="filters.components.iconClass" [subItems]="filters.components.options"
-                   [isMultipleChoice]="true" [isRightAlign]="true"
+    <filter-button *ngIf="isFilterConditionDisplayed('components')" formControlName="components"
+                   label="{{filters.components.label | translate}}" [iconClass]="filters.components.iconClass"
+                   [subItems]="filters.components.options" [isMultipleChoice]="true" [isRightAlign]="true"
                    additionalLabelComponentSetter="getDataForComponentsNodeBar"></filter-button>
-    <filter-button formControlName="levels" label="{{filters.levels.label | translate}}" [iconClass]="filters.levels.iconClass"
+    <filter-button *ngIf="isFilterConditionDisplayed('levels')" formControlName="levels"
+                   label="{{filters.levels.label | translate}}" [iconClass]="filters.levels.iconClass"
                    [subItems]="filters.levels.options" [isMultipleChoice]="true" [isRightAlign]="true"></filter-button>
     <menu-button *ngIf="!captureSeconds" label="{{'filter.capture' | translate}}" iconClass="fa fa-caret-right"
                  action="startCapture"></menu-button>

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
index 0643ea6..0bb0204 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
@@ -31,6 +31,7 @@ import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {AppStateService, appState} from '@app/services/storage/app-state.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {HttpClientService} from '@app/services/http-client.service';
 import {UtilsService} from '@app/services/utils.service';
@@ -69,7 +70,8 @@ describe('FiltersPanelComponent', () => {
           serviceLogsFields,
           serviceLogsHistogramData,
           appState,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -85,6 +87,7 @@ describe('FiltersPanelComponent', () => {
         ServiceLogsHistogramDataService,
         AppStateService,
         ServiceLogsTruncatedService,
+        TabsService,
         FilteringService,
         LogsContainerService,
         {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
index 5eef03e..9601a0e 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
@@ -16,12 +16,14 @@
  * limitations under the License.
  */
 
-import {Component} from '@angular/core';
+import {Component, Input} from '@angular/core';
 import {FormGroup} from '@angular/forms';
 import {Subject} from 'rxjs/Subject';
 import {TranslateService} from '@ngx-translate/core';
 import {ListItem} from '@app/classes/list-item';
+import {filtersFormItemsMap} from '@app/classes/filtering';
 import {CommonEntry} from '@app/classes/models/common-entry';
+import {LogField} from '@app/classes/models/log-field';
 import {FilteringService} from '@app/services/filtering.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {AppStateService} from '@app/services/storage/app-state.service';
@@ -36,38 +38,42 @@ export class FiltersPanelComponent {
   constructor(private translate: TranslateService, private filtering: FilteringService, private logsContainer: LogsContainerService, private appState: AppStateService) {
     appState.getParameter('activeLogsType').subscribe(value => {
       this.logsType = value;
-      logsContainer.logsTypeMap[value].fieldsModel.getAll().subscribe(fields => {
+      logsContainer.logsTypeMap[value].fieldsModel.getAll().subscribe((fields: LogField[]): void => {
         if (fields.length) {
-          const items = fields.filter(field => this.excludedParameters.indexOf(field.name) === -1).map(field => {
+          const items = fields.filter((field: LogField): boolean => {
+              return this.excludedParameters.indexOf(field.name) === -1;
+            }).map((field: LogField): CommonEntry => {
               return {
                 name: field.displayName || field.name,
                 value: field.name
               };
             }),
-            labelKeys = items.map(item => item.name);
-          this.searchBoxItems = items.map(item => {
+            labelKeys = items.map((item: CommonEntry): string => item.name);
+          this.searchBoxItems = items.map((item: CommonEntry): ListItem => {
             return {
               label: item.name,
               value: item.value
             };
           });
-          translate.get(labelKeys).first().subscribe(translation => this.searchBoxItemsTranslated = items.map(item => {
-            return {
-              name: translation[item.name],
-              value: item.value
-            };
-          }));
+          translate.get(labelKeys).first().subscribe((translation: {[key: string]: string}): void => {
+            this.searchBoxItemsTranslated = items.map((item: CommonEntry): CommonEntry => {
+              return {
+                name: translation[item.name],
+                value: item.value
+              };
+            })
+          });
         }
       })
     });
-    filtering.loadClusters();
-    filtering.loadComponents();
-    filtering.loadHosts();
   }
 
+  @Input()
+  filtersForm: FormGroup;
+
   private readonly excludedParameters = ['cluster', 'host', 'level', 'type', 'logtime'];
 
-  private logsType: string; // TODO implement setting the parameter depending on user's navigation
+  private logsType: string;
 
   searchBoxItems: ListItem[] = [];
 
@@ -77,10 +83,6 @@ export class FiltersPanelComponent {
     return this.filtering.filters;
   }
 
-  get filtersForm(): FormGroup {
-    return this.filtering.filtersForm;
-  }
-
   get queryParameterNameChange(): Subject<any> {
     return this.filtering.queryParameterNameChange;
   }
@@ -93,4 +95,8 @@ export class FiltersPanelComponent {
     return this.filtering.captureSeconds;
   }
 
+  isFilterConditionDisplayed(key: string): boolean {
+    return filtersFormItemsMap[this.logsType].indexOf(key) > -1;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.spec.ts
index c21750a..4e9bdc9 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.spec.ts
@@ -29,6 +29,7 @@ import {ClustersService, clusters} from '@app/services/storage/clusters.service'
 import {ComponentsService, components} from '@app/services/storage/components.service';
 import {HostsService, hosts} from '@app/services/storage/hosts.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {TranslationModules} from '@app/test-config.spec';
 import {ModalComponent} from '@app/components/modal/modal.component';
 import {LogsContainerService} from '@app/services/logs-container.service';
@@ -67,7 +68,8 @@ describe('LogContextComponent', () => {
           clusters,
           components,
           hosts,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -83,6 +85,7 @@ describe('LogContextComponent', () => {
         ComponentsService,
         HostsService,
         ServiceLogsTruncatedService,
+        TabsService,
         LogsContainerService,
         {
           provide: HttpClientService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html
index 8b63278..70150a5 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html
@@ -15,25 +15,30 @@
   limitations under the License.
 -->
 
+<div class="tabs-container row">
+  <tabs class="col-md-12" [items]="tabs | async" (tabSwitched)="onSwitchTab($event)"
+        (tabClosed)="onCloseTab($event[0], $event[1])"></tabs>
+</div>
+<filters-panel class="row" [filtersForm]="filtersForm"></filters-panel>
 <div *ngIf="autoRefreshRemainingSeconds" class="col-md-12">
   <div class="auto-refresh-message pull-right">
     {{'filter.capture.triggeringRefresh' | translate: autoRefreshMessageParams}}
   </div>
 </div>
 <!-- TODO use plugin for singular/plural -->
-<div class="logs-header col-md-12">{{
+<div class="logs-header">{{
   (!totalEventsFoundMessageParams.totalCount ? 'logs.noEventFound' :
     (totalEventsFoundMessageParams.totalCount === 1 ? 'logs.oneEventFound' : 'logs.totalEventFound'))
         | translate: totalEventsFoundMessageParams
 }}</div>
-<collapsible-panel openTitle="logs.hideGraph" collapsedTitle="logs.showGraph" class="col-md-12">
-  <time-histogram class="col-md-12" [data]="histogramData" [customOptions]="histogramOptions"
-      svgId="service-logs-histogram"
-      (selectArea)="setCustomTimeRange($event[0], $event[1])"></time-histogram>
+<collapsible-panel openTitle="logs.hideGraph" collapsedTitle="logs.showGraph">
+  <time-histogram [data]="histogramData" [customOptions]="histogramOptions" svgId="service-logs-histogram"
+                  (selectArea)="setCustomTimeRange($event[0], $event[1])"></time-histogram>
 </collapsible-panel>
 <dropdown-button *ngIf="!isServiceLogsFileView" class="pull-right" label="logs.columns"
                  [options]="availableColumns | async" [isRightAlign]="true" [isMultipleChoice]="true"
                  action="updateSelectedColumns" [additionalArgs]="logsTypeMapObject.fieldsModel"></dropdown-button>
-<logs-list [logs]="logs | async" [totalCount]="totalCount" [displayedColumns]="displayedColumns"></logs-list>
+<logs-list [logs]="logs | async" [totalCount]="totalCount" [displayedColumns]="displayedColumns"
+           [isServiceLogsFileView]="isServiceLogsFileView" [filtersForm]="filtersForm"></logs-list>
 <log-context *ngIf="isServiceLogContextView" [hostName]="activeLog.host_name" [componentName]="activeLog.component_name"
              [id]="activeLog.id"></log-context>

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less
index cd28efc..23d5f92 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less
@@ -21,9 +21,12 @@
 :host {
   display: block;
   overflow: hidden;
-  padding-top: @block-margin-top;
 
-  .auto-refresh-message {
+  .tabs-container, .auto-refresh-message {
     background-color: @filters-panel-background-color;
   }
+
+  filters-panel {
+    margin-bottom: @block-margin-top;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.spec.ts
index 9b3a043..0a9418f 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.spec.ts
@@ -31,10 +31,12 @@ import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {HostsService, hosts} from '@app/services/storage/hosts.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {HttpClientService} from '@app/services/http-client.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
+import {TabsComponent} from '@app/components/tabs/tabs.component';
 
 import {LogsContainerComponent} from './logs-container.component';
 
@@ -52,7 +54,10 @@ describe('LogsContainerComponent', () => {
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [LogsContainerComponent],
+      declarations: [
+        LogsContainerComponent,
+        TabsComponent
+      ],
       imports: [
         StoreModule.provideStore({
           appSettings,
@@ -64,6 +69,7 @@ describe('LogsContainerComponent', () => {
           serviceLogs,
           serviceLogsFields,
           serviceLogsHistogramData,
+          tabs,
           hosts,
           serviceLogsTruncated
         }),
@@ -85,6 +91,7 @@ describe('LogsContainerComponent', () => {
         ServiceLogsHistogramDataService,
         HostsService,
         ServiceLogsTruncatedService,
+        TabsService,
         FilteringService,
         UtilsService,
         LogsContainerService
@@ -97,7 +104,7 @@ describe('LogsContainerComponent', () => {
   beforeEach(() => {
     fixture = TestBed.createComponent(LogsContainerComponent);
     component = fixture.componentInstance;
-    component.logsType = 'serviceLogs';
+    component['logsType'] = 'serviceLogs';
     fixture.detectChanges();
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
index cdc023d..21949f1 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
@@ -16,68 +16,85 @@
  * limitations under the License.
  */
 
-import {Component, OnInit, Input} from '@angular/core';
+import {Component} from '@angular/core';
 import {FormGroup} from '@angular/forms';
 import {Observable} from 'rxjs/Observable';
+import {Subject} from 'rxjs/Subject';
 import 'rxjs/add/operator/map';
+import 'rxjs/add/operator/takeUntil';
 import {FilteringService} from '@app/services/filtering.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {ServiceLogsHistogramDataService} from '@app/services/storage/service-logs-histogram-data.service';
 import {AppStateService} from '@app/services/storage/app-state.service';
+import {TabsService} from '@app/services/storage/tabs.service';
 import {AuditLog} from '@app/classes/models/audit-log';
 import {ServiceLog} from '@app/classes/models/service-log';
 import {LogField} from '@app/classes/models/log-field';
+import {Tab} from '@app/classes/models/tab';
+import {BarGraph} from '@app/classes/models/bar-graph';
 import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
 import {HistogramOptions} from '@app/classes/histogram-options';
+import {ListItem} from '@app/classes/list-item';
 
 @Component({
   selector: 'logs-container',
   templateUrl: './logs-container.component.html',
   styleUrls: ['./logs-container.component.less']
 })
-export class LogsContainerComponent implements OnInit {
-
-  constructor(private serviceLogsHistogramStorage: ServiceLogsHistogramDataService, private appState: AppStateService, private filtering: FilteringService, private logsContainer: LogsContainerService) {
-    serviceLogsHistogramStorage.getAll().subscribe(data => this.histogramData = this.logsContainer.getHistogramData(data));
-    appState.getParameter('isServiceLogContextView').subscribe((value: boolean) => this.isServiceLogContextView = value);
-  }
-
-  ngOnInit() {
-    const fieldsModel = this.logsTypeMapObject.fieldsModel,
-      logsModel = this.logsTypeMapObject.logsModel;
-    this.appState.getParameter(this.logsTypeMapObject.isSetFlag).subscribe((value: boolean) => this.isLogsSet = value);
-    this.availableColumns = fieldsModel.getAll().map(fields => {
-      return fields.filter(field => field.isAvailable).map(field => {
-        return {
-          value: field.name,
-          label: field.displayName || field.name,
-          isChecked: field.isDisplayed
-        };
+export class LogsContainerComponent {
+
+  constructor(private serviceLogsHistogramStorage: ServiceLogsHistogramDataService, private appState: AppStateService, private tabsStorage: TabsService, private filtering: FilteringService, private logsContainer: LogsContainerService) {
+    this.logsContainer.loadColumnsNames();
+    this.logsTypeChange.first().subscribe(() => this.logsContainer.loadLogs());
+    appState.getParameter('activeLogsType').subscribe((value: string): void => {
+      this.logsType = value;
+      this.logsTypeChange.next();
+      const fieldsModel = this.logsTypeMapObject.fieldsModel,
+        logsModel = this.logsTypeMapObject.logsModel;
+      this.availableColumns = fieldsModel.getAll().takeUntil(this.logsTypeChange).map((fields: LogField[]): ListItem[] => {
+        return fields.filter((field: LogField): boolean => field.isAvailable).map((field: LogField): ListItem => {
+          return {
+            value: field.name,
+            label: field.displayName || field.name,
+            isChecked: field.isDisplayed
+          };
+        });
       });
-    });
-    fieldsModel.getAll().subscribe(columns => {
-      const availableFields = columns.filter(field => field.isAvailable),
-        availableNames = availableFields.map(field => field.name);
-      if (availableNames.length && !this.isLogsSet) {
-        this.logs = logsModel.getAll().map((logs: (AuditLog | ServiceLog)[]): (AuditLog | ServiceLog)[] => {
-          return logs.map((log: AuditLog | ServiceLog): AuditLog | ServiceLog => {
-            return availableNames.reduce((obj, key) => Object.assign(obj, {
-              [key]: log[key]
-            }), {});
+      fieldsModel.getAll().takeUntil(this.logsTypeChange).subscribe(columns => {
+        const availableFields = columns.filter((field: LogField): boolean => field.isAvailable),
+          availableNames = availableFields.map((field: LogField): string => field.name);
+        if (availableNames.length) {
+          this.logs = logsModel.getAll().map((logs: (AuditLog | ServiceLog)[]): (AuditLog | ServiceLog)[] => {
+            return logs.map((log: AuditLog | ServiceLog): AuditLog | ServiceLog => {
+              return availableNames.reduce((obj, key) => Object.assign(obj, {
+                [key]: log[key]
+              }), {});
+            });
           });
-        });
-        this.appState.setParameter(this.logsTypeMapObject.isSetFlag, true);
-      }
-      this.displayedColumns = columns.filter(column => column.isAvailable && column.isDisplayed);
+        }
+        this.displayedColumns = columns.filter((column: LogField): boolean => column.isAvailable && column.isDisplayed);
+      });
+    });
+    appState.getParameter('activeFiltersForm').subscribe((form: FormGroup): void => {
+      this.filtersFormChange.next();
+      form.valueChanges.takeUntil(this.filtersFormChange).subscribe(() => this.logsContainer.loadLogs());
+      this.filtersForm = form;
     });
-    this.logsContainer.loadLogs(this.logsType);
-    this.filtersForm.valueChanges.subscribe(() => this.logsContainer.loadLogs(this.logsType));
+    serviceLogsHistogramStorage.getAll().subscribe((data: BarGraph[]): void => {
+      this.histogramData = this.logsContainer.getHistogramData(data);
+    });
+    appState.getParameter('isServiceLogContextView').subscribe((value: boolean) => this.isServiceLogContextView = value);
   }
 
-  @Input()
-  logsType: string;
+  tabs: Observable<Tab[]> = this.tabsStorage.getAll();
 
-  private isLogsSet: boolean = false;
+  filtersForm: FormGroup;
+
+  private logsType: string;
+
+  private filtersFormChange: Subject<any> = new Subject();
+
+  private logsTypeChange: Subject<any> = new Subject();
 
   get logsTypeMapObject(): any {
     return this.logsContainer.logsTypeMap[this.logsType];
@@ -99,10 +116,6 @@ export class LogsContainerComponent implements OnInit {
     keysWithColors: this.logsContainer.colors
   };
 
-  private get filtersForm(): FormGroup {
-    return this.filtering.filtersForm;
-  }
-
   get autoRefreshRemainingSeconds(): number {
     return this.filtering.autoRefreshRemainingSeconds;
   }
@@ -136,4 +149,15 @@ export class LogsContainerComponent implements OnInit {
   setCustomTimeRange(startTime: number, endTime: number): void {
     this.filtering.setCustomTimeRange(startTime, endTime);
   }
+
+  onSwitchTab(activeTab: Tab): void {
+    this.logsContainer.switchTab(activeTab);
+  }
+
+  onCloseTab(activeTab: Tab, newActiveTab: Tab): void {
+    this.tabsStorage.deleteObjectInstance(activeTab);
+    if (newActiveTab) {
+      this.onSwitchTab(newActiveTab);
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.html
index b27eb69..1e0f49c 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.html
@@ -15,22 +15,24 @@
   limitations under the License.
 -->
 
-<form *ngIf="logs && logs.length" [formGroup]="filtersForm" class="pull-right">
+<form *ngIf="logs && logs.length" [formGroup]="filtersForm" class="row pull-right">
   <filter-dropdown [label]="filters.sorting.label" formControlName="sorting" [options]="filters.sorting.options"
-                   [defaultLabel]="filters.sorting.defaultLabel" [isRightAlign]="true"></filter-dropdown>
+                   [defaultLabel]="filters.sorting.defaultLabel" [isRightAlign]="true"
+                   class="col-md-12"></filter-dropdown>
 </form>
-<div *ngFor="let log of logs; let i = index">
-  <div *ngIf="!isServiceLogsFileView && (i === 0 || isDifferentDates(log.logtime, logs[i - 1].logtime))" class="col-md-12">
-    <div class="logs-header">{{log.logtime | amTz: timeZone | amDateFormat: dateFormat}}</div>
+<div *ngFor="let log of logs; let i = index" class="row">
+  <div class="logs-header col-md-12"
+       *ngIf="!isServiceLogsFileView && (i === 0 || isDifferentDates(log.logtime, logs[i - 1].logtime))">
+    <div class="col-md-12">{{log.logtime | amTz: timeZone | amDateFormat: dateFormat}}</div>
   </div>
   <accordion-panel *ngIf="!isServiceLogsFileView" [toggleId]="'details-' + i" class="col-md-12">
     <ng-template>
-      <div *ngIf="isColumnDisplayed('level')" [ngClass]="'hexagon ' + log.level.toLowerCase()"></div>
+      <div *ngIf="isColumnDisplayed('level')" [ngClass]="'hexagon ' + (log.level ? log.level.toLowerCase() : '')"></div>
       <div class="col-md-1">
         <dropdown-button iconClass="fa fa-ellipsis-h" [hideCaret]="true" [options]="logActions"
                          [additionalArgs]="[log]"></dropdown-button>
       </div>
-      <div *ngIf="isColumnDisplayed('level')" [ngClass]="'col-md-1 log-status ' + log.level.toLowerCase()">
+      <div *ngIf="isColumnDisplayed('level')" [ngClass]="'col-md-1 log-status ' + (log.level ? log.level.toLowerCase() : '')">
         {{log.level}}
       </div>
       <div *ngIf="isColumnDisplayed('type') || isColumnDisplayed('logtime')" class="col-md-3">
@@ -45,9 +47,7 @@
         </div>
         <div class="log-content-inner-wrapper">
           <div class="log-content" *ngIf="isColumnDisplayed('log_message')"
-               (contextmenu)="openMessageContextMenu($event)">
-            {{log.log_message}}
-          </div>
+               (contextmenu)="openMessageContextMenu($event)">{{log.log_message}}</div>
         </div>
       </div>
       <div *ngFor="let column of displayedColumns">
@@ -56,10 +56,10 @@
       </div>
     </ng-template>
   </accordion-panel>
-  <log-file-entry *ngIf="isServiceLogsFileView" class="col-md-12" [time]="log.logtime" [level]="log.level"
+  <log-file-entry *ngIf="isServiceLogsFileView" [time]="log.logtime" [level]="log.level"
                   [fileName]="log.file" [lineNumber]="log.line_number" [message]="log.log_message"></log-file-entry>
 </div>
 <ul #contextmenu *ngIf="!isServiceLogsFileView" data-component="dropdown-list" class="dropdown-menu context-menu"
     [items]="contextMenuItems" (selectedItemChange)="updateQuery($event)"></ul>
-<pagination class="col-md-12" *ngIf="logs && logs.length" [totalCount]="totalCount" [filtersForm]="filtersForm"
+<pagination class="pull-right" *ngIf="logs && logs.length" [totalCount]="totalCount" [filtersForm]="filtersForm"
             [filterInstance]="filters.pageSize" [currentCount]="logs.length"></pagination>

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.ts
index 2462a61..017bc82 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.ts
@@ -18,11 +18,11 @@
 import {Component, AfterViewInit, Input, ViewChild, ElementRef} from '@angular/core';
 import {FormGroup} from '@angular/forms';
 import 'rxjs/add/operator/map';
-import {AppStateService} from '@app/services/storage/app-state.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
 import {AuditLog} from '@app/classes/models/audit-log';
 import {ServiceLog} from '@app/classes/models/service-log';
+import {LogField} from '@app/classes/models/log-field';
 
 @Component({
   selector: 'logs-list',
@@ -31,12 +31,13 @@ import {ServiceLog} from '@app/classes/models/service-log';
 })
 export class LogsListComponent implements AfterViewInit {
 
-  constructor(private filtering: FilteringService, private utils: UtilsService, private appState: AppStateService) {
-    appState.getParameter('isServiceLogsFileView').subscribe((value: boolean) => this.isServiceLogsFileView = value);
+  constructor(private filtering: FilteringService, private utils: UtilsService) {
   }
 
   ngAfterViewInit() {
-    this.contextMenuElement = this.contextMenu.nativeElement;
+    if (this.contextMenu) {
+      this.contextMenuElement = this.contextMenu.nativeElement;
+    }
   }
 
   @Input()
@@ -46,7 +47,13 @@ export class LogsListComponent implements AfterViewInit {
   totalCount: number = 0;
 
   @Input()
-  displayedColumns: any[] = [];
+  displayedColumns: LogField[] = [];
+
+  @Input()
+  isServiceLogsFileView: boolean = false;
+
+  @Input()
+  filtersForm: FormGroup;
 
   @ViewChild('contextmenu', {
     read: ElementRef
@@ -103,19 +110,13 @@ export class LogsListComponent implements AfterViewInit {
   get filters(): any {
     return this.filtering.filters;
   }
-  
-  get filtersForm(): FormGroup {
-    return this.filtering.filtersForm;
-  }
-
-  isServiceLogsFileView: boolean = false;
 
   isDifferentDates(dateA, dateB): boolean {
     return this.utils.isDifferentDates(dateA, dateB, this.timeZone);
   }
 
   isColumnDisplayed(key: string): boolean {
-    return this.displayedColumns.some(column => column.name === key);
+    return this.displayedColumns.some((column: LogField): boolean  => column.name === key);
   }
 
   openMessageContextMenu(event: MouseEvent): void {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html
index 7e3621a..2061582 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html
@@ -20,12 +20,4 @@
   <span class="fa fa-spinner fa-spin"></span>
 </div>
 <login-form *ngIf="!isInitialLoading && !isAuthorized"></login-form>
-
-<!-- TODO implement tabs: Service Logs/Audit Logs/active file -->
-<div *ngIf="isServiceLogsFileView" class="col-md-12 logs-header">
-  {{activeLogHostName}} &gt;&gt; {{activeLogComponentName}}
-  <span class="fa fa-times close-icon" (click)="closeLog()"></span>
-</div>
-
-<filters-panel *ngIf="isAuthorized" class="row"></filters-panel>
-<logs-container *ngIf="isAuthorized" logsType="serviceLogs"></logs-container>
+<logs-container *ngIf="isAuthorized" class="col-md-12"></logs-container>

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.less
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.less
index b596a3d..bca668d 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.less
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.less
@@ -21,8 +21,4 @@
 :host {
   .full-size;
   overflow-x: hidden;
-
-  .close-icon {
-    .clickable-item;
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.spec.ts
index bbbebdf..18adec7 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.spec.ts
@@ -23,7 +23,6 @@ import {StoreModule} from '@ngrx/store';
 import {AppStateService, appState} from '@app/services/storage/app-state.service';
 import {AuditLogsFieldsService, auditLogsFields} from '@app/services/storage/audit-logs-fields.service';
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
-import {HttpClientService} from '@app/services/http-client.service';
 
 import {MainContainerComponent} from './main-container.component';
 
@@ -32,14 +31,6 @@ describe('MainContainerComponent', () => {
   let fixture: ComponentFixture<MainContainerComponent>;
 
   beforeEach(async(() => {
-    const httpClient = {
-      get: () => {
-        return {
-          subscribe: () => {
-          }
-        }
-      }
-    };
     TestBed.configureTestingModule({
       declarations: [MainContainerComponent],
       imports: [
@@ -54,11 +45,7 @@ describe('MainContainerComponent', () => {
       providers: [
         AppStateService,
         AuditLogsFieldsService,
-        ServiceLogsFieldsService,
-        {
-          provide: HttpClientService,
-          useValue: httpClient
-        }
+        ServiceLogsFieldsService
       ]
     })
     .compileComponents();

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.ts
index ad86a74..6747a0c 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.ts
@@ -17,13 +17,7 @@
  */
 
 import {Component, ContentChild, TemplateRef} from '@angular/core';
-import {HttpClientService} from '@app/services/http-client.service';
 import {AppStateService} from '@app/services/storage/app-state.service';
-import {AuditLogsFieldsService} from '@app/services/storage/audit-logs-fields.service';
-import {ServiceLogsFieldsService} from '@app/services/storage/service-logs-fields.service';
-import {AuditLogField} from '@app/classes/models/audit-log-field';
-import {ServiceLogField} from '@app/classes/models/service-log-field';
-import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
 
 @Component({
   selector: 'main-container',
@@ -32,20 +26,9 @@ import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
 })
 export class MainContainerComponent {
 
-  constructor(private httpClient: HttpClientService, private appState: AppStateService, private auditLogsFieldsStorage: AuditLogsFieldsService, private serviceLogsFieldsStorage: ServiceLogsFieldsService) {
-    this.loadColumnsNames();
+  constructor(private appState: AppStateService) {
     appState.getParameter('isAuthorized').subscribe((value: boolean) => this.isAuthorized = value);
     appState.getParameter('isInitialLoading').subscribe((value: boolean) => this.isInitialLoading = value);
-    appState.getParameter('isServiceLogsFileView').subscribe((value: boolean) => this.isServiceLogsFileView = value);
-    appState.getParameter('activeLog').subscribe((value: ActiveServiceLogEntry | null) => {
-      if (value) {
-        this.activeLogHostName = value.host_name;
-        this.activeLogComponentName = value.component_name;
-      } else {
-        this.activeLogHostName = '';
-        this.activeLogComponentName = '';
-      }
-    });
   }
 
   @ContentChild(TemplateRef)
@@ -55,36 +38,4 @@ export class MainContainerComponent {
 
   isInitialLoading: boolean = false;
 
-  isServiceLogsFileView: boolean = false;
-
-  activeLogHostName: string = '';
-
-  activeLogComponentName: string = '';
-
-  private loadColumnsNames(): void {
-    this.httpClient.get('serviceLogsFields').subscribe(response => {
-      const jsonResponse = response.json();
-      if (jsonResponse) {
-        this.serviceLogsFieldsStorage.addInstances(this.getColumnsArray(jsonResponse, ServiceLogField));
-      }
-    });
-    this.httpClient.get('auditLogsFields').subscribe(response => {
-      const jsonResponse = response.json();
-      if (jsonResponse) {
-        this.auditLogsFieldsStorage.addInstances(this.getColumnsArray(jsonResponse, AuditLogField));
-      }
-    });
-  }
-
-  private getColumnsArray(keysObject: any, fieldClass: any): any[] {
-    return Object.keys(keysObject).map(key => new fieldClass(key));
-  }
-
-  closeLog(): void {
-    this.appState.setParameters({
-      isServiceLogsFileView: false,
-      activeLog: null
-    });
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.spec.ts
index 5414f4f..261e213 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.spec.ts
@@ -31,6 +31,7 @@ import {ServiceLogsService, serviceLogs} from '@app/services/storage/service-log
 import {ServiceLogsFieldsService, serviceLogsFields} from '@app/services/storage/service-logs-fields.service';
 import {ServiceLogsHistogramDataService, serviceLogsHistogramData} from '@app/services/storage/service-logs-histogram-data.service';
 import {ServiceLogsTruncatedService, serviceLogsTruncated} from '@app/services/storage/service-logs-truncated.service';
+import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {ComponentActionsService} from '@app/services/component-actions.service';
 import {FilteringService} from '@app/services/filtering.service';
 import {HttpClientService} from '@app/services/http-client.service';
@@ -43,6 +44,14 @@ describe('MenuButtonComponent', () => {
   let fixture: ComponentFixture<MenuButtonComponent>;
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [MenuButtonComponent],
       imports: [
@@ -57,7 +66,8 @@ describe('MenuButtonComponent', () => {
           serviceLogs,
           serviceLogsFields,
           serviceLogsHistogramData,
-          serviceLogsTruncated
+          serviceLogsTruncated,
+          tabs
         }),
         ...TranslationModules
       ],
@@ -73,9 +83,13 @@ describe('MenuButtonComponent', () => {
         ServiceLogsFieldsService,
         ServiceLogsHistogramDataService,
         ServiceLogsTruncatedService,
+        TabsService,
         ComponentActionsService,
         FilteringService,
-        HttpClientService,
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        },
         LogsContainerService
       ],
       schemas: [NO_ERRORS_SCHEMA]

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.html
index be6591b..679a7e5 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.html
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<form class="pagination-form col-md-12" [formGroup]="filtersForm">
+<form class="pagination-form" [formGroup]="filtersForm">
   <filter-dropdown [label]="filterInstance.label" formControlName="pageSize" [options]="filterInstance.options"
                    [defaultLabel]="filterInstance.defaultLabel" [isRightAlign]="true" isDropup="true"></filter-dropdown>
   <span>{{'pagination.numbers' | translate: numbersTranslateParams}}</span>

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.ts
index d38d0d8..cc5589f 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/pagination/pagination.component.ts
@@ -28,7 +28,9 @@ export class PaginationComponent implements OnInit {
 
   ngOnInit() {
     this.setPageSizeFromString(this.filterInstance.defaultValue);
-    this.filtersForm.controls.pageSize.valueChanges.subscribe(value => this.setPageSizeFromString(value));
+    this.filtersForm.controls.pageSize.valueChanges.subscribe((value: string): void => {
+      this.setPageSizeFromString(value);
+    });
   }
 
   @Input()
@@ -45,7 +47,7 @@ export class PaginationComponent implements OnInit {
 
   private pageSize: number = 0;
 
-  setPageSizeFromString(value: string) {
+  private setPageSizeFromString(value: string) {
     this.pageSize = parseInt(value);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.html
new file mode 100644
index 0000000..9bbcacf
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.html
@@ -0,0 +1,25 @@
+<!--
+  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.
+-->
+
+<ul class="nav nav-tabs">
+  <li *ngFor="let tab of items" [ngClass]="{'active': tab.isActive}">
+    <a href="#" (click)="switchTab(tab)">
+      {{tab.label | translate}}
+      <span *ngIf="tab.isCloseable" class="fa fa-times close-icon" (click)="closeTab(tab)"></span>
+    </a>
+  </li>
+</ul>

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.less
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.less
new file mode 100644
index 0000000..67e4e8c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.less
@@ -0,0 +1,22 @@
+/**
+ * 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.
+ */
+
+@import '../mixins';
+
+.close-icon {
+  .clickable-item;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.spec.ts
new file mode 100644
index 0000000..2df5090
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.spec.ts
@@ -0,0 +1,125 @@
+/**
+ * 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.
+ */
+
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
+import {Tab} from '@app/classes/models/tab';
+import {TranslationModules} from '@app/test-config.spec';
+
+import {TabsComponent} from './tabs.component';
+
+describe('TabsComponent', () => {
+  let component: TabsComponent;
+  let fixture: ComponentFixture<TabsComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [TabsComponent],
+      imports: TranslationModules
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(TabsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create component', () => {
+    expect(component).toBeTruthy();
+  });
+
+  describe('#switchTab()', () => {
+    let activeTab;
+    const tab = {
+      id: 'tab0',
+      type: '',
+      isActive: true,
+      label: '',
+      appState: null
+    };
+
+    it('new active tab', () => {
+      component.tabSwitched.subscribe((tab: Tab) => activeTab = tab);
+      component.switchTab(tab);
+      expect(activeTab).toEqual(tab);
+    });
+  });
+
+  describe('#closeTab()', () => {
+    const items = [
+        {
+          id: 'serviceLogs',
+          type: '',
+          isActive: false,
+          label: '',
+          appState: null
+        },
+        {
+          id: 'auditLogs',
+          type: '',
+          isActive: false,
+          label: '',
+          appState: null
+        },
+        {
+          id: 'newTab',
+          type: '',
+          isActive: false,
+          label: '',
+          appState: null
+        }
+      ],
+      cases = [
+        {
+          closedTabIndex: 2,
+          newActiveTabIndex: 1,
+          title: 'last tab closed'
+        },
+        {
+          closedTabIndex: 1,
+          newActiveTabIndex: 2,
+          title: 'not last tab closed'
+        }
+      ];
+
+    cases.forEach(test => {
+      let oldTab,
+        newTab;
+      describe(test.title, () => {
+        beforeEach(() => {
+          oldTab = null;
+          newTab = null;
+          component.items = items;
+          component.tabClosed.subscribe((tabs: Tab[]): void => {
+            oldTab = tabs[0];
+            newTab = tabs[1];
+          });
+          component.closeTab(items[test.closedTabIndex]);
+        });
+
+        it('closed tab', () => {
+          expect(oldTab).toEqual(items[test.closedTabIndex]);
+        });
+
+        it('new active tab', () => {
+          expect(newTab).toEqual(items[test.newActiveTabIndex]);
+        });
+      });
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.ts
new file mode 100644
index 0000000..ef941e6
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/tabs/tabs.component.ts
@@ -0,0 +1,48 @@
+/**
+ * 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.
+ */
+
+import {Component, Input, Output, EventEmitter} from '@angular/core';
+import {Tab} from '@app/classes/models/tab';
+
+@Component({
+  selector: 'tabs',
+  templateUrl: './tabs.component.html',
+  styleUrls: ['./tabs.component.less']
+})
+export class TabsComponent {
+
+  @Input()
+  items: Tab[] = [];
+
+  @Output()
+  tabSwitched: EventEmitter<Tab> = new EventEmitter();
+
+  @Output()
+  tabClosed: EventEmitter<Tab[]> = new EventEmitter();
+
+  switchTab(tab: Tab): void {
+    this.tabSwitched.emit(tab);
+  }
+
+  closeTab(tab: Tab): void {
+    const tabs = this.items,
+      tabsCount = tabs.length,
+      newActiveTab = tabs[tabsCount - 1] === tab ? tabs[tabsCount - 2] : tabs[tabsCount - 1];
+    this.tabClosed.emit([tab, newActiveTab]);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.less
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.less
index 6fe6292..e8d3240 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.less
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.less
@@ -17,6 +17,7 @@
  */
 
 :host {
+  display: block;
   cursor: crosshair;
   background: #ECECEC; // TODO add style according to actual design
   /deep/ .axis {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cec1cb/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.spec.ts
index 08817f4..7612cc3 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-range-picker/time-range-picker.component.spec.ts
@@ -35,6 +35,14 @@ describe('TimeRangePickerComponent', () => {
   let fixture: ComponentFixture<TimeRangePickerComponent>;
 
   beforeEach(async(() => {
+    const httpClient = {
+      get: () => {
+        return {
+          subscribe: () => {
+          }
+        }
+      }
+    };
     TestBed.configureTestingModule({
       declarations: [TimeRangePickerComponent],
       imports: [
@@ -48,7 +56,10 @@ describe('TimeRangePickerComponent', () => {
         ...TranslationModules
       ],
       providers: [
-        HttpClientService,
+        {
+          provide: HttpClientService,
+          useValue: httpClient
+        },
         FilteringService,
         AppSettingsService,
         AppStateService,


[07/12] ambari git commit: AMBARI-22268. Remove "Hotfix" from Admin Register Version. (Ishan Bhatt via yusaku)

Posted by rl...@apache.org.
AMBARI-22268. Remove "Hotfix" from Admin Register Version. (Ishan Bhatt via yusaku)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 2ae81d99a55756bd5240a90d550d34ec2ff73927
Parents: 8852f33
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Wed Oct 18 15:12:07 2017 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Wed Oct 18 15:12:07 2017 -0700

----------------------------------------------------------------------
 .../src/main/resources/ui/admin-web/app/scripts/i18n.config.js     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2ae81d99/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 1711543..183a276 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -344,7 +344,7 @@ angular.module('ambariAdminConsole')
     'users.alerts.usersEffectivePrivilege': '{{user_name}}\'s effective privilege through its Group(s) is higher than your selected privilege.',
 
     'versions.current': 'Current',
-    'versions.addVersion': 'Add Version or Hotfix',
+    'versions.addVersion': 'Add Version',
     'versions.defaultVersion': '(Default Version Definition)',
     'versions.inUse': 'In Use',
     'versions.installed': 'Installed',


[03/12] ambari git commit: Updated team page. (yusaku)

Posted by rl...@apache.org.
Updated team page. (yusaku)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: c9c96cdb881e59d8a3dfe19e32069adf05fdf445
Parents: 29d1139
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Wed Oct 18 11:08:50 2017 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Wed Oct 18 11:08:50 2017 -0700

----------------------------------------------------------------------
 docs/pom.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9c96cdb/docs/pom.xml
----------------------------------------------------------------------
diff --git a/docs/pom.xml b/docs/pom.xml
index a75e093..8af497e 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -186,6 +186,18 @@
             </organization>
         </developer>
         <developer>
+            <id>amruta</id>
+            <name>Amruta R Borkar</name>
+            <email>amruta@apache.org</email>
+            <timezone></timezone>
+            <roles>
+                <role>Committer</role>
+            </roles>
+            <organization>
+                IBM
+            </organization>
+        </developer>
+        <developer>
             <id>aonishuk</id>
             <name>Andrew Onischuk</name>
             <email>aonishuk@apache.org</email>


[04/12] ambari git commit: Revert "AMBARI-22258. Use correct property attribute setter fn(). while setting 'tez.runtime.io.sort.mb' maximum value."

Posted by rl...@apache.org.
Revert "AMBARI-22258. Use correct property attribute setter fn(). while setting 'tez.runtime.io.sort.mb' maximum value."

This reverts commit b9f26708dd19c444918ea9b21150f66236fcdf2d.


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 37d59f281e682c17e0a34aa7e6d9a09c927febca
Parents: c9c96cd
Author: Swapan Shridhar <ss...@hortonworks.com>
Authored: Wed Oct 18 11:15:12 2017 -0700
Committer: Swapan Shridhar <ss...@hortonworks.com>
Committed: Wed Oct 18 11:15:12 2017 -0700

----------------------------------------------------------------------
 .../src/main/resources/stacks/HDP/2.5/services/stack_advisor.py | 3 +--
 .../src/test/python/stacks/2.5/common/test_stack_advisor.py     | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/37d59f28/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index b6f2478..92ce9b9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -860,7 +860,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
     putHiveInteractiveEnvProperty = self.putProperty(configurations, "hive-interactive-env", services)
     putHiveInteractiveEnvPropertyAttribute = self.putPropertyAttribute(configurations, "hive-interactive-env")
     putTezInteractiveSiteProperty = self.putProperty(configurations, "tez-interactive-site", services)
-    putTezInteractiveSitePropertyAttribute = self.putPropertyAttribute(configurations, "tez-interactive-site")
     llap_daemon_selected_queue_name = None
     selected_queue_is_ambari_managed_llap = None  # Queue named 'llap' at root level is Ambari managed.
     llap_selected_queue_am_percent = None
@@ -1332,7 +1331,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
     putTezInteractiveSiteProperty('tez.runtime.io.sort.mb', tez_runtime_io_sort_mb)
     if "tez-site" in services["configurations"] and "tez.runtime.sorter.class" in services["configurations"]["tez-site"]["properties"]:
       if services["configurations"]["tez-site"]["properties"]["tez.runtime.sorter.class"] == "LEGACY":
-        putTezInteractiveSitePropertyAttribute("tez.runtime.io.sort.mb", "maximum", 1800)
+        putTezInteractiveSiteProperty("tez.runtime.io.sort.mb", "maximum", 1800)
 
     putTezInteractiveSiteProperty('tez.runtime.unordered.output.buffer.size-mb', tez_runtime_unordered_output_buffer_size)
     putHiveInteractiveSiteProperty('hive.auto.convert.join.noconditionaltask.size', hive_auto_convert_join_noconditionaltask_size)

http://git-wip-us.apache.org/repos/asf/ambari/blob/37d59f28/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index 407e78d..cf462de 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -4446,8 +4446,7 @@ class TestHDP25StackAdvisor(TestCase):
           },
         "tez-site": {
           "properties": {
-            "tez.am.resource.memory.mb": "1024",
-            "tez.runtime.sorter.class": "LEGACY"
+            "tez.am.resource.memory.mb": "1024"
           }
         },
       }
@@ -4482,8 +4481,6 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.assertEqual(configurations['hive-interactive-site']['properties']['hive.llap.io.memory.size'], '186368')
     self.assertEqual(configurations['hive-interactive-env']['properties']['llap_heap_size'], '9830')
-    self.assertEqual(configurations['tez-interactive-site']['properties']['tez.runtime.io.sort.mb'], '1092')
-    self.assertEquals(configurations['tez-interactive-site']['property_attributes']['tez.runtime.io.sort.mb'], {'maximum': '1800'})