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/04 14:56:36 UTC

[1/5] ambari git commit: AMBARI-22128 Log Search UI: add event bars for Components list item. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-20859 45ca79b38 -> 9eb26a0d8


AMBARI-22128 Log Search UI: add event bars for Components list item. (ababiichuk)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 15cd1c598ba1285dcde8df47f72647f5c7fc29e7
Parents: 67396ba
Author: ababiichuk <ab...@hortonworks.com>
Authored: Wed Oct 4 14:08:37 2017 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Wed Oct 4 14:08:37 2017 +0300

----------------------------------------------------------------------
 .../filters-panel/filters-panel.component.html  |  3 +-
 .../src/app/models/node.model.ts                |  3 +-
 .../src/app/models/store.model.ts               |  2 +-
 .../app/services/component-generator.service.ts | 23 ++++++++-
 .../src/app/services/filtering.service.spec.ts  | 27 ++++++++++
 .../src/app/services/filtering.service.ts       | 53 +++++++++++++-------
 .../src/app/services/http-client.service.ts     |  2 +-
 7 files changed, 90 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/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 fc3dac8..e0db997 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
@@ -39,7 +39,8 @@
                    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>
+                   [isMultipleChoice]="true" [isRightAlign]="true"
+                   additionalLabelComponentSetter="getDataForComponentsNodeBar"></filter-button>
     <filter-button 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"

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
index 2891d142..b01421e 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
@@ -25,5 +25,6 @@ export interface Node {
   isParent: boolean;
   isRoot: boolean;
   childs?: Node[];
-  logLevelCount: CommonEntry[];
+  logLevelCount?: CommonEntry[];
+  vNodeList?: CommonEntry[];
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
index a6a084f..518e7cd 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
@@ -53,7 +53,7 @@ export interface AppStore {
   userConfigs: UserConfig[];
   filters: Filter[];
   clusters: string[];
-  components: string[];
+  components: Node[];
   serviceLogsFields: ServiceLogField[];
   auditLogsFields: AuditLogField[];
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.ts
index c49f40f..43755c0 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-generator.service.ts
@@ -18,13 +18,14 @@
 
 import {Injectable, ComponentFactoryResolver, ViewContainerRef} from '@angular/core';
 import {HostsService} from '@app/services/storage/hosts.service';
+import {ComponentsService} from '@app/services/storage/components.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {NodeBarComponent} from '@app/components/node-bar/node-bar.component';
 
 @Injectable()
 export class ComponentGeneratorService {
 
-  constructor(private resolver: ComponentFactoryResolver, private hostsStorage: HostsService, private logsContainer: LogsContainerService) {
+  constructor(private resolver: ComponentFactoryResolver, private hostsStorage: HostsService, private componentsStorage: ComponentsService, private logsContainer: LogsContainerService) {
   }
 
   private createComponent(type: any, container: ViewContainerRef, properties?: any): void {
@@ -54,4 +55,24 @@ export class ComponentGeneratorService {
     });
   }
 
+  getDataForComponentsNodeBar(componentName: string, container: ViewContainerRef): void {
+    let data;
+    this.componentsStorage.getAll().subscribe(components => {
+      if (container && components && components.length) {
+        const selectedHost = components.find(host => host.name === componentName);
+        data = selectedHost.logLevelCount.map(event => {
+          return {
+            color: this.logsContainer.colors[event.name],
+            value: event.value
+          };
+        });
+        if (data.length) {
+          this.createComponent(NodeBarComponent, container, {
+            data
+          });
+        }
+      }
+    });
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/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 e3f731e..c4db041 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
@@ -24,6 +24,8 @@ import {ComponentsService, components} from '@app/services/storage/components.se
 import {HostsService, hosts} from '@app/services/storage/hosts.service';
 import {UtilsService} from '@app/services/utils.service';
 import {HttpClientService} from '@app/services/http-client.service';
+import {ListItem} from '@app/classes/list-item.class';
+import {Node} from '@app/models/node.model';
 
 import {FilteringService} from './filtering.service';
 
@@ -64,4 +66,29 @@ describe('FilteringService', () => {
   it('should create service', inject([FilteringService], (service: FilteringService) => {
     expect(service).toBeTruthy();
   }));
+
+  describe('#getListItemFromString()', () => {
+    it('should convert string to ListItem', inject([FilteringService], (service: FilteringService) => {
+      const getListItemFromString: (name: string) => ListItem = service['getListItemFromString'];
+      expect(getListItemFromString('customName')).toEqual({
+        label: 'customName',
+        value: 'customName'
+      });
+    }));
+  });
+
+  describe('#getListItemFromNode()', () => {
+    it('should convert Node to ListItem', inject([FilteringService], (service: FilteringService) => {
+      const getListItemFromNode: (node: Node) => ListItem = service['getListItemFromNode'];
+      expect(getListItemFromNode({
+        name: 'customName',
+        value: '1',
+        isParent: true,
+        isRoot: true
+      })).toEqual({
+        label: 'customName (1)',
+        value: 'customName'
+      });
+    }));
+  });
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/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 0fff75d..7fe6517 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
@@ -18,12 +18,14 @@
 
 import {Injectable} from '@angular/core';
 import {FormControl, FormGroup} from '@angular/forms';
+import {Response} from '@angular/http';
 import {Subject} from 'rxjs/Subject';
 import {Observable} from 'rxjs/Observable';
 import 'rxjs/add/observable/timer';
 import 'rxjs/add/operator/takeUntil';
 import * as moment from 'moment-timezone';
 import {ListItem} from '@app/classes/list-item.class';
+import {Node} from '@app/models/node.model';
 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';
@@ -35,29 +37,41 @@ export class FilteringService {
 
   constructor(private httpClient: HttpClientService, private appSettings: AppSettingsService, private clustersStorage: ClustersService, private componentsStorage: ComponentsService, private hostsStorage: HostsService) {
     appSettings.getParameter('timeZone').subscribe(value => this.timeZone = value || this.defaultTimeZone);
-    clustersStorage.getAll().subscribe(clusters => {
-      this.filters.clusters.options = [...this.filters.clusters.options, ...clusters.map(this.getListItem)];
+    clustersStorage.getAll().subscribe((clusters: string[]): void => {
+      this.filters.clusters.options = [...this.filters.clusters.options, ...clusters.map(this.getListItemFromString)];
     });
-    componentsStorage.getAll().subscribe(components => {
-      this.filters.components.options = [...this.filters.components.options, ...components.map(this.getListItem)];
+    componentsStorage.getAll().subscribe((components: Node[]): void => {
+     this.filters.components.options = [...this.filters.components.options, ...components.map(this.getListItemFromNode)];
     });
-    hostsStorage.getAll().subscribe(hosts => {
-      this.filters.hosts.options = [...this.filters.hosts.options, ...hosts.map(host => {
-        return {
-          label: `${host.name} (${host.value})`,
-          value: host.name
-        };
-      })];
+    hostsStorage.getAll().subscribe((hosts: Node[]): void => {
+      this.filters.hosts.options = [...this.filters.hosts.options, ...hosts.map(this.getListItemFromNode)];
     });
   }
 
-  private getListItem(name: string): ListItem {
+  /**
+   * Get instance for dropdown list from string
+   * @param name {string}
+   * @returns {ListItem}
+   */
+  private getListItemFromString(name: string): ListItem {
     return {
       label: name,
       value: name
     };
   }
 
+  /**
+   * Get instance for dropdown list from Node object
+   * @param name {Node}
+   * @returns {ListItem}
+   */
+  private getListItemFromNode(node: Node): ListItem {
+    return {
+      label: `${node.name} (${node.value})`,
+      value: node.name
+    };
+  }
+
   private readonly defaultTimeZone = moment.tz.guess();
 
   private readonly paginationOptions = ['10', '25', '50', '100'];
@@ -423,7 +437,7 @@ export class FilteringService {
   }
 
   loadClusters(): void {
-    this.httpClient.get('clusters').subscribe(response => {
+    this.httpClient.get('clusters').subscribe((response: Response): void => {
       const clusterNames = response.json();
       if (clusterNames) {
         this.clustersStorage.addInstances(clusterNames);
@@ -432,18 +446,21 @@ export class FilteringService {
   }
 
   loadComponents(): void {
-    this.httpClient.get('components').subscribe(response => {
+    this.httpClient.get('components').subscribe((response: Response): void => {
       const jsonResponse = response.json(),
-        components = jsonResponse && jsonResponse.groupList;
+        components = jsonResponse && jsonResponse.vNodeList.map((item): Node => Object.assign(item, {
+            value: item.logLevelCount.reduce((currentValue: number, currentItem): number => {
+              return currentValue + Number(currentItem.value);
+            }, 0)
+          }));
       if (components) {
-        const componentNames = components.map(component => component.type);
-        this.componentsStorage.addInstances(componentNames);
+        this.componentsStorage.addInstances(components);
       }
     });
   }
 
   loadHosts(): void {
-    this.httpClient.get('hosts').subscribe(response => {
+    this.httpClient.get('hosts').subscribe((response: Response): void => {
       const jsonResponse = response.json(),
         hosts = jsonResponse && jsonResponse.vNodeList;
       if (hosts) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/15cd1c59/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
index 44a5f6a..495f706 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
@@ -62,7 +62,7 @@ export class HttpClientService extends Http {
       params: opts => new ServiceLogsTruncatedQueryParams(opts)
     },
     components: {
-      url: 'service/logs/components'
+      url: 'service/logs/components/levels/counts'
     },
     clusters: {
       url: 'service/logs/clusters'


[5/5] 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/9eb26a0d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9eb26a0d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9eb26a0d

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 9eb26a0d81a4d244e150b25cdba94c5892256e6d
Parents: 45ca79b b4966c1
Author: Robert Levas <rl...@hortonworks.com>
Authored: Wed Oct 4 10:56:23 2017 -0400
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Wed Oct 4 10:56:23 2017 -0400

----------------------------------------------------------------------
 .../test/python/ambari_agent/TestLiveStatus.py  |   5 +-
 .../src/test/python/ambari_agent/TestMain.py    |   5 +-
 .../test/python/ambari_agent/TestSecurity.py    |   1 -
 .../classes/active-service-log-entry.class.ts   |  23 --
 .../src/app/classes/active-service-log-entry.ts |  23 ++
 .../src/app/classes/histogram-options.class.ts  |  36 ---
 .../src/app/classes/histogram-options.ts        |  36 +++
 .../src/app/classes/list-item.class.ts          |  26 ---
 .../src/app/classes/list-item.ts                |  26 +++
 .../src/app/classes/models/app-settings.ts      |  27 +++
 .../src/app/classes/models/app-state.ts         |  43 ++++
 .../src/app/classes/models/audit-log-field.ts   | 225 +++++++++++++++++++
 .../src/app/classes/models/audit-log.ts         |  46 ++++
 .../src/app/classes/models/bar-graph.ts         |  24 ++
 .../src/app/classes/models/common-entry.ts      |  22 ++
 .../src/app/classes/models/count.ts             |  22 ++
 .../src/app/classes/models/filter.ts            |  25 +++
 .../src/app/classes/models/graph.ts             |  23 ++
 .../src/app/classes/models/log-field.ts         |  27 +++
 .../src/app/classes/models/log.ts               |  38 ++++
 .../src/app/classes/models/node.ts              |  30 +++
 .../src/app/classes/models/service-log-field.ts | 107 +++++++++
 .../src/app/classes/models/service-log.ts       |  27 +++
 .../app/classes/models/solr-collection-state.ts |  23 ++
 .../src/app/classes/models/store.ts             | 180 +++++++++++++++
 .../src/app/classes/models/user-config.ts       |  26 +++
 .../queries/audit-logs-query-params.class.ts    |  46 ----
 .../classes/queries/audit-logs-query-params.ts  |  46 ++++
 .../app/classes/queries/query-params.class.ts   |  23 --
 .../src/app/classes/queries/query-params.ts     |  23 ++
 ...ce-logs-histogram-query-params.class.spec.ts | 203 -----------------
 ...service-logs-histogram-query-params.class.ts |  70 ------
 .../service-logs-histogram-query-params.spec.ts | 203 +++++++++++++++++
 .../service-logs-histogram-query-params.ts      |  70 ++++++
 .../queries/service-logs-query-params.class.ts  |  30 ---
 .../queries/service-logs-query-params.ts        |  30 +++
 ...service-logs-truncated-query-params.class.ts |  36 ---
 .../service-logs-truncated-query-params.ts      |  36 +++
 .../classes/service-log-context-entry.class.ts  |  26 ---
 .../app/classes/service-log-context-entry.ts    |  26 +++
 .../dropdown-button.component.ts                |   2 +-
 .../dropdown-list/dropdown-list.component.ts    |   2 +-
 .../filter-button/filter-button.component.ts    |   2 +-
 .../filters-panel/filters-panel.component.html  |   3 +-
 .../filters-panel/filters-panel.component.ts    |   4 +-
 .../log-context/log-context.component.ts        |   4 +-
 .../logs-container/logs-container.component.ts  |  10 +-
 .../components/logs-list/logs-list.component.ts |   4 +-
 .../main-container/main-container.component.ts  |   6 +-
 .../menu-button/menu-button.component.ts        |   2 +-
 .../search-box/search-box.component.ts          |   2 +-
 .../time-histogram/time-histogram.component.ts  |   2 +-
 .../src/app/models/app-settings.model.ts        |  27 ---
 .../src/app/models/app-state.model.ts           |  43 ----
 .../src/app/models/audit-log-field.model.ts     | 225 -------------------
 .../src/app/models/audit-log.model.ts           |  46 ----
 .../src/app/models/bar-graph.model.ts           |  24 --
 .../src/app/models/common-entry.model.ts        |  22 --
 .../src/app/models/count.model.ts               |  22 --
 .../src/app/models/filter.model.ts              |  25 ---
 .../src/app/models/graph.model.ts               |  23 --
 .../src/app/models/log-field.model.ts           |  27 ---
 .../src/app/models/log.model.ts                 |  38 ----
 .../src/app/models/node.model.ts                |  29 ---
 .../src/app/models/service-log-field.model.ts   | 107 ---------
 .../src/app/models/service-log.model.ts         |  27 ---
 .../app/models/solr-collection-state.model.ts   |  23 --
 .../src/app/models/store.model.ts               | 180 ---------------
 .../src/app/models/user-config.model.ts         |  26 ---
 .../app/services/component-actions.service.ts   |   4 +-
 .../app/services/component-generator.service.ts |  23 +-
 .../src/app/services/filtering.service.spec.ts  |  27 +++
 .../src/app/services/filtering.service.ts       |  55 +++--
 .../src/app/services/http-client.service.ts     |  10 +-
 .../src/app/services/logs-container.service.ts  |   2 +-
 .../services/storage/app-settings.service.ts    |   4 +-
 .../app/services/storage/app-state.service.ts   |   4 +-
 .../storage/audit-logs-fields.service.ts        |   2 +-
 .../app/services/storage/audit-logs.service.ts  |   2 +-
 .../app/services/storage/clusters.service.ts    |   2 +-
 .../app/services/storage/components.service.ts  |   2 +-
 .../src/app/services/storage/filters.service.ts |   2 +-
 .../src/app/services/storage/graphs.service.ts  |   2 +-
 .../src/app/services/storage/hosts.service.ts   |   2 +-
 .../storage/service-logs-fields.service.ts      |   2 +-
 .../service-logs-histogram-data.service.ts      |   2 +-
 .../storage/service-logs-truncated.service.ts   |   2 +-
 .../services/storage/service-logs.service.ts    |   2 +-
 .../services/storage/user-configs.service.ts    |   2 +-
 89 files changed, 1568 insertions(+), 1506 deletions(-)
----------------------------------------------------------------------



[4/5] ambari git commit: AMBARI-22129 Log Search UI: reorganize classes structure. (ababiichuk)

Posted by rl...@apache.org.
AMBARI-22129 Log Search UI: reorganize classes structure. (ababiichuk)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: b4966c10b3369264c07a1daa934a4f872379cdb7
Parents: de981ca
Author: ababiichuk <ab...@hortonworks.com>
Authored: Wed Oct 4 15:41:26 2017 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Wed Oct 4 17:09:13 2017 +0300

----------------------------------------------------------------------
 .../classes/active-service-log-entry.class.ts   |  23 --
 .../src/app/classes/active-service-log-entry.ts |  23 ++
 .../src/app/classes/histogram-options.class.ts  |  36 ---
 .../src/app/classes/histogram-options.ts        |  36 +++
 .../src/app/classes/list-item.class.ts          |  26 ---
 .../src/app/classes/list-item.ts                |  26 +++
 .../src/app/classes/models/app-settings.ts      |  27 +++
 .../src/app/classes/models/app-state.ts         |  43 ++++
 .../src/app/classes/models/audit-log-field.ts   | 225 +++++++++++++++++++
 .../src/app/classes/models/audit-log.ts         |  46 ++++
 .../src/app/classes/models/bar-graph.ts         |  24 ++
 .../src/app/classes/models/common-entry.ts      |  22 ++
 .../src/app/classes/models/count.ts             |  22 ++
 .../src/app/classes/models/filter.ts            |  25 +++
 .../src/app/classes/models/graph.ts             |  23 ++
 .../src/app/classes/models/log-field.ts         |  27 +++
 .../src/app/classes/models/log.ts               |  38 ++++
 .../src/app/classes/models/node.ts              |  30 +++
 .../src/app/classes/models/service-log-field.ts | 107 +++++++++
 .../src/app/classes/models/service-log.ts       |  27 +++
 .../app/classes/models/solr-collection-state.ts |  23 ++
 .../src/app/classes/models/store.ts             | 180 +++++++++++++++
 .../src/app/classes/models/user-config.ts       |  26 +++
 .../queries/audit-logs-query-params.class.ts    |  46 ----
 .../classes/queries/audit-logs-query-params.ts  |  46 ++++
 .../app/classes/queries/query-params.class.ts   |  23 --
 .../src/app/classes/queries/query-params.ts     |  23 ++
 ...ce-logs-histogram-query-params.class.spec.ts | 203 -----------------
 ...service-logs-histogram-query-params.class.ts |  70 ------
 .../service-logs-histogram-query-params.spec.ts | 203 +++++++++++++++++
 .../service-logs-histogram-query-params.ts      |  70 ++++++
 .../queries/service-logs-query-params.class.ts  |  30 ---
 .../queries/service-logs-query-params.ts        |  30 +++
 ...service-logs-truncated-query-params.class.ts |  36 ---
 .../service-logs-truncated-query-params.ts      |  36 +++
 .../classes/service-log-context-entry.class.ts  |  26 ---
 .../app/classes/service-log-context-entry.ts    |  26 +++
 .../dropdown-button.component.ts                |   2 +-
 .../dropdown-list/dropdown-list.component.ts    |   2 +-
 .../filter-button/filter-button.component.ts    |   2 +-
 .../filters-panel/filters-panel.component.ts    |   4 +-
 .../log-context/log-context.component.ts        |   4 +-
 .../logs-container/logs-container.component.ts  |  10 +-
 .../components/logs-list/logs-list.component.ts |   4 +-
 .../main-container/main-container.component.ts  |   6 +-
 .../menu-button/menu-button.component.ts        |   2 +-
 .../search-box/search-box.component.ts          |   2 +-
 .../time-histogram/time-histogram.component.ts  |   2 +-
 .../src/app/models/app-settings.model.ts        |  27 ---
 .../src/app/models/app-state.model.ts           |  43 ----
 .../src/app/models/audit-log-field.model.ts     | 225 -------------------
 .../src/app/models/audit-log.model.ts           |  46 ----
 .../src/app/models/bar-graph.model.ts           |  24 --
 .../src/app/models/common-entry.model.ts        |  22 --
 .../src/app/models/count.model.ts               |  22 --
 .../src/app/models/filter.model.ts              |  25 ---
 .../src/app/models/graph.model.ts               |  23 --
 .../src/app/models/log-field.model.ts           |  27 ---
 .../src/app/models/log.model.ts                 |  38 ----
 .../src/app/models/node.model.ts                |  30 ---
 .../src/app/models/service-log-field.model.ts   | 107 ---------
 .../src/app/models/service-log.model.ts         |  27 ---
 .../app/models/solr-collection-state.model.ts   |  23 --
 .../src/app/models/store.model.ts               | 180 ---------------
 .../src/app/models/user-config.model.ts         |  26 ---
 .../app/services/component-actions.service.ts   |   4 +-
 .../src/app/services/filtering.service.spec.ts  |   4 +-
 .../src/app/services/filtering.service.ts       |   4 +-
 .../src/app/services/http-client.service.ts     |   8 +-
 .../src/app/services/logs-container.service.ts  |   2 +-
 .../services/storage/app-settings.service.ts    |   4 +-
 .../app/services/storage/app-state.service.ts   |   4 +-
 .../storage/audit-logs-fields.service.ts        |   2 +-
 .../app/services/storage/audit-logs.service.ts  |   2 +-
 .../app/services/storage/clusters.service.ts    |   2 +-
 .../app/services/storage/components.service.ts  |   2 +-
 .../src/app/services/storage/filters.service.ts |   2 +-
 .../src/app/services/storage/graphs.service.ts  |   2 +-
 .../src/app/services/storage/hosts.service.ts   |   2 +-
 .../storage/service-logs-fields.service.ts      |   2 +-
 .../service-logs-histogram-data.service.ts      |   2 +-
 .../storage/service-logs-truncated.service.ts   |   2 +-
 .../services/storage/service-logs.service.ts    |   2 +-
 .../services/storage/user-configs.service.ts    |   2 +-
 84 files changed, 1481 insertions(+), 1481 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.class.ts
deleted file mode 100644
index d3d7d95..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.class.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface ActiveServiceLogEntry {
-  id: string;
-  host_name: string;
-  component_name: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.ts
new file mode 100644
index 0000000..d3d7d95
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/active-service-log-entry.ts
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+
+export interface ActiveServiceLogEntry {
+  id: string;
+  host_name: string;
+  component_name: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.class.ts
deleted file mode 100644
index dee5d98..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.class.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface HistogramMarginOptions {
-  top: number;
-  right: number;
-  bottom: number;
-  left: number;
-}
-
-export interface HistogramStyleOptions {
-  margin?: HistogramMarginOptions;
-  height?: number;
-  tickPadding?: number;
-  columnWidth?: number;
-  dragAreaColor?: string;
-}
-
-export interface HistogramOptions extends HistogramStyleOptions {
-  keysWithColors: {[key: string]: string};
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.ts
new file mode 100644
index 0000000..dee5d98
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/histogram-options.ts
@@ -0,0 +1,36 @@
+/**
+ * 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.
+ */
+
+export interface HistogramMarginOptions {
+  top: number;
+  right: number;
+  bottom: number;
+  left: number;
+}
+
+export interface HistogramStyleOptions {
+  margin?: HistogramMarginOptions;
+  height?: number;
+  tickPadding?: number;
+  columnWidth?: number;
+  dragAreaColor?: string;
+}
+
+export interface HistogramOptions extends HistogramStyleOptions {
+  keysWithColors: {[key: string]: string};
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.class.ts
deleted file mode 100644
index 1aaaecc..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.class.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface ListItem {
-  id?: string;
-  label?: string;
-  value: any;
-  iconClass?: string;
-  isChecked?: boolean;
-  action?: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.ts
new file mode 100644
index 0000000..1aaaecc
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/list-item.ts
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export interface ListItem {
+  id?: string;
+  label?: string;
+  value: any;
+  iconClass?: string;
+  isChecked?: boolean;
+  action?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-settings.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-settings.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-settings.ts
new file mode 100644
index 0000000..11821a3
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-settings.ts
@@ -0,0 +1,27 @@
+/**
+ * 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 * as moment from 'moment-timezone';
+
+export interface AppSettings {
+  timeZone: string;
+}
+
+export const defaultSettings: AppSettings = {
+  timeZone: moment.tz.guess()
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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
new file mode 100644
index 0000000..beeb670
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
@@ -0,0 +1,43 @@
+/**
+ * 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 {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
+
+export interface AppState {
+  isAuthorized: boolean;
+  isInitialLoading: boolean;
+  isLoginInProgress: boolean;
+  isAuditLogsSet: boolean;
+  isServiceLogsSet: boolean;
+  activeLogsType?: string;
+  isServiceLogsFileView: boolean;
+  isServiceLogContextView: boolean;
+  activeLog: ActiveServiceLogEntry | null;
+}
+
+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
+  isServiceLogsFileView: false,
+  isServiceLogContextView: false,
+  activeLog: null
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log-field.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log-field.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log-field.ts
new file mode 100644
index 0000000..40ad27e
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log-field.ts
@@ -0,0 +1,225 @@
+/**
+ * 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 {LogField} from '@app/classes/models/log-field';
+
+const columnsNamesMap = {
+  access: {
+    displayName: 'logs.accessType',
+    isDisplayed: true
+  },
+  action: {
+    displayName: 'logs.action'
+  },
+  agent: {
+    displayName: 'logs.agent'
+  },
+  agentHost: {
+    displayName: 'logs.agentHost'
+  },
+  authType: {
+    displayName: 'logs.authType'
+  },
+  bundle_id: {
+    displayName: 'logs.bundleId'
+  },
+  case_id: {
+    displayName: 'logs.caseId'
+  },
+  cliIP: {
+    displayName: 'logs.clientIp',
+    isDisplayed: true
+  },
+  cliType: {
+    displayName: 'logs.clientType'
+  },
+  cluster: {
+    displayName: 'logs.cluster'
+  },
+  dst: {
+    displayName: 'logs.dst'
+  },
+  evtTime: {
+    displayName: 'logs.eventTime',
+    isDisplayed: true
+  },
+  file: {
+    displayName: 'logs.file'
+  },
+  host: {
+    displayName: 'logs.host'
+  },
+  id: {
+    displayName: 'logs.id'
+  },
+  ip: {
+    displayName: 'logs.ip'
+  },
+  level: {
+    displayName: 'logs.level'
+  },
+  log_message: {
+    displayName: 'logs.message'
+  },
+  logType: {
+    displayName: 'logs.logType'
+  },
+  logfile_line_number: {
+    displayName: 'logs.logfileLineNumber'
+  },
+  logger_name: {
+    displayName: 'logs.loggerName'
+  },
+  logtime: {
+    displayName: 'logs.logTime'
+  },
+  path: {
+    displayName: 'logs.path'
+  },
+  perm: {
+    displayName: 'logs.perm'
+  },
+  policy: {
+    displayName: 'logs.policy'
+  },
+  proxyUsers: {
+    displayName: 'logs.proxyUsers'
+  },
+  reason: {
+    displayName: 'logs.reason'
+  },
+  repo: {
+    displayName: 'logs.repo',
+    isDisplayed: true
+  },
+  repoType: {
+    displayName: 'logs.repoType'
+  },
+  req_caller_id: {
+    displayName: 'logs.reqCallerId'
+  },
+  reqContext: {
+    displayName: 'logs.reqContext'
+  },
+  reqData: {
+    displayName: 'logs.reqData'
+  },
+  req_self_id: {
+    displayName: 'logs.reqSelfId'
+  },
+  resType: {
+    displayName: 'logs.resType'
+  },
+  resource: {
+    displayName: 'logs.resource',
+    isDisplayed: true
+  },
+  result: {
+    displayName: 'logs.result',
+    isDisplayed: true
+  },
+  sess: {
+    displayName: 'logs.session'
+  },
+  text: {
+    displayName: 'logs.text'
+  },
+  type: {
+    displayName: 'logs.type'
+  },
+  ugi: {
+    displayName: 'logs.ugi'
+  },
+  reqUser: {
+    displayName: 'logs.user',
+    isDisplayed: true
+  },
+  ws_base_url: {
+    displayName: 'logs.baseUrl'
+  },
+  ws_command: {
+    displayName: 'logs.command'
+  },
+  ws_component: {
+    displayName: 'logs.component'
+  },
+  ws_details: {
+    displayName: 'logs.details'
+  },
+  ws_display_name: {
+    displayName: 'logs.displayName'
+  },
+  ws_os: {
+    displayName: 'logs.os'
+  },
+  ws_repo_id: {
+    displayName: 'logs.repoId'
+  },
+  ws_repo_version: {
+    displayName: 'logs.repoVersion'
+  },
+  ws_repositories: {
+    displayName: 'logs.repositories'
+  },
+  ws_request_id: {
+    displayName: 'logs.requestId'
+  },
+  ws_result_status: {
+    displayName: 'logs.resultStatus'
+  },
+  ws_roles: {
+    displayName: 'logs.roles'
+  },
+  ws_stack_version: {
+    displayName: 'logs.stackVersion'
+  },
+  ws_stack: {
+    displayName: 'logs.stack'
+  },
+  ws_status: {
+    displayName: 'logs.status'
+  },
+  ws_task_id: {
+    displayName: 'logs.taskId'
+  },
+  ws_version_note: {
+    displayName: 'logs.versionNote'
+  },
+  ws_version_number: {
+    displayName: 'logs.versionNumber'
+  },
+  tags: {
+    isAvailable: false
+  },
+  tags_str: {
+    isAvailable: false
+  },
+  seq_num: {
+    isAvailable: false
+  }
+};
+
+export class AuditLogField extends LogField {
+  constructor(name: string) {
+    super(name);
+    const preset = columnsNamesMap[this.name];
+    if (preset) {
+      Object.assign(this, preset);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log.ts
new file mode 100644
index 0000000..fbe0e46
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/audit-log.ts
@@ -0,0 +1,46 @@
+/**
+ * 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 {Log} from '@app/classes/models/log';
+
+export interface AuditLog extends Log {
+  policy?: string;
+  reason?: string;
+  result: number;
+  text?: string;
+  tags?: string[];
+  resource?: string;
+  sess?: string;
+  access?: string;
+  logType: string;
+  tags_str?: string;
+  resType?: string;
+  reqUser: string;
+  reqData?: string;
+  repoType: number;
+  repo: string;
+  proxyUsers?: string[];
+  evtTime: string;
+  enforcer: string;
+  reqContext?: string;
+  cliType?: string;
+  cliIP?: string;
+  agent?: string;
+  agentHost?: string;
+  action?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/bar-graph.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/bar-graph.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/bar-graph.ts
new file mode 100644
index 0000000..d872bd0
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/bar-graph.ts
@@ -0,0 +1,24 @@
+/**
+ * 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 {CommonEntry} from '@app/classes/models/common-entry';
+
+export interface BarGraph {
+  dataCount: CommonEntry[];
+  name: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/common-entry.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/common-entry.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/common-entry.ts
new file mode 100644
index 0000000..dad82ab
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/common-entry.ts
@@ -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.
+ */
+
+export interface CommonEntry {
+  name: string;
+  value: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/count.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/count.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/count.ts
new file mode 100644
index 0000000..02fc41c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/count.ts
@@ -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.
+ */
+
+export interface Count {
+  name: string;
+  count: number;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/filter.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/filter.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/filter.ts
new file mode 100644
index 0000000..c7ff662
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/filter.ts
@@ -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.
+ */
+
+export interface Filter {
+  label: string;
+  hosts: string[];
+  defaultLevels: string[];
+  overrideLevels: string[];
+  expiryTime: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/graph.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/graph.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/graph.ts
new file mode 100644
index 0000000..be31f19
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/graph.ts
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+
+export interface Graph {
+  name: string;
+  count: string;
+  dataList?: Graph[];
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log-field.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log-field.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log-field.ts
new file mode 100644
index 0000000..0e738ab
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log-field.ts
@@ -0,0 +1,27 @@
+/**
+ * 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.
+ */
+
+export class LogField {
+  constructor(name: string) {
+    this.name = name;
+  }
+  name: string;
+  displayName: string = this.name;
+  isDisplayed: boolean = false;
+  isAvailable: boolean = true;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log.ts
new file mode 100644
index 0000000..c598e41
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/log.ts
@@ -0,0 +1,38 @@
+/**
+ * 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.
+ */
+
+export interface Log {
+  type: string;
+  _version_: number;
+  id: string;
+  file?: string;
+  seq_num: number;
+  bundle_id?: string;
+  case_id?: string;
+  log_message: string;
+  logfile_line_number: number;
+  line_number?: number;
+  message_md5: string;
+  cluster: string;
+  event_count: number;
+  event_md5: string;
+  event_dur_ms: number;
+  _ttl_: string;
+  _expire_at_: number;
+  _router_field_?: number;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/node.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/node.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/node.ts
new file mode 100644
index 0000000..a14e51a
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/node.ts
@@ -0,0 +1,30 @@
+/**
+ * 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 {CommonEntry} from '@app/classes/models/common-entry';
+
+export interface Node {
+  name: string;
+  type?: string;
+  value: string;
+  isParent: boolean;
+  isRoot: boolean;
+  childs?: Node[];
+  logLevelCount?: CommonEntry[];
+  vNodeList?: CommonEntry[];
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log-field.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log-field.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log-field.ts
new file mode 100644
index 0000000..0c1c23e
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log-field.ts
@@ -0,0 +1,107 @@
+/**
+ * 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 {LogField} from '@app/classes/models/log-field';
+
+const columnsNamesMap = {
+  log_message: {
+    displayName: 'logs.message',
+    isDisplayed: true
+  },
+  bundle_id: {
+    displayName: 'logs.bundleId'
+  },
+  case_id: {
+    displayName: 'logs.caseId'
+  },
+  cluster: {
+    displayName: 'logs.cluster'
+  },
+  event_count: {
+    displayName: 'logs.eventCount'
+  },
+  file: {
+    displayName: 'logs.file'
+  },
+  host: {
+    displayName: 'logs.host'
+  },
+  id: {
+    displayName: 'logs.id'
+  },
+  ip: {
+    displayName: 'logs.ip'
+  },
+  level: {
+    displayName: 'logs.level',
+    isDisplayed: true
+  },
+  line_number: {
+    displayName: 'logs.lineNumber'
+  },
+  logtype: {
+    displayName: 'logs.logType'
+  },
+  logfile_line_number: {
+    displayName: 'logs.logfileLineNumber'
+  },
+  logger_name: {
+    displayName: 'logs.loggerName'
+  },
+  logtime: {
+    isDisplayed: true
+  },
+  method: {
+    displayName: 'logs.method'
+  },
+  path: {
+    displayName: 'logs.path'
+  },
+  rowtype: {
+    displayName: 'logs.rowType'
+  },
+  thread_name: {
+    displayName: 'logs.threadName'
+  },
+  type: {
+    displayName: 'logs.type',
+    isDisplayed: true
+  },
+  tags: {
+    isAvailable: false
+  },
+  text: {
+    isAvailable: false
+  },
+  message: {
+    isAvailable: false
+  },
+  seq_num: {
+    isAvailable: false
+  }
+};
+
+export class ServiceLogField extends LogField {
+  constructor(name: string) {
+    super(name);
+    const preset = columnsNamesMap[this.name];
+    if (preset) {
+      Object.assign(this, preset);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log.ts
new file mode 100644
index 0000000..2ac026c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/service-log.ts
@@ -0,0 +1,27 @@
+/**
+ * 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 {Log} from '@app/classes/models/log';
+
+export interface ServiceLog extends Log {
+  path: string;
+  host: string;
+  level: string;
+  logtime: number;
+  ip: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/solr-collection-state.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/solr-collection-state.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/solr-collection-state.ts
new file mode 100644
index 0000000..0824dda
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/solr-collection-state.ts
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+
+export interface SolrCollectionState {
+  znodeReady: boolean;
+  configurationUploaded: boolean;
+  solrCollectionReady: boolean;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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
new file mode 100644
index 0000000..c62d3ee
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/store.ts
@@ -0,0 +1,180 @@
+/**
+ * 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 {Observable} from 'rxjs/Observable';
+import {Store, Action} from '@ngrx/store';
+import {AppSettings} from '@app/classes/models/app-settings';
+import {AppState} from '@app/classes/models/app-state';
+import {AuditLog} from '@app/classes/models/audit-log';
+import {ServiceLog} from '@app/classes/models/service-log';
+import {BarGraph} from '@app/classes/models/bar-graph';
+import {Graph} from '@app/classes/models/graph';
+import {Node} from '@app/classes/models/node';
+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';
+
+export const storeActions = {
+  'ARRAY.ADD': 'ADD',
+  'ARRAY.ADD.START': 'ADD_TO_START',
+  'ARRAY.DELETE.PRIMITIVE': 'DELETE_PRIMITIVE',
+  'ARRAY.DELETE.OBJECT': 'DELETE_OBJECT',
+  'ARRAY.CLEAR': 'CLEAR',
+  'ARRAY.MAP': 'MAP',
+
+  'OBJECT.SET': 'SET'
+};
+
+export interface AppStore {
+  appSettings: AppSettings;
+  appState: AppState;
+  auditLogs: AuditLog[];
+  serviceLogs: ServiceLog[];
+  serviceLogsHistogramData: BarGraph[];
+  serviceLogsTruncated: ServiceLog[];
+  graphs: Graph[];
+  hosts: Node[];
+  userConfigs: UserConfig[];
+  filters: Filter[];
+  clusters: string[];
+  components: Node[];
+  serviceLogsFields: ServiceLogField[];
+  auditLogsFields: AuditLogField[];
+}
+
+export class ModelService {
+
+  constructor(modelName: string, store: Store<AppStore>) {
+    this.modelName = modelName;
+    this.store = store;
+  }
+
+  protected modelName: string;
+
+  protected store: Store<AppStore>;
+
+  getAll(): Observable<any> {
+    return this.store.select(this.modelName);
+  }
+
+}
+
+export class CollectionModelService extends ModelService {
+
+  addInstance(instance: any): void {
+    this.addInstances([instance]);
+  }
+
+  addInstances(instances: any[]): void {
+    this.store.dispatch({
+      type: `${storeActions['ARRAY.ADD']}_${this.modelName}`,
+      payload: instances
+    });
+  }
+
+  addInstancesToStart(instances: any[]): void {
+    this.store.dispatch({
+      type: `${storeActions['ARRAY.ADD.START']}_${this.modelName}`,
+      payload: instances
+    });
+  }
+
+  deleteObjectInstance(instance: any): void {
+    this.store.dispatch({
+      type: `${storeActions['ARRAY.DELETE.OBJECT']}_${this.modelName}`,
+      payload: instance
+    });
+  }
+
+  deletePrimitiveInstance(instance: any): void {
+    this.store.dispatch({
+      type: `${storeActions['ARRAY.DELETE.PRIMITIVE']}_${this.modelName}`,
+      payload: instance
+    });
+  }
+
+  clear(): void {
+    this.store.dispatch({
+      type: `${storeActions['ARRAY.CLEAR']}_${this.modelName}`
+    });
+  }
+
+  mapCollection(modifier: (item: any) => {}): void {
+    this.store.dispatch({
+      type: `${storeActions['ARRAY.MAP']}_${this.modelName}`,
+      payload: {
+        modifier: modifier
+      }
+    });
+  }
+
+}
+
+export class ObjectModelService extends ModelService {
+
+  getParameter(key: string): Observable<any> {
+    return this.store.select(this.modelName, key);
+  }
+
+  setParameter(key: string, value: any): void {
+    let payload = {};
+    payload[key] = value;
+    this.setParameters(payload);
+  }
+
+  setParameters(params: any): void {
+    this.store.dispatch({
+      type: `${storeActions['OBJECT.SET']}_${this.modelName}`,
+      payload: params
+    });
+  }
+
+}
+
+export function getCollectionReducer(modelName: string, defaultState: any = []): any {
+  return (state: any = defaultState, action: Action) => {
+    switch (action.type) {
+      case `${storeActions['ARRAY.ADD']}_${modelName}`:
+        return [...state, ...action.payload];
+      case `${storeActions['ARRAY.ADD.START']}_${modelName}`:
+        return [...action.payload, ...state];
+      case `${storeActions['ARRAY.DELETE.OBJECT']}_${modelName}`:
+        return state.filter(instance => instance.id !== action.payload.id);
+      case `${storeActions['ARRAY.DELETE.PRIMITIVE']}_${modelName}`:
+        return state.filter(item => item !== action.payload);
+      case `${storeActions['ARRAY.CLEAR']}_${modelName}`:
+        return [];
+      case `${storeActions['ARRAY.MAP']}_${modelName}`:
+        return state.map(action.payload.modifier);
+      default:
+        return state;
+    }
+  };
+}
+
+export function getObjectReducer(modelName: string, defaultState: any = {}) {
+  return (state: any = defaultState, action: Action): any => {
+    switch (action.type) {
+      case `${storeActions['OBJECT.SET']}_${modelName}`:
+        return Object.assign({}, state, action.payload);
+      default:
+        return state;
+    }
+  };
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/user-config.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/user-config.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/user-config.ts
new file mode 100644
index 0000000..f52761c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/user-config.ts
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export interface UserConfig {
+  id: string;
+  userName: string;
+  filtername: string;
+  values: string;
+  shareNameList: string[];
+  rowType: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.class.ts
deleted file mode 100644
index 3727abb..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.class.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {QueryParams} from '@app/classes/queries/query-params.class';
-
-export const defaultParams = {
-  page: '0',
-  pageSize: '10'
-};
-
-export class AuditLogsQueryParams extends QueryParams {
-  constructor(options: AuditLogsQueryParams) {
-    let finalParams = Object.assign({}, defaultParams, options);
-    const page = parseInt(finalParams.page),
-      pageSize = parseInt(finalParams.pageSize);
-    finalParams.startIndex = isNaN(page) || isNaN(pageSize) ? '' : (page * pageSize).toString();
-    super(finalParams);
-  }
-  page: string;
-  pageSize: string;
-  startIndex: string;
-  sortBy?: string;
-  sortType?: 'asc' | 'desc';
-  clusters?: string;
-  mustBe?: string;
-  mustNot?: string;
-  includeQuery?: string;
-  excludeQuery?: string;
-  from?: string;
-  to?: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.ts
new file mode 100644
index 0000000..509fa04
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.ts
@@ -0,0 +1,46 @@
+/**
+ * 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 {QueryParams} from '@app/classes/queries/query-params';
+
+export const defaultParams = {
+  page: '0',
+  pageSize: '10'
+};
+
+export class AuditLogsQueryParams extends QueryParams {
+  constructor(options: AuditLogsQueryParams) {
+    let finalParams = Object.assign({}, defaultParams, options);
+    const page = parseInt(finalParams.page),
+      pageSize = parseInt(finalParams.pageSize);
+    finalParams.startIndex = isNaN(page) || isNaN(pageSize) ? '' : (page * pageSize).toString();
+    super(finalParams);
+  }
+  page: string;
+  pageSize: string;
+  startIndex: string;
+  sortBy?: string;
+  sortType?: 'asc' | 'desc';
+  clusters?: string;
+  mustBe?: string;
+  mustNot?: string;
+  includeQuery?: string;
+  excludeQuery?: string;
+  from?: string;
+  to?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.class.ts
deleted file mode 100644
index 83c3261..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.class.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export class QueryParams {
-  constructor(options: QueryParams) {
-    Object.assign(this, options);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.ts
new file mode 100644
index 0000000..83c3261
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.ts
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+
+export class QueryParams {
+  constructor(options: QueryParams) {
+    Object.assign(this, options);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts
deleted file mode 100644
index efa2459..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {ServiceLogsHistogramQueryParams} from './service-logs-histogram-query-params.class';
-
-describe('ServiceLogsHistogramQueryParams', () => {
-
-  describe('constructor', () => {
-    const cases = [
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:00:00.100Z'
-        },
-        unit: '+100MILLISECOND',
-        title: 'less than 1s'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:00:01Z'
-        },
-        unit: '+100MILLISECOND',
-        title: '1s'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:00:20Z'
-        },
-        unit: '+500MILLISECOND',
-        title: 'between 1s and 30s'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:00:20Z'
-        },
-        unit: '+500MILLISECOND',
-        title: '30s'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:00:40Z'
-        },
-        unit: '+2SECOND',
-        title: 'between 30s and 1m'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:01:00Z'
-        },
-        unit: '+2SECOND',
-        title: '1m'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:20:00Z'
-        },
-        unit: '+1MINUTE',
-        title: 'between 1m and 30m'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T00:30:00Z'
-        },
-        unit: '+2MINUTE',
-        title: '30m'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T01:00:00Z'
-        },
-        unit: '+2MINUTE',
-        title: 'between 30m and 2h'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T02:00:00Z'
-        },
-        unit: '+5MINUTE',
-        title: '2h'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T04:00:00Z'
-        },
-        unit: '+5MINUTE',
-        title: 'between 2h and 6h'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T06:00:00Z'
-        },
-        unit: '+10MINUTE',
-        title: '6h'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T08:00:00Z'
-        },
-        unit: '+10MINUTE',
-        title: 'between 6h and 10h'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T10:00:00Z'
-        },
-        unit: '+10MINUTE',
-        title: '10h'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-01T22:00:00Z'
-        },
-        unit: '+1HOUR',
-        title: 'between 10h and 1d'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-02T00:00:00Z'
-        },
-        unit: '+1HOUR',
-        title: '1d'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-10T00:00:00Z'
-        },
-        unit: '+8HOUR',
-        title: 'between 1d and 15d'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-01-16T00:00:00Z'
-        },
-        unit: '+1DAY',
-        title: '15d'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-03-31T00:00:00Z'
-        },
-        unit: '+1DAY',
-        title: 'between 15d and 3M'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-04-01T00:00:00Z'
-        },
-        unit: '+1DAY',
-        title: '3M'
-      },
-      {
-        options: {
-          from: '2017-01-01T00:00:00Z',
-          to: '2017-05-01T00:00:00Z'
-        },
-        unit: '+1MONTH',
-        title: 'over 3M'
-      }
-    ];
-
-    cases.forEach(test => {
-      it(test.title, () => {
-        const paramsObject = new ServiceLogsHistogramQueryParams(test.options);
-        expect(paramsObject.unit).toEqual(test.unit);
-      });
-    });
-  });
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.ts
deleted file mode 100644
index 2e2113f..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {QueryParams} from '@app/classes/queries/query-params.class';
-
-export class ServiceLogsHistogramQueryParams extends QueryParams {
-  constructor(options: ServiceLogsHistogramQueryParams) {
-    let unit;
-    const diffTimeStamp = new Date(options.to).valueOf() - new Date(options.from).valueOf();
-    switch (true) {
-      case diffTimeStamp <= 1000:
-        unit = '+100MILLISECOND';
-        break;
-      case diffTimeStamp <= 30000:
-        unit = '+500MILLISECOND';
-        break;
-      case diffTimeStamp <= 60000:
-        unit = '+2SECOND';
-        break;
-      case diffTimeStamp < 1800000:
-        unit = '+1MINUTE';
-        break;
-      case diffTimeStamp < 7200000:
-        unit = '+2MINUTE';
-        break;
-      case diffTimeStamp < 21600000:
-        unit = '+5MINUTE';
-        break;
-      case diffTimeStamp <= 36000000:
-        unit = '+10MINUTE';
-        break;
-      case diffTimeStamp <= 86400000:
-        unit = '+1HOUR';
-        break;
-      case diffTimeStamp < 1296000000:
-        unit = '+8HOUR';
-        break;
-      case diffTimeStamp <= 7776000000:
-        unit = '+1DAY';
-        break;
-      default:
-        unit = '+1MONTH';
-        break;
-    }
-    options.unit = unit;
-    super(options);
-  }
-  from: string;
-  to: string;
-  unit?: string;
-  clusters?: string;
-  level?: string;
-  includeQuery?: string;
-  excludeQuery?: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.spec.ts
new file mode 100644
index 0000000..eb891ed
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.spec.ts
@@ -0,0 +1,203 @@
+/**
+ * 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 {ServiceLogsHistogramQueryParams} from './service-logs-histogram-query-params';
+
+describe('ServiceLogsHistogramQueryParams', () => {
+
+  describe('constructor', () => {
+    const cases = [
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:00:00.100Z'
+        },
+        unit: '+100MILLISECOND',
+        title: 'less than 1s'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:00:01Z'
+        },
+        unit: '+100MILLISECOND',
+        title: '1s'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:00:20Z'
+        },
+        unit: '+500MILLISECOND',
+        title: 'between 1s and 30s'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:00:20Z'
+        },
+        unit: '+500MILLISECOND',
+        title: '30s'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:00:40Z'
+        },
+        unit: '+2SECOND',
+        title: 'between 30s and 1m'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:01:00Z'
+        },
+        unit: '+2SECOND',
+        title: '1m'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:20:00Z'
+        },
+        unit: '+1MINUTE',
+        title: 'between 1m and 30m'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T00:30:00Z'
+        },
+        unit: '+2MINUTE',
+        title: '30m'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T01:00:00Z'
+        },
+        unit: '+2MINUTE',
+        title: 'between 30m and 2h'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T02:00:00Z'
+        },
+        unit: '+5MINUTE',
+        title: '2h'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T04:00:00Z'
+        },
+        unit: '+5MINUTE',
+        title: 'between 2h and 6h'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T06:00:00Z'
+        },
+        unit: '+10MINUTE',
+        title: '6h'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T08:00:00Z'
+        },
+        unit: '+10MINUTE',
+        title: 'between 6h and 10h'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T10:00:00Z'
+        },
+        unit: '+10MINUTE',
+        title: '10h'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-01T22:00:00Z'
+        },
+        unit: '+1HOUR',
+        title: 'between 10h and 1d'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-02T00:00:00Z'
+        },
+        unit: '+1HOUR',
+        title: '1d'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-10T00:00:00Z'
+        },
+        unit: '+8HOUR',
+        title: 'between 1d and 15d'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-01-16T00:00:00Z'
+        },
+        unit: '+1DAY',
+        title: '15d'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-03-31T00:00:00Z'
+        },
+        unit: '+1DAY',
+        title: 'between 15d and 3M'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-04-01T00:00:00Z'
+        },
+        unit: '+1DAY',
+        title: '3M'
+      },
+      {
+        options: {
+          from: '2017-01-01T00:00:00Z',
+          to: '2017-05-01T00:00:00Z'
+        },
+        unit: '+1MONTH',
+        title: 'over 3M'
+      }
+    ];
+
+    cases.forEach(test => {
+      it(test.title, () => {
+        const paramsObject = new ServiceLogsHistogramQueryParams(test.options);
+        expect(paramsObject.unit).toEqual(test.unit);
+      });
+    });
+  });
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.ts
new file mode 100644
index 0000000..148aa62
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.ts
@@ -0,0 +1,70 @@
+/**
+ * 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 {QueryParams} from '@app/classes/queries/query-params';
+
+export class ServiceLogsHistogramQueryParams extends QueryParams {
+  constructor(options: ServiceLogsHistogramQueryParams) {
+    let unit;
+    const diffTimeStamp = new Date(options.to).valueOf() - new Date(options.from).valueOf();
+    switch (true) {
+      case diffTimeStamp <= 1000:
+        unit = '+100MILLISECOND';
+        break;
+      case diffTimeStamp <= 30000:
+        unit = '+500MILLISECOND';
+        break;
+      case diffTimeStamp <= 60000:
+        unit = '+2SECOND';
+        break;
+      case diffTimeStamp < 1800000:
+        unit = '+1MINUTE';
+        break;
+      case diffTimeStamp < 7200000:
+        unit = '+2MINUTE';
+        break;
+      case diffTimeStamp < 21600000:
+        unit = '+5MINUTE';
+        break;
+      case diffTimeStamp <= 36000000:
+        unit = '+10MINUTE';
+        break;
+      case diffTimeStamp <= 86400000:
+        unit = '+1HOUR';
+        break;
+      case diffTimeStamp < 1296000000:
+        unit = '+8HOUR';
+        break;
+      case diffTimeStamp <= 7776000000:
+        unit = '+1DAY';
+        break;
+      default:
+        unit = '+1MONTH';
+        break;
+    }
+    options.unit = unit;
+    super(options);
+  }
+  from: string;
+  to: string;
+  unit?: string;
+  clusters?: string;
+  level?: string;
+  includeQuery?: string;
+  excludeQuery?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.class.ts
deleted file mode 100644
index 864b689..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.class.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {AuditLogsQueryParams} from '@app/classes/queries/audit-logs-query-params.class';
-
-export class ServiceLogsQueryParams extends AuditLogsQueryParams {
-  level?: string;
-  file_name?: string;
-  bundle_id?: string;
-  hostList?: string;
-  find?: string;
-  sourceLogId?: string;
-  keywordType?: string;
-  token?: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.ts
new file mode 100644
index 0000000..0700a98
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.ts
@@ -0,0 +1,30 @@
+/**
+ * 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 {AuditLogsQueryParams} from '@app/classes/queries/audit-logs-query-params';
+
+export class ServiceLogsQueryParams extends AuditLogsQueryParams {
+  level?: string;
+  file_name?: string;
+  bundle_id?: string;
+  hostList?: string;
+  find?: string;
+  sourceLogId?: string;
+  keywordType?: string;
+  token?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.class.ts
deleted file mode 100644
index da05cee..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.class.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {QueryParams} from '@app/classes/queries/query-params.class';
-
-export const defaultParams = {
-  numberRows: '10',
-  scrollType: ''
-};
-
-export class ServiceLogsTruncatedQueryParams extends QueryParams {
-  constructor(options: ServiceLogsTruncatedQueryParams) {
-    const finalParams = Object.assign({}, defaultParams, options);
-    super(finalParams);
-  }
-  id: string;
-  host_name: string;
-  component_name: string;
-  numberRows: string;
-  scrollType: 'before' | 'after' | '';
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.ts
new file mode 100644
index 0000000..6f9de16
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-truncated-query-params.ts
@@ -0,0 +1,36 @@
+/**
+ * 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 {QueryParams} from '@app/classes/queries/query-params';
+
+export const defaultParams = {
+  numberRows: '10',
+  scrollType: ''
+};
+
+export class ServiceLogsTruncatedQueryParams extends QueryParams {
+  constructor(options: ServiceLogsTruncatedQueryParams) {
+    const finalParams = Object.assign({}, defaultParams, options);
+    super(finalParams);
+  }
+  id: string;
+  host_name: string;
+  component_name: string;
+  numberRows: string;
+  scrollType: 'before' | 'after' | '';
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.class.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.class.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.class.ts
deleted file mode 100644
index 15c05fb..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.class.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface ServiceLogContextEntry {
-  id: string;
-  time: number;
-  level: string;
-  message: string;
-  fileName: string | null;
-  lineNumber: number | null;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.ts b/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.ts
new file mode 100644
index 0000000..15c05fb
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/service-log-context-entry.ts
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export interface ServiceLogContextEntry {
+  id: string;
+  time: number;
+  level: string;
+  message: string;
+  fileName: string | null;
+  lineNumber: number | null;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.ts
index 43d79f8..0bf4422 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.ts
@@ -17,7 +17,7 @@
  */
 
 import {Component, OnInit, Input} from '@angular/core';
-import {ListItem} from '@app/classes/list-item.class';
+import {ListItem} from '@app/classes/list-item';
 import {ComponentActionsService} from '@app/services/component-actions.service';
 import {UtilsService} from '@app/services/utils.service';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.ts
index 656c901..ef185d0 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-list/dropdown-list.component.ts
@@ -17,7 +17,7 @@
  */
 
 import {Component, AfterViewInit, Input, Output, EventEmitter, ViewChildren, ViewContainerRef, QueryList} from '@angular/core';
-import {ListItem} from '@app/classes/list-item.class';
+import {ListItem} from '@app/classes/list-item';
 import {ComponentGeneratorService} from '@app/services/component-generator.service';
 import {ComponentActionsService} from '@app/services/component-actions.service';
 


[3/5] ambari git commit: AMBARI-22129 Log Search UI: reorganize classes structure. (ababiichuk)

Posted by rl...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.ts
index 1481583..2c8ecd7 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filter-button/filter-button.component.ts
@@ -18,7 +18,7 @@
 
 import {Component, Input, forwardRef} from '@angular/core';
 import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
-import {ListItem} from "@app/classes/list-item.class";
+import {ListItem} from "@app/classes/list-item";
 import {ComponentActionsService} from '@app/services/component-actions.service';
 import {UtilsService} from '@app/services/utils.service';
 import {MenuButtonComponent} from '@app/components/menu-button/menu-button.component';

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 c345c81..5eef03e 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
@@ -20,8 +20,8 @@ import {Component} 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.class';
-import {CommonEntry} from '@app/models/common-entry.model';
+import {ListItem} from '@app/classes/list-item';
+import {CommonEntry} from '@app/classes/models/common-entry';
 import {FilteringService} from '@app/services/filtering.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {AppStateService} from '@app/services/storage/app-state.service';

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.ts
index 467de98..c0411e5 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-context/log-context.component.ts
@@ -21,8 +21,8 @@ import 'rxjs/add/operator/map';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {ServiceLogsTruncatedService} from '@app/services/storage/service-logs-truncated.service';
 import {AppStateService} from '@app/services/storage/app-state.service';
-import {ServiceLog} from '@app/models/service-log.model';
-import {ServiceLogContextEntry} from '@app/classes/service-log-context-entry.class';
+import {ServiceLog} from '@app/classes/models/service-log';
+import {ServiceLogContextEntry} from '@app/classes/service-log-context-entry';
 
 @Component({
   selector: 'log-context',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 7345288..63fafb6 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
@@ -24,11 +24,11 @@ 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 {AuditLog} from '@app/models/audit-log.model';
-import {ServiceLog} from '@app/models/service-log.model';
-import {LogField} from '@app/models/log-field.model';
-import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry.class';
-import {HistogramOptions} from '@app/classes/histogram-options.class';
+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 {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
+import {HistogramOptions} from '@app/classes/histogram-options';
 
 @Component({
   selector: 'logs-container',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 c94b967..2462a61 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
@@ -21,8 +21,8 @@ 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/models/audit-log.model';
-import {ServiceLog} from '@app/models/service-log.model';
+import {AuditLog} from '@app/classes/models/audit-log';
+import {ServiceLog} from '@app/classes/models/service-log';
 
 @Component({
   selector: 'logs-list',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 32fe1cf..ad86a74 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
@@ -21,9 +21,9 @@ 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/models/audit-log-field.model';
-import {ServiceLogField} from '@app/models/service-log-field.model';
-import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry.class';
+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',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.ts
index 7e347e6..3bac984 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/menu-button/menu-button.component.ts
@@ -17,7 +17,7 @@
  */
 
 import {Component, Input, ViewChild, ElementRef} from '@angular/core';
-import {ListItem} from '@app/classes/list-item.class';
+import {ListItem} from '@app/classes/list-item';
 import {ComponentActionsService} from '@app/services/component-actions.service';
 import * as $ from 'jquery';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/search-box/search-box.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/search-box/search-box.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/search-box/search-box.component.ts
index e547a62..5520310 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/search-box/search-box.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/search-box/search-box.component.ts
@@ -19,7 +19,7 @@
 import {Component, OnInit, OnDestroy, Input, ViewChild, ElementRef, forwardRef} from '@angular/core';
 import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
 import {Subject} from 'rxjs/Subject';
-import {CommonEntry} from '@app/models/common-entry.model';
+import {CommonEntry} from '@app/classes/models/common-entry';
 import {UtilsService} from '@app/services/utils.service';
 
 @Component({

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.ts
index c3ec388..e255166 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/time-histogram/time-histogram.component.ts
@@ -21,7 +21,7 @@ import {ContainerElement, Selection} from 'd3';
 import * as d3 from 'd3';
 import * as moment from 'moment-timezone';
 import {AppSettingsService} from '@app/services/storage/app-settings.service';
-import {HistogramStyleOptions, HistogramOptions} from '@app/classes/histogram-options.class';
+import {HistogramStyleOptions, HistogramOptions} from '@app/classes/histogram-options';
 
 @Component({
   selector: 'time-histogram',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/app-settings.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/app-settings.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/app-settings.model.ts
deleted file mode 100644
index 11821a3..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/app-settings.model.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import * as moment from 'moment-timezone';
-
-export interface AppSettings {
-  timeZone: string;
-}
-
-export const defaultSettings: AppSettings = {
-  timeZone: moment.tz.guess()
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/app-state.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/app-state.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/app-state.model.ts
deleted file mode 100644
index 267bf15..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/app-state.model.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry.class';
-
-export interface AppState {
-  isAuthorized: boolean;
-  isInitialLoading: boolean;
-  isLoginInProgress: boolean;
-  isAuditLogsSet: boolean;
-  isServiceLogsSet: boolean;
-  activeLogsType?: string;
-  isServiceLogsFileView: boolean;
-  isServiceLogContextView: boolean;
-  activeLog: ActiveServiceLogEntry | null;
-}
-
-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
-  isServiceLogsFileView: false,
-  isServiceLogContextView: false,
-  activeLog: null
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log-field.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log-field.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log-field.model.ts
deleted file mode 100644
index 96372a1..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log-field.model.ts
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {LogField} from '@app/models/log-field.model';
-
-const columnsNamesMap = {
-  access: {
-    displayName: 'logs.accessType',
-    isDisplayed: true
-  },
-  action: {
-    displayName: 'logs.action'
-  },
-  agent: {
-    displayName: 'logs.agent'
-  },
-  agentHost: {
-    displayName: 'logs.agentHost'
-  },
-  authType: {
-    displayName: 'logs.authType'
-  },
-  bundle_id: {
-    displayName: 'logs.bundleId'
-  },
-  case_id: {
-    displayName: 'logs.caseId'
-  },
-  cliIP: {
-    displayName: 'logs.clientIp',
-    isDisplayed: true
-  },
-  cliType: {
-    displayName: 'logs.clientType'
-  },
-  cluster: {
-    displayName: 'logs.cluster'
-  },
-  dst: {
-    displayName: 'logs.dst'
-  },
-  evtTime: {
-    displayName: 'logs.eventTime',
-    isDisplayed: true
-  },
-  file: {
-    displayName: 'logs.file'
-  },
-  host: {
-    displayName: 'logs.host'
-  },
-  id: {
-    displayName: 'logs.id'
-  },
-  ip: {
-    displayName: 'logs.ip'
-  },
-  level: {
-    displayName: 'logs.level'
-  },
-  log_message: {
-    displayName: 'logs.message'
-  },
-  logType: {
-    displayName: 'logs.logType'
-  },
-  logfile_line_number: {
-    displayName: 'logs.logfileLineNumber'
-  },
-  logger_name: {
-    displayName: 'logs.loggerName'
-  },
-  logtime: {
-    displayName: 'logs.logTime'
-  },
-  path: {
-    displayName: 'logs.path'
-  },
-  perm: {
-    displayName: 'logs.perm'
-  },
-  policy: {
-    displayName: 'logs.policy'
-  },
-  proxyUsers: {
-    displayName: 'logs.proxyUsers'
-  },
-  reason: {
-    displayName: 'logs.reason'
-  },
-  repo: {
-    displayName: 'logs.repo',
-    isDisplayed: true
-  },
-  repoType: {
-    displayName: 'logs.repoType'
-  },
-  req_caller_id: {
-    displayName: 'logs.reqCallerId'
-  },
-  reqContext: {
-    displayName: 'logs.reqContext'
-  },
-  reqData: {
-    displayName: 'logs.reqData'
-  },
-  req_self_id: {
-    displayName: 'logs.reqSelfId'
-  },
-  resType: {
-    displayName: 'logs.resType'
-  },
-  resource: {
-    displayName: 'logs.resource',
-    isDisplayed: true
-  },
-  result: {
-    displayName: 'logs.result',
-    isDisplayed: true
-  },
-  sess: {
-    displayName: 'logs.session'
-  },
-  text: {
-    displayName: 'logs.text'
-  },
-  type: {
-    displayName: 'logs.type'
-  },
-  ugi: {
-    displayName: 'logs.ugi'
-  },
-  reqUser: {
-    displayName: 'logs.user',
-    isDisplayed: true
-  },
-  ws_base_url: {
-    displayName: 'logs.baseUrl'
-  },
-  ws_command: {
-    displayName: 'logs.command'
-  },
-  ws_component: {
-    displayName: 'logs.component'
-  },
-  ws_details: {
-    displayName: 'logs.details'
-  },
-  ws_display_name: {
-    displayName: 'logs.displayName'
-  },
-  ws_os: {
-    displayName: 'logs.os'
-  },
-  ws_repo_id: {
-    displayName: 'logs.repoId'
-  },
-  ws_repo_version: {
-    displayName: 'logs.repoVersion'
-  },
-  ws_repositories: {
-    displayName: 'logs.repositories'
-  },
-  ws_request_id: {
-    displayName: 'logs.requestId'
-  },
-  ws_result_status: {
-    displayName: 'logs.resultStatus'
-  },
-  ws_roles: {
-    displayName: 'logs.roles'
-  },
-  ws_stack_version: {
-    displayName: 'logs.stackVersion'
-  },
-  ws_stack: {
-    displayName: 'logs.stack'
-  },
-  ws_status: {
-    displayName: 'logs.status'
-  },
-  ws_task_id: {
-    displayName: 'logs.taskId'
-  },
-  ws_version_note: {
-    displayName: 'logs.versionNote'
-  },
-  ws_version_number: {
-    displayName: 'logs.versionNumber'
-  },
-  tags: {
-    isAvailable: false
-  },
-  tags_str: {
-    isAvailable: false
-  },
-  seq_num: {
-    isAvailable: false
-  }
-};
-
-export class AuditLogField extends LogField {
-  constructor(name: string) {
-    super(name);
-    const preset = columnsNamesMap[this.name];
-    if (preset) {
-      Object.assign(this, preset);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log.model.ts
deleted file mode 100644
index 2b34cd6..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/audit-log.model.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {Log} from '@app/models/log.model';
-
-export interface AuditLog extends Log {
-  policy?: string;
-  reason?: string;
-  result: number;
-  text?: string;
-  tags?: string[];
-  resource?: string;
-  sess?: string;
-  access?: string;
-  logType: string;
-  tags_str?: string;
-  resType?: string;
-  reqUser: string;
-  reqData?: string;
-  repoType: number;
-  repo: string;
-  proxyUsers?: string[];
-  evtTime: string;
-  enforcer: string;
-  reqContext?: string;
-  cliType?: string;
-  cliIP?: string;
-  agent?: string;
-  agentHost?: string;
-  action?: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/bar-graph.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/bar-graph.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/bar-graph.model.ts
deleted file mode 100644
index 6c9a049..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/bar-graph.model.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {CommonEntry} from '@app/models/common-entry.model';
-
-export interface BarGraph {
-  dataCount: CommonEntry[];
-  name: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/common-entry.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/common-entry.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/common-entry.model.ts
deleted file mode 100644
index dad82ab..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/common-entry.model.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface CommonEntry {
-  name: string;
-  value: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/count.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/count.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/count.model.ts
deleted file mode 100644
index 02fc41c..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/count.model.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface Count {
-  name: string;
-  count: number;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/filter.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/filter.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/filter.model.ts
deleted file mode 100644
index c7ff662..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/filter.model.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface Filter {
-  label: string;
-  hosts: string[];
-  defaultLevels: string[];
-  overrideLevels: string[];
-  expiryTime: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/graph.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/graph.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/graph.model.ts
deleted file mode 100644
index be31f19..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/graph.model.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface Graph {
-  name: string;
-  count: string;
-  dataList?: Graph[];
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/log-field.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/log-field.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/log-field.model.ts
deleted file mode 100644
index 0e738ab..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/log-field.model.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export class LogField {
-  constructor(name: string) {
-    this.name = name;
-  }
-  name: string;
-  displayName: string = this.name;
-  isDisplayed: boolean = false;
-  isAvailable: boolean = true;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/log.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/log.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/log.model.ts
deleted file mode 100644
index c598e41..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/log.model.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface Log {
-  type: string;
-  _version_: number;
-  id: string;
-  file?: string;
-  seq_num: number;
-  bundle_id?: string;
-  case_id?: string;
-  log_message: string;
-  logfile_line_number: number;
-  line_number?: number;
-  message_md5: string;
-  cluster: string;
-  event_count: number;
-  event_md5: string;
-  event_dur_ms: number;
-  _ttl_: string;
-  _expire_at_: number;
-  _router_field_?: number;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
deleted file mode 100644
index b01421e..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/node.model.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {CommonEntry} from '@app/models/common-entry.model';
-
-export interface Node {
-  name: string;
-  type?: string;
-  value: string;
-  isParent: boolean;
-  isRoot: boolean;
-  childs?: Node[];
-  logLevelCount?: CommonEntry[];
-  vNodeList?: CommonEntry[];
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log-field.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log-field.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log-field.model.ts
deleted file mode 100644
index 081eecf..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log-field.model.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {LogField} from '@app/models/log-field.model';
-
-const columnsNamesMap = {
-  log_message: {
-    displayName: 'logs.message',
-    isDisplayed: true
-  },
-  bundle_id: {
-    displayName: 'logs.bundleId'
-  },
-  case_id: {
-    displayName: 'logs.caseId'
-  },
-  cluster: {
-    displayName: 'logs.cluster'
-  },
-  event_count: {
-    displayName: 'logs.eventCount'
-  },
-  file: {
-    displayName: 'logs.file'
-  },
-  host: {
-    displayName: 'logs.host'
-  },
-  id: {
-    displayName: 'logs.id'
-  },
-  ip: {
-    displayName: 'logs.ip'
-  },
-  level: {
-    displayName: 'logs.level',
-    isDisplayed: true
-  },
-  line_number: {
-    displayName: 'logs.lineNumber'
-  },
-  logtype: {
-    displayName: 'logs.logType'
-  },
-  logfile_line_number: {
-    displayName: 'logs.logfileLineNumber'
-  },
-  logger_name: {
-    displayName: 'logs.loggerName'
-  },
-  logtime: {
-    isDisplayed: true
-  },
-  method: {
-    displayName: 'logs.method'
-  },
-  path: {
-    displayName: 'logs.path'
-  },
-  rowtype: {
-    displayName: 'logs.rowType'
-  },
-  thread_name: {
-    displayName: 'logs.threadName'
-  },
-  type: {
-    displayName: 'logs.type',
-    isDisplayed: true
-  },
-  tags: {
-    isAvailable: false
-  },
-  text: {
-    isAvailable: false
-  },
-  message: {
-    isAvailable: false
-  },
-  seq_num: {
-    isAvailable: false
-  }
-};
-
-export class ServiceLogField extends LogField {
-  constructor(name: string) {
-    super(name);
-    const preset = columnsNamesMap[this.name];
-    if (preset) {
-      Object.assign(this, preset);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log.model.ts
deleted file mode 100644
index ee27343..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/service-log.model.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {Log} from '@app/models/log.model';
-
-export interface ServiceLog extends Log {
-  path: string;
-  host: string;
-  level: string;
-  logtime: number;
-  ip: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/solr-collection-state.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/solr-collection-state.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/solr-collection-state.model.ts
deleted file mode 100644
index 0824dda..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/solr-collection-state.model.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface SolrCollectionState {
-  znodeReady: boolean;
-  configurationUploaded: boolean;
-  solrCollectionReady: boolean;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
deleted file mode 100644
index 518e7cd..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/store.model.ts
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {Observable} from 'rxjs/Observable';
-import {Store, Action} from '@ngrx/store';
-import {AppSettings} from '@app/models/app-settings.model';
-import {AppState} from '@app/models/app-state.model';
-import {AuditLog} from '@app/models/audit-log.model';
-import {ServiceLog} from '@app/models/service-log.model';
-import {BarGraph} from '@app/models/bar-graph.model';
-import {Graph} from '@app/models/graph.model';
-import {Node} from '@app/models/node.model';
-import {UserConfig} from '@app/models/user-config.model';
-import {Filter} from '@app/models/filter.model';
-import {AuditLogField} from '@app/models/audit-log-field.model';
-import {ServiceLogField} from '@app/models/service-log-field.model';
-
-export const storeActions = {
-  'ARRAY.ADD': 'ADD',
-  'ARRAY.ADD.START': 'ADD_TO_START',
-  'ARRAY.DELETE.PRIMITIVE': 'DELETE_PRIMITIVE',
-  'ARRAY.DELETE.OBJECT': 'DELETE_OBJECT',
-  'ARRAY.CLEAR': 'CLEAR',
-  'ARRAY.MAP': 'MAP',
-
-  'OBJECT.SET': 'SET'
-};
-
-export interface AppStore {
-  appSettings: AppSettings;
-  appState: AppState;
-  auditLogs: AuditLog[];
-  serviceLogs: ServiceLog[];
-  serviceLogsHistogramData: BarGraph[];
-  serviceLogsTruncated: ServiceLog[];
-  graphs: Graph[];
-  hosts: Node[];
-  userConfigs: UserConfig[];
-  filters: Filter[];
-  clusters: string[];
-  components: Node[];
-  serviceLogsFields: ServiceLogField[];
-  auditLogsFields: AuditLogField[];
-}
-
-export class ModelService {
-
-  constructor(modelName: string, store: Store<AppStore>) {
-    this.modelName = modelName;
-    this.store = store;
-  }
-
-  protected modelName: string;
-
-  protected store: Store<AppStore>;
-
-  getAll(): Observable<any> {
-    return this.store.select(this.modelName);
-  }
-
-}
-
-export class CollectionModelService extends ModelService {
-
-  addInstance(instance: any): void {
-    this.addInstances([instance]);
-  }
-
-  addInstances(instances: any[]): void {
-    this.store.dispatch({
-      type: `${storeActions['ARRAY.ADD']}_${this.modelName}`,
-      payload: instances
-    });
-  }
-
-  addInstancesToStart(instances: any[]): void {
-    this.store.dispatch({
-      type: `${storeActions['ARRAY.ADD.START']}_${this.modelName}`,
-      payload: instances
-    });
-  }
-
-  deleteObjectInstance(instance: any): void {
-    this.store.dispatch({
-      type: `${storeActions['ARRAY.DELETE.OBJECT']}_${this.modelName}`,
-      payload: instance
-    });
-  }
-
-  deletePrimitiveInstance(instance: any): void {
-    this.store.dispatch({
-      type: `${storeActions['ARRAY.DELETE.PRIMITIVE']}_${this.modelName}`,
-      payload: instance
-    });
-  }
-
-  clear(): void {
-    this.store.dispatch({
-      type: `${storeActions['ARRAY.CLEAR']}_${this.modelName}`
-    });
-  }
-
-  mapCollection(modifier: (item: any) => {}): void {
-    this.store.dispatch({
-      type: `${storeActions['ARRAY.MAP']}_${this.modelName}`,
-      payload: {
-        modifier: modifier
-      }
-    });
-  }
-
-}
-
-export class ObjectModelService extends ModelService {
-
-  getParameter(key: string): Observable<any> {
-    return this.store.select(this.modelName, key);
-  }
-
-  setParameter(key: string, value: any): void {
-    let payload = {};
-    payload[key] = value;
-    this.setParameters(payload);
-  }
-
-  setParameters(params: any): void {
-    this.store.dispatch({
-      type: `${storeActions['OBJECT.SET']}_${this.modelName}`,
-      payload: params
-    });
-  }
-
-}
-
-export function getCollectionReducer(modelName: string, defaultState: any = []): any {
-  return (state: any = defaultState, action: Action) => {
-    switch (action.type) {
-      case `${storeActions['ARRAY.ADD']}_${modelName}`:
-        return [...state, ...action.payload];
-      case `${storeActions['ARRAY.ADD.START']}_${modelName}`:
-        return [...action.payload, ...state];
-      case `${storeActions['ARRAY.DELETE.OBJECT']}_${modelName}`:
-        return state.filter(instance => instance.id !== action.payload.id);
-      case `${storeActions['ARRAY.DELETE.PRIMITIVE']}_${modelName}`:
-        return state.filter(item => item !== action.payload);
-      case `${storeActions['ARRAY.CLEAR']}_${modelName}`:
-        return [];
-      case `${storeActions['ARRAY.MAP']}_${modelName}`:
-        return state.map(action.payload.modifier);
-      default:
-        return state;
-    }
-  };
-}
-
-export function getObjectReducer(modelName: string, defaultState: any = {}) {
-  return (state: any = defaultState, action: Action): any => {
-    switch (action.type) {
-      case `${storeActions['OBJECT.SET']}_${modelName}`:
-        return Object.assign({}, state, action.payload);
-      default:
-        return state;
-    }
-  };
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/models/user-config.model.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/models/user-config.model.ts b/ambari-logsearch/ambari-logsearch-web/src/app/models/user-config.model.ts
deleted file mode 100644
index f52761c..0000000
--- a/ambari-logsearch/ambari-logsearch-web/src/app/models/user-config.model.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface UserConfig {
-  id: string;
-  userName: string;
-  filtername: string;
-  values: string;
-  shareNameList: string[];
-  rowType: string;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 b3ff0b0..19b873c 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
@@ -19,10 +19,10 @@
 import {Injectable} from '@angular/core';
 import {AppSettingsService} from '@app/services/storage/app-settings.service';
 import {AppStateService} from '@app/services/storage/app-state.service';
-import {CollectionModelService} from '@app/models/store.model';
+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/models/service-log.model';
+import {ServiceLog} from '@app/classes/models/service-log';
 
 @Injectable()
 export class ComponentActionsService {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 c4db041..5d79902 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
@@ -24,8 +24,8 @@ import {ComponentsService, components} from '@app/services/storage/components.se
 import {HostsService, hosts} from '@app/services/storage/hosts.service';
 import {UtilsService} from '@app/services/utils.service';
 import {HttpClientService} from '@app/services/http-client.service';
-import {ListItem} from '@app/classes/list-item.class';
-import {Node} from '@app/models/node.model';
+import {ListItem} from '@app/classes/list-item';
+import {Node} from '@app/classes/models/node';
 
 import {FilteringService} from './filtering.service';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 7fe6517..9e3a7d2 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
@@ -24,8 +24,8 @@ import {Observable} from 'rxjs/Observable';
 import 'rxjs/add/observable/timer';
 import 'rxjs/add/operator/takeUntil';
 import * as moment from 'moment-timezone';
-import {ListItem} from '@app/classes/list-item.class';
-import {Node} from '@app/models/node.model';
+import {ListItem} from '@app/classes/list-item';
+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';

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
index 495f706..9b61bf6 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/http-client.service.ts
@@ -20,10 +20,10 @@ import {Injectable} from '@angular/core';
 import {Observable} from 'rxjs/Observable';
 import 'rxjs/add/operator/first';
 import {Http, XHRBackend, Request, RequestOptions, RequestOptionsArgs, Response, Headers, URLSearchParams} from '@angular/http';
-import {AuditLogsQueryParams} from '@app/classes/queries/audit-logs-query-params.class';
-import {ServiceLogsQueryParams} from '@app/classes/queries/service-logs-query-params.class';
-import {ServiceLogsHistogramQueryParams} from '@app/classes/queries/service-logs-histogram-query-params.class';
-import {ServiceLogsTruncatedQueryParams} from '@app/classes/queries/service-logs-truncated-query-params.class';
+import {AuditLogsQueryParams} from '@app/classes/queries/audit-logs-query-params';
+import {ServiceLogsQueryParams} from '@app/classes/queries/service-logs-query-params';
+import {ServiceLogsHistogramQueryParams} from '@app/classes/queries/service-logs-histogram-query-params';
+import {ServiceLogsTruncatedQueryParams} from '@app/classes/queries/service-logs-truncated-query-params';
 import {AppStateService} from '@app/services/storage/app-state.service';
 
 @Injectable()

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/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 14e9ad4..0319262 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
@@ -26,7 +26,7 @@ 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 {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry.class';
+import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
 
 @Injectable()
 export class LogsContainerService {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-settings.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-settings.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-settings.service.ts
index 6de9988..cec2656 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-settings.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-settings.service.ts
@@ -18,8 +18,8 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {defaultSettings} from '@app/models/app-settings.model';
-import {AppStore, ObjectModelService, getObjectReducer} from '@app/models/store.model';
+import {defaultSettings} from '@app/classes/models/app-settings';
+import {AppStore, ObjectModelService, getObjectReducer} from '@app/classes/models/store';
 
 export const modelName = 'appSettings';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-state.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-state.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-state.service.ts
index d77d80f..df773fc 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-state.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/app-state.service.ts
@@ -18,8 +18,8 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {initialState} from '@app/models/app-state.model';
-import {AppStore, ObjectModelService, getObjectReducer} from '@app/models/store.model';
+import {initialState} from '@app/classes/models/app-state';
+import {AppStore, ObjectModelService, getObjectReducer} from '@app/classes/models/store';
 
 export const modelName = 'appState';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs-fields.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs-fields.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs-fields.service.ts
index bb8c661..0950de6 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs-fields.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs-fields.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'auditLogsFields';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs.service.ts
index bc33bd9..a467fc9 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/audit-logs.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'auditLogs';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/clusters.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/clusters.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/clusters.service.ts
index f21a8f9..35a07be 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/clusters.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/clusters.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'clusters';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/components.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/components.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/components.service.ts
index 6b2a0ba..1432f6a 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/components.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/components.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'components';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/filters.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/filters.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/filters.service.ts
index b850006..493e2e6 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/filters.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/filters.service.ts
@@ -19,7 +19,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'filters';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/graphs.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/graphs.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/graphs.service.ts
index e541444..8a5bb2b 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/graphs.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/graphs.service.ts
@@ -19,7 +19,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'graphs';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/hosts.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/hosts.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/hosts.service.ts
index 0cb0a74..acf7dda 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/hosts.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/hosts.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'hosts';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-fields.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-fields.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-fields.service.ts
index 0082cd6..1440d8d 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-fields.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-fields.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'serviceLogsFields';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-histogram-data.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-histogram-data.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-histogram-data.service.ts
index e680777..91ee94a 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-histogram-data.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-histogram-data.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'serviceLogsHistogramData';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-truncated.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-truncated.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-truncated.service.ts
index f8fe0f7..53b73ba 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-truncated.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs-truncated.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'serviceLogsTruncated';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs.service.ts
index f0ff0d7..0f4fa35 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/service-logs.service.ts
@@ -18,7 +18,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'serviceLogs';
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4966c10/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/user-configs.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/user-configs.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/user-configs.service.ts
index 1596e78..3b6bb15 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/user-configs.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/storage/user-configs.service.ts
@@ -19,7 +19,7 @@
 
 import {Injectable} from '@angular/core';
 import {Store} from '@ngrx/store';
-import {AppStore, CollectionModelService, getCollectionReducer} from '@app/models/store.model';
+import {AppStore, CollectionModelService, getCollectionReducer} from '@app/classes/models/store';
 
 export const modelName = 'userConfigs';
 


[2/5] ambari git commit: AMBARI-22130. Agent UT fail on trunk (aonishuk)

Posted by rl...@apache.org.
AMBARI-22130. Agent UT fail on trunk (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: de981ca006eba891868d97983c03a3cb019e23ef
Parents: 15cd1c5
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Oct 4 15:57:54 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Oct 4 15:57:54 2017 +0300

----------------------------------------------------------------------
 ambari-agent/src/test/python/ambari_agent/TestLiveStatus.py | 5 +----
 ambari-agent/src/test/python/ambari_agent/TestMain.py       | 5 ++---
 ambari-agent/src/test/python/ambari_agent/TestSecurity.py   | 1 -
 3 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/de981ca0/ambari-agent/src/test/python/ambari_agent/TestLiveStatus.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestLiveStatus.py b/ambari-agent/src/test/python/ambari_agent/TestLiveStatus.py
index 930c845..abd7def 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestLiveStatus.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestLiveStatus.py
@@ -25,7 +25,6 @@ import os, sys, StringIO
 from ambari_agent import ActualConfigHandler
 from mock.mock import patch, MagicMock
 import pprint
-from ambari_agent import StatusCheck
 from ambari_commons import OSCheck
 from only_for_platform import os_distro_value
 
@@ -43,8 +42,7 @@ class TestLiveStatus(TestCase):
 
   @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch.object(ActualConfigHandler.ActualConfigHandler, "read_actual_component")
-  @patch.object(StatusCheck.StatusCheck, "getStatus")
-  def test_build_predefined(self, getStatus_mock, read_actual_component_mock):
+  def test_build_predefined(self, read_actual_component_mock):
     read_actual_component_mock.return_value = "actual_component"
     """
     Tests that if live status us defined (using default parameter),
@@ -62,6 +60,5 @@ class TestLiveStatus(TestCase):
                      "'configurationTags': 'actual_component',\n "
                      "'msg': '',\n 'serviceName': 'SOME_UNKNOWN_SERVICE',\n "
                      "'stackVersion': '',\n 'status': 'STARTED'}")
-    self.assertFalse(getStatus_mock.called)
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/de981ca0/ambari-agent/src/test/python/ambari_agent/TestMain.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestMain.py b/ambari-agent/src/test/python/ambari_agent/TestMain.py
index 504ca08..35f5e6f 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestMain.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestMain.py
@@ -36,7 +36,7 @@ from mock.mock import MagicMock, patch, ANY, Mock, call
 
 with patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value)):
   from ambari_agent import NetUtil, security
-  from ambari_agent import ProcessHelper, main
+  from ambari_agent import main
   from ambari_agent.AmbariConfig import AmbariConfig
   from ambari_agent.PingPortListener import PingPortListener
   from ambari_agent.Controller import Controller
@@ -62,8 +62,7 @@ class TestMain(unittest.TestCase):
   @patch("ambari_agent.HeartbeatHandlers.HeartbeatStopHandlersLinux")
   @patch("sys.exit")
   @patch("os.getpid")
-  @patch.object(ProcessHelper, "stopAgent")
-  def test_signal_handler(self, stopAgent_mock, os_getpid_mock, sys_exit_mock, heartbeat_handler_mock):
+  def test_signal_handler(self,os_getpid_mock, sys_exit_mock, heartbeat_handler_mock):
     # testing exit of children
     main.agentPid = 4444
     os_getpid_mock.return_value = 5555

http://git-wip-us.apache.org/repos/asf/ambari/blob/de981ca0/ambari-agent/src/test/python/ambari_agent/TestSecurity.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestSecurity.py b/ambari-agent/src/test/python/ambari_agent/TestSecurity.py
index c9a7fbe..ac295b5 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestSecurity.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestSecurity.py
@@ -35,7 +35,6 @@ from only_for_platform import os_distro_value
 with patch("platform.linux_distribution", return_value = ('Suse','11','Final')):
   from ambari_agent import NetUtil
   from ambari_agent.security import CertificateManager
-  from ambari_agent import ProcessHelper, main
   from ambari_agent.AmbariConfig import AmbariConfig
   from ambari_agent.Controller import Controller
   from ambari_agent import security