ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mradhakrish...@apache.org
Subject [39/94] [abbrv] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)
Date Mon, 11 Sep 2017 04:39:09 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.angular-cli.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/.angular-cli.json b/ambari-logsearch/ambari-logsearch-web/.angular-cli.json
new file mode 100644
index 0000000..cc74739
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/.angular-cli.json
@@ -0,0 +1,64 @@
+{
+  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+  "project": {
+    "name": "ambari-logsearch-web-new"
+  },
+  "apps": [
+    {
+      "root": "src",
+      "outDir": "dist",
+      "assets": [
+        "assets",
+        "favicon.ico"
+      ],
+      "index": "index.html",
+      "main": "main.ts",
+      "polyfills": "polyfills.ts",
+      "test": "test.ts",
+      "tsconfig": "tsconfig.app.json",
+      "testTsconfig": "tsconfig.spec.json",
+      "prefix": "app",
+      "styles": [
+        "styles.less",
+        "../node_modules/bootstrap/dist/css/bootstrap.min.css",
+        "../node_modules/font-awesome/css/font-awesome.min.css",
+        "../src/vendor/css/bootstrap-logsearch.min.css"
+      ],
+      "scripts": [
+        "../node_modules/jquery/dist/jquery.min.js",
+        "../node_modules/bootstrap/dist/js/bootstrap.min.js",
+        "../src/vendor/js/bootstrap-logsearch.min.js"
+      ],
+      "environmentSource": "environments/environment.ts",
+      "environments": {
+        "dev": "environments/environment.ts",
+        "prod": "environments/environment.prod.ts"
+      }
+    }
+  ],
+  "e2e": {
+    "protractor": {
+      "config": "./protractor.conf.js"
+    }
+  },
+  "lint": [
+    {
+      "project": "src/tsconfig.app.json"
+    },
+    {
+      "project": "src/tsconfig.spec.json"
+    },
+    {
+      "project": "e2e/tsconfig.e2e.json"
+    }
+  ],
+  "test": {
+    "karma": {
+      "config": "./karma.conf.js"
+    }
+  },
+  "defaults": {
+    "styleExt": "less",
+    "component": {}
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.bowerrc
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/.bowerrc b/ambari-logsearch/ambari-logsearch-web/.bowerrc
deleted file mode 100644
index 1a4d0c7..0000000
--- a/ambari-logsearch/ambari-logsearch-web/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "directory": "libs"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.editorconfig
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/.editorconfig b/ambari-logsearch/ambari-logsearch-web/.editorconfig
new file mode 100644
index 0000000..6e87a00
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/.editorconfig
@@ -0,0 +1,13 @@
+# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.gitignore
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/.gitignore b/ambari-logsearch/ambari-logsearch-web/.gitignore
index ae3c172..54bfd20 100644
--- a/ambari-logsearch/ambari-logsearch-web/.gitignore
+++ b/ambari-logsearch/ambari-logsearch-web/.gitignore
@@ -1 +1,42 @@
-/bin/
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+testem.log
+/typings
+
+# e2e
+/e2e/*.js
+/e2e/*.map
+
+# System Files
+.DS_Store
+Thumbs.db

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/Gruntfile.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/Gruntfile.js b/ambari-logsearch/ambari-logsearch-web/Gruntfile.js
deleted file mode 100644
index aaad310..0000000
--- a/ambari-logsearch/ambari-logsearch-web/Gruntfile.js
+++ /dev/null
@@ -1,139 +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.
- */
-module.exports = function(grunt) {
-  'use strict';
-
-  var bowerLibsDir = 'libs/';
-  var vendorDir = "../libs/";
-  var sourceBowerLibsDir = '../../src/main/webapp/libs/bower';
-  var sourceCustomLibsDir = '../../src/main/webapp/libs/custom';
-
-  grunt.initConfig({
-    clean: {
-      vendors: [ vendorDir ]
-    },
-    copy: {
-      main: {
-        files: [
-          {
-            expand: true, cwd: bowerLibsDir, src:
-            [
-              'backbone/backbone.js', 'backbone/LICENSE',
-              'backbone.localstorage/backbone.localStorage-min.js',
-              'backgrid-filter/backgrid-filter.min.js', 'backgrid-filter/backgrid-filter.min.css',
-              'backgrid-paginator/backgrid-paginator.min.js', 'backgrid-paginator/backgrid-paginator.min.css',
-              'backgrid-select-all/backgrid-select-all.min.js', 'backgrid-select-all/backgrid-select-all.min.css',
-              'backgrid-sizeable-columns/backgrid-sizeable-columns.js', 'backgrid-sizeable-columns/backgrid-sizeable-columns.css',
-              'backgrid-orderable-columns/backgrid-orderable-columns.js', 'backgrid-orderable-columns/backgrid-orderable-columns.css',
-              'bootbox/bootbox.js',
-              'bootstrap-notify/js/bootstrap-notify.js', 'bootstrap-notify/css/bootstrap-notify.css',
-              'jquery/jquery.min.js',
-              'jquery-toggles/toggles.min.js', 'jquery-toggles/toggles.css',
-              'requirejs/require.js',
-              'require-handlebars-plugin/hbs.js',
-              'select2/select2.css', 'select2/select2.min.js', 'select2/select2.png', 'select2/select2-spinner.gif',
-              'd3/d3.min.js',
-              'underscore/underscore-min.js'
-            ], dest: vendorDir, filter: 'isFile'
-          },
-          // Merge source files to vendor
-          {
-            expand: true, cwd: sourceBowerLibsDir, src: ['**'], dest: vendorDir, filter: 'isFile'
-          },
-          // Merge custom source files to vendor
-          {
-            expand: true, cwd: sourceCustomLibsDir, src: ['**'], dest: vendorDir, filter: 'isFile'
-          },
-          // Custom mappings
-          {
-            expand: true, cwd: bowerLibsDir + 'backbone.babysitter/lib/', src: ['backbone.babysitter.min.js', 'backbone.babysitter.min.js.map'], dest: vendorDir + 'backbone.babysitter', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'backbone.marionette/lib/', src: ['backbone.marionette.min.js', 'backbone.marionette.map'], dest: vendorDir + 'backbone.marionette', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'backbone.wreqr/lib/', src: ['backbone.wreqr.min.js', 'backbone.wreqr.min.js.map'], dest: vendorDir + 'backbone.wreqr', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'backbone-forms/distribution/', src: ['**'], dest: vendorDir + 'backbone-forms', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'backgrid/lib/', src: ['backgrid.min.js', 'backgrid.min.css'], dest: vendorDir + 'backgrid', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir, src: ['backgrid-sizeable-columns/backgrid-sizeable-columns.js', 'backgrid-sizeable-columns/backgrid-sizeable-columns.css'], dest: vendorDir, filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir, src: ['backgrid-orderable-columns/backgrid-orderable-columns.js', 'backgrid-orderable-columns/backgrid-orderable-columns.css'], dest: vendorDir, filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'bootstrap/dist/js', src: ['bootstrap.min.js'], dest: vendorDir + 'bootstrap', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'bootstrap/dist/css', src: ['bootstrap.min.css', 'bootstrap-theme.min.css', 'bootstrap-theme.css.map', 'bootstrap.css.map'], dest: vendorDir + 'bootstrap', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'globalize/lib', src: ['**'], dest: vendorDir + 'globalize', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'moment/min/', src: ['moment.min.js'], dest: vendorDir + 'moment', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'moment-timezone/builds/', src: ['moment-timezone-with-data.min.js'], dest: vendorDir + 'moment', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'require-handlebars-plugin/hbs', src: ['i18nprecompile.js', 'json2.js'], dest: vendorDir + 'require-handlebars-plugin', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir, src: ['i18nprecompile.js', 'json2.js'], dest: vendorDir + 'require-handlebars-plugin', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'nvd3/build/', src: ['nv.d3.min.js', 'nv.d3.min.css'], dest: vendorDir + 'nvd3', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'noty/js/noty/packaged', src: ['jquery.noty.packaged.min.js'], dest: vendorDir + 'noty', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'gridster.js/dist/', src: ['jquery.gridster.min.js', 'jquery.gridster.min.css'], dest: vendorDir + 'gridster', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'bootstrap-tour/build/js/', src: ['bootstrap-tour.min.js'], dest: vendorDir + 'bootstrap-tour', filter: 'isFile'
-          },
-          {
-            expand: true, cwd: bowerLibsDir + 'bootstrap-tour/build/css/', src: ['bootstrap-tour.min.css'], dest: vendorDir + 'bootstrap-tour', filter: 'isFile'
-          }
-        ]
-      }
-    }
-  });
-
-  grunt.loadNpmTasks('grunt-contrib-copy');
-  grunt.registerTask('default', ['copy']);
-  grunt.registerTask('build', 'Copy necessary files (js/css) from third party libraries.', function() {
-    if (!grunt.file.isDir(vendorDir)) {
-      grunt.file.mkdir(vendorDir);
-
-      grunt.log.oklns(grunt.template.process('Directory "<%= directory %>" was created successfully.',
-        {
-          data: { directory: vendorDir }
-        }));
-    }
-    grunt.task.run('copy');
-  });
-
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/LICENSE.txt
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/LICENSE.txt b/ambari-logsearch/ambari-logsearch-web/LICENSE.txt
deleted file mode 100644
index 49c4907..0000000
--- a/ambari-logsearch/ambari-logsearch-web/LICENSE.txt
+++ /dev/null
@@ -1,339 +0,0 @@
-			       Apache License
-                           Version 2.0, June 2016
-                        http://www.apache.org/licenses/
-            ------------------------------------------------------
-
-    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-
-APACHE LOGSEARCH SUBCOMPONENTS:
-
-The Apache Logsearch project contains subcomponents with separate copyright
-notices and license terms. Your use of the source code for the these
-subcomponents is subject to the terms and conditions of the following
-licenses. 
-
------------------------------------------------------------------------
-The MIT License
------------------------------------------------------------------------  
-The Apache Logsearch project bundles the following files under the MIT License:
-
-
-This product includes jQuery v1.10.2 (http://jquery.org - MIT license), Copyright © 2016, jQuery Foundation.
-This product includes jQuery UI v1.11.4 (http://jqueryui.com - MIT license), Copyright © 2016 jQuery Foundation.
-This product includes Bootstrap v3.2.0 (http://getbootstrap.com - MIT license), Copyright © 2011-2016 Twitter, Inc.
-This product include Backbone v1.1.2(http://backbonejs.org - MIT license), Copyright © 2010-2014 by Jeremy Ashkenas.
-This product includes Backbone-amd v1.1.2 (http://backbonejs.org - MIT license), Copyright © 2010-2014 by Jeremy Ashkenas.
-This product includes Underscore v1.5.2 (http://underscorejs.org - MIT license), Copyright © 2009-2013 by Jeremy Ashkenas.
-This product includes Underscore-amd v1.5.2 (http://underscorejs.org - MIT license), Copyright © 2009-2013 by Jeremy Ashkenas.
-This product includes Backbone.Marionette v1.8.8 (http://marionettejs.com - MIT license), Copyright © 2014 by Derick Bailey.
-This product includes Backbone.wreqr v0.2.0 (http://github.com/marionettejs/backbone.wreqr - MIT license), Copyright © 2013 by Derick Bailey.
-This product includes Backbone.babysitter v0.0.6 (http://github.com/babysitterjs/backbone.babysitter - MIT license), Copyright © 2013 by Derick Bailey.
-This product includes Backbone.localstorage  v1.1.7 (https://github.com/jeromegn/Backbone.localStorage - MIT license), Copyright © 2010 Jerome Gravel-Niquet.
-This product includes Bootstrap-datapicker (http://www.eyecon.ro/bootstrap-datepicker - MIT license), Copyright © 2012 Stefan Petre.
-This product includes Handlebar v1.3.0 (http://github.com/jrburke/require-cs - MIT license), Copyright © 2011 by Yehuda Katz.
-This product includes i18nprecompile (http://github.com/jrburke/require-cs - MIT license), Copyright ©  2014 by Tom de Grunt.
-This product includes hbs v0.4.0 (http://github.com/jrburke/require-cs - MIT license), Copyright © by Alex Sexton.
-This product includes Backgrid (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backgrid-filter (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backgrid-select-all (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backgrid-paginator (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backgrid-columnmanager (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backgrid-sizeable (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backgrid-orderable (http://github.com/wyuenho/backgrid - MIT license), Copyright © by 2014 Jimmy Yuen Ho Wong and contributors.
-This product includes Backbone-pageable v1.3.2 (http://github.com/wyuenho/backbone-pageable - MIT license)
-Copyright ©  2013 Jimmy Yuen Ho Wong.
-This product includes Daterangepicker v2.0 (http://www.dangrossman.info - MIT license), Copyright ©  2012-2015 Dan Grossman.
-This product includes select2 v3.5.1 (https://github.com/select2/select2 - MIT license), Copyright ©  2012 Igor Vaynberg.
-This product includes Bootbox v4.4.0 (http://bootboxjs.com - MIT license), Copyright ©  2011-2015 by Nick Payne.
-This product includes Moment v2.10.3 (http://momentjs.com - MIT license), Copyright ©  2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors.
-This product includes Moment-tz v0.4.1 (http://github.com/moment/moment-timezone - MIT license), Copyright ©  2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors.
-This product includes Globalize (http://github.com/jquery/globalize - MIT license), Copyright © Software Freedom Conservancy, Inc.
-This product includes Noty v2.3.5 (http://needim.github.com/noty/ - MIT license), Copyright ©  2012 Nedim Arabacı.
-This product includes jstz (timezone detection) v1.0.4 (https://github.com/mde/timezone-js - MIT license), Copyright © 2010 Matthew Eernisse.
-This product includes jquery.sparkline v2.1.2 (http://jquery.sparkline.js - MIT license), Copyright ©  by Splunk, Inc.
-This product includes jquery.gridster v0.5.6 (http://gridster.net - MIT license), Copyright ©  2014 by ducksboard.
-This product includes RequireJS v2.1.8 (http://github.com/jrburke/requirejs - MIT license), Copyright © 2010-2012 by The Dojo Foundation.
-This product includes Bootstrap-notify.js v1.0 (http://goodybag.github.com/bootstrap-notify - MIT license), Copyright © 2012 by Goodybag, Inc.
-This product includes jQuery toggles v2.0.4 (https://github.com/simontabor/jquery-toggles - MIT license), Copyright ©  2013 by Simon Tabor.
-This product includes jquery tag-it v2.0 (http://aehlke.github.com/tag-it/ - MIT license), Copyright ©  2011 by Levy Carneiro Jr.
-This is product includes X-editable - v1.5.0 (http://github.com/vitalets/x-editable - MIT license), Copyright © 2013 by Vitaliy Potapov.
-This product includes Font Awesome 4.3.0 (http://fontawesome.io/ - MIT license), Copyright © by Dave Gandy
-This product includes jQuery-Cookies v1.4.0 (https://github.com/carhartl/jquery-cookie - MIT license), Copyright ©  2013 by Klaus Hartl.
-This product includes Backbone-fetch-cache v1.4.0 (https://github.com/mrappleton/backbone-fetch-cache.git - MIT license), Copyright ©  by Andy Appleton.
-This product includes loadCss (https://github.com/filamentgroup/loadCSS - MIT license), Copyright © by Filament Group, Inc.
-This product includes Backone-forms v0.12.0 (http://github.com/powmedia/backbone-forms - MIT license), Copyright © 2013 Charles Davison, Pow Media Ltd.
-
-
-
------------------------------------------------------------------------
-The Apache License
------------------------------------------------------------------------
-The Apache Logsearch project bundles the following files under the Apache License
-
-
-This product includes Nv.d3 v1.8.1 (https://github.com/novus/nvd3 - Apache license), Copyright © 2011-2014 Novus Partners, Inc.
-This product includes d3 v3.5.5 (https://d3js.org - Apache license), Copyright ©  2010-2016 Mike Bostock.
-This product includes d3.tip v3.5.5 (https://github.com/Caged/d3-tip - Apache license), Copyright © 2013 Justin Palmer.
-
-
-
-------------------------------------------------------------------------
-Public Domain License
-------------------------------------------------------------------------
-The Apache Logsearch project bundles the following files under the Public Domain License
-
-This product includes json2.js (https://github.com/douglascrockford/JSON-js - Public Domain license) by Douglas Crockford
-
-
-
------------------------------------------------------------------------
- VisualSearch License 
------------------------------------------------------------------------
-This product includes VisualSearch.js 0.5.0 (http://documentcloud.github.com/visualsearch), © 2011 Samuel Clay, @samuelclay, DocumentCloud Inc.
-
-
-
-
-Copyright (c) 2011 Samuel Clay, @samuelclay, DocumentCloud
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-
------------------------------------------------------------------------
- The WTFPL License
------------------------------------------------------------------------
-This product includes Require.js Handlebars Plugin (https://github.com/SlexAxton/require-handlebars-plugin- WTFPL + requirejs + handlebars), Copyright © 2011-2014 by Yehuda Katz.
-
-Full License information is available at http://www.wtfpl.net/about/
-
------------------------------------------------------------------------
-SIL Open Font License (OFL)
------------------------------------------------------------------------
-
-This product includes Font Awesome 4.3.0 (http://fontawesome.io/ - SIL Open Font License (OFL) licensee) by Dave Gandy
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/README.md
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/README.md b/ambari-logsearch/ambari-logsearch-web/README.md
new file mode 100644
index 0000000..ff1456e
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/README.md
@@ -0,0 +1,28 @@
+# AmbariLogsearchWeb
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
+Before running the tests make sure you are serving the app via `ng serve`.
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/bower.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/bower.json b/ambari-logsearch/ambari-logsearch-web/bower.json
deleted file mode 100644
index 849ae41..0000000
--- a/ambari-logsearch/ambari-logsearch-web/bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "name": "ambari-logserach-web",
-  "description": "<!-- {% comment %} 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",
-  "version": "0.5.0",
-  "appPath": "src/main/webapp",
-  "directory": "libs",
-  "dependencies": {
-    "jquery": "1.10.2",
-    "jquery-ui": "1.11.4",
-    "jquery-toggles": "2.0.4",
-    "bootbox": "4.4.0",
-    "bootstrap": "3.2.0",
-    "bootstrap-notify": "0.1.0",
-    "bootstrap-tour" : "0.10.3",
-    "backgrid": "0.3.5",
-    "backgrid-filter": "0.3.5",
-    "backgrid-columnmanager": "0.2.4",
-    "backgrid-paginator": "0.3.5",
-    "backgrid-select-all": "0.3.5",
-    "backgrid-sizeable-columns": "0.1.1",
-    "backgrid-orderable-columns": "0.1.2",
-    "backbone": "1.1.2",
-    "backbone.localstorage": "1.1.7",
-    "backbone.marionette": "1.8.8",
-    "backbone-forms": "0.12.0",
-    "d3" : "3.5.5",
-    "noty" : "2.3.5",
-    "nvd3" : "1.8.1",
-    "gridster.js" : "0.5.6",
-    "globalize": "0.1.1",
-    "handlebars": "1.3.0",
-    "moment": "2.10.3",
-    "moment-timezone" : "0.4.1",
-    "require-handlebars-plugin" : "0.4.0",
-    "requirejs": "2.1.8",
-    "select2": "3.5.1",
-    "underscore": "1.5.2"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/build.properties
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/build.properties b/ambari-logsearch/ambari-logsearch-web/build.properties
deleted file mode 100644
index 1656934..0000000
--- a/ambari-logsearch/ambari-logsearch-web/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#   Licensed 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.
-app.target.dir=${builddir}/target/classes/static
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/build.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/build.xml b/ambari-logsearch/ambari-logsearch-web/build.xml
deleted file mode 100644
index d757241..0000000
--- a/ambari-logsearch/ambari-logsearch-web/build.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-   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.
--->
-<project basedir="." default="build" name="logsearch">
-  <property environment="env"/>
-  <property name="debuglevel" value="source,lines,vars"/>
-  <dirname property="builddir" file="build.xml"/>
-  <property name="target" value="1.7"/>
-  <property name="source" value="1.7"/>
-  <property file="build.properties"/>
-
-  <target name="init">
-  </target>
-  <target name="build"/>
-  <target name="package">
-    <copy todir="${app.target.dir}" includeEmptyDirs="no">
-      <fileset dir="src/main/webapp"/>
-    </copy>
-  </target>
-
-  <target description="Build all projects which reference this project. Useful to propagate changes."
-          name="build-refprojects"/>
-</project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/e2e/app.e2e-spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/e2e/app.e2e-spec.ts b/ambari-logsearch/ambari-logsearch-web/e2e/app.e2e-spec.ts
new file mode 100644
index 0000000..ebfdcb9
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/e2e/app.e2e-spec.ts
@@ -0,0 +1,32 @@
+/**
+ * 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 {AmbariLogsearchWebNewPage} from './app.po';
+
+describe('ambari-logsearch-web-new App', () => {
+  let page: AmbariLogsearchWebNewPage;
+
+  beforeEach(() => {
+    page = new AmbariLogsearchWebNewPage();
+  });
+
+  it('should display title', () => {
+    page.navigateTo();
+    expect(page.getParagraphText()).toEqual('Ambari Log Search');
+  });
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/e2e/app.po.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/e2e/app.po.ts b/ambari-logsearch/ambari-logsearch-web/e2e/app.po.ts
new file mode 100644
index 0000000..c446bfb
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/e2e/app.po.ts
@@ -0,0 +1,29 @@
+/**
+ * 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 { browser, element, by } from 'protractor';
+
+export class AmbariLogsearchWebNewPage {
+  navigateTo() {
+    return browser.get('/');
+  }
+
+  getParagraphText() {
+    return element(by.css('app-root h1')).getText();
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/e2e/tsconfig.e2e.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/e2e/tsconfig.e2e.json b/ambari-logsearch/ambari-logsearch-web/e2e/tsconfig.e2e.json
new file mode 100644
index 0000000..ac7a373
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/e2e/tsconfig.e2e.json
@@ -0,0 +1,12 @@
+{
+  "extends": "../tsconfig.json",
+  "compilerOptions": {
+    "outDir": "../out-tsc/e2e",
+    "module": "commonjs",
+    "target": "es5",
+    "types":[
+      "jasmine",
+      "node"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/karma.conf.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/karma.conf.js b/ambari-logsearch/ambari-logsearch-web/karma.conf.js
new file mode 100644
index 0000000..0512808
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/karma.conf.js
@@ -0,0 +1,62 @@
+/**
+ * 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.
+ */
+
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/0.13/config/configuration-file.html
+
+module.exports = function (config) {
+  config.set({
+    basePath: '',
+    frameworks: ['jasmine', '@angular/cli'],
+    plugins: [
+      require('karma-jasmine'),
+      require('karma-chrome-launcher'),
+      require('karma-jasmine-html-reporter'),
+      require('karma-coverage-istanbul-reporter'),
+      require('@angular/cli/plugins/karma')
+    ],
+    client:{
+      clearContext: false // leave Jasmine Spec Runner output visible in browser
+    },
+    files: [
+      { pattern: './src/test.ts', watched: false }
+    ],
+    preprocessors: {
+      './src/test.ts': ['@angular/cli']
+    },
+    mime: {
+      'text/x-typescript': ['ts','tsx']
+    },
+    coverageIstanbulReporter: {
+      reports: [ 'html', 'lcovonly' ],
+      fixWebpackSourcePaths: true
+    },
+    angularCli: {
+      environment: 'dev'
+    },
+    reporters: config.angularCli && config.angularCli.codeCoverage
+              ? ['progress', 'coverage-istanbul']
+              : ['progress', 'kjhtml'],
+    port: 9876,
+    colors: true,
+    logLevel: config.LOG_INFO,
+    autoWatch: true,
+    browsers: ['Chrome'],
+    singleRun: false
+  });
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/package.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/package.json b/ambari-logsearch/ambari-logsearch-web/package.json
index 92fd245..96733eb 100644
--- a/ambari-logsearch/ambari-logsearch-web/package.json
+++ b/ambari-logsearch/ambari-logsearch-web/package.json
@@ -1,25 +1,64 @@
 {
   "name": "ambari-logsearch-web",
-  "version": "0.5.0",
-  "description": "Front-end package for the Apache Ambari Log Search",
-  "homepage": "http://ambari.apache.org/",
-  "license" : "Apache-2.0",
-  "private": true,
-  "repository": {
-    "type": "git",
-    "url": "https://git-wip-us.apache.org/repos/asf/ambari/repo?p=ambari.git;a=summary"
+  "version": "3.0.0",
+  "license": "Apache 2.0",
+  "scripts": {
+    "ng": "ng",
+    "start": "ng serve",
+    "build": "ng build",
+    "build-prod": "ng build -prod",
+    "test": "ng test",
+    "lint": "ng lint",
+    "e2e": "ng e2e"
   },
   "dependencies": {
-    "del": "^2.2.0",
-    "run-sequence": "^1.1.5",
-    "yargs": "^3.32.0",
-    "bower": "~1.7.2",
-    "grunt": "~0.4.5",
-    "grunt-cli": "~0.1.13",
-    "grunt-contrib-jshint": "~0.11.3",
-    "grunt-contrib-copy": "0.4.x"
+    "@angular/common": "^4.0.0",
+    "@angular/compiler": "^4.0.0",
+    "@angular/core": "^4.0.0",
+    "@angular/forms": "^4.0.0",
+    "@angular/http": "^4.0.0",
+    "@angular/platform-browser": "^4.0.0",
+    "@angular/platform-browser-dynamic": "^4.0.0",
+    "@angular/router": "^4.0.0",
+    "@ngrx/core": "^1.2.0",
+    "@ngrx/store": "^2.2.2",
+    "@ngx-translate/core": "^6.0.1",
+    "@ngx-translate/http-loader": "^0.0.3",
+    "angular-moment-timezone": "^0.2.1",
+    "angular2-moment": "^1.4.0",
+    "bootstrap": "^3.3.7",
+    "core-js": "^2.4.1",
+    "d3": "^4.10.0",
+    "font-awesome": "^4.7.0",
+    "jquery": "^1.12.4",
+    "moment": "^2.18.1",
+    "moment-timezone": "^0.5.13",
+    "ngx-bootstrap": "^1.6.6",
+    "rxjs": "^5.1.0",
+    "zone.js": "^0.8.4"
   },
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
+  "devDependencies": {
+    "@angular/cli": "1.0.0",
+    "@angular/compiler-cli": "^4.0.0",
+    "@types/d3": "^4.10.0",
+    "@types/jasmine": "2.5.38",
+    "@types/jquery": "^1.10.33",
+    "@types/moment": "^2.13.0",
+    "@types/moment-timezone": "^0.2.34",
+    "@types/node": "~6.0.60",
+    "angular-in-memory-web-api": "^0.3.1",
+    "codelyzer": "~2.0.0",
+    "jasmine-core": "~2.5.2",
+    "jasmine-spec-reporter": "~3.2.0",
+    "karma": "~1.4.1",
+    "karma-chrome-launcher": "~2.0.0",
+    "karma-cli": "~1.0.1",
+    "karma-coverage-istanbul-reporter": "^0.2.0",
+    "karma-jasmine": "~1.1.0",
+    "karma-jasmine-html-reporter": "^0.2.2",
+    "protractor": "~5.1.0",
+    "ts-node": "~2.0.0",
+    "tslint": "~4.5.0",
+    "typescript": "~2.2.0"
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/pom.xml b/ambari-logsearch/ambari-logsearch-web/pom.xml
index 5c193f8..075527b 100644
--- a/ambari-logsearch/ambari-logsearch-web/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-web/pom.xml
@@ -6,18 +6,15 @@
    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.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <artifactId>ambari-logsearch</artifactId>
     <groupId>org.apache.ambari</groupId>
@@ -25,81 +22,81 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>ambari-logsearch-web</artifactId>
-  <url>http://maven.apache.org</url>
   <name>Ambari Logsearch Web</name>
+  <version>2.0.0.0-SNAPSHOT</version>
+  <groupId>org.apache.ambari</groupId>
+  <description>Ambari Logsearch Web</description>
+
   <properties>
-    <nodeVersion>v4.5.0</nodeVersion>
-    <npmVersion>2.15.0</npmVersion>
+    <logsearch.npm.config.tmp>/tmp/logsearch_npm_config_tmp</logsearch.npm.config.tmp>
+    <node.version>v6.9.0</node.version>
+    <yarn.version>v0.23.3</yarn.version>
   </properties>
+
   <build>
     <plugins>
       <plugin>
         <groupId>com.github.eirslett</groupId>
         <artifactId>frontend-maven-plugin</artifactId>
-        <version>0.0.22</version>
+        <version>1.4</version>
+        <configuration>
+          <nodeVersion>${node.version}</nodeVersion>
+          <yarnVersion>${yarn.version}</yarnVersion>
+          <workingDirectory>${project.build.directory}/webapp-build</workingDirectory>
+          <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
+          <!-- setting npm_config_tmp environment variable is a workaround for
+               https://github.com/Medium/phantomjs/issues/673 -->
+          <environmentVariables>
+            <npm_config_tmp>${logsearch.npm.config.tmp}</npm_config_tmp>
+          </environmentVariables>
+        </configuration>
         <executions>
           <execution>
-            <id>install node and npm</id>
+            <id>install node and yarn</id>
+            <phase>generate-resources</phase>
             <goals>
-              <goal>install-node-and-npm</goal>
+              <goal>install-node-and-yarn</goal>
             </goals>
-            <configuration>
-              <nodeVersion>${nodeVersion}</nodeVersion>
-              <npmVersion>${npmVersion}</npmVersion>
-            </configuration>
           </execution>
           <execution>
-            <id>npm install</id>
-            <goals>
-              <goal>npm</goal>
-            </goals>
+            <id>yarn install</id>
             <phase>generate-resources</phase>
-          </execution>
-          <execution>
-            <id>bower install</id>
             <goals>
-              <goal>bower</goal>
+              <goal>yarn</goal>
             </goals>
             <configuration>
-              <arguments>install</arguments>
+              <arguments>install --ignore-engines --pure-lockfile</arguments>
             </configuration>
           </execution>
           <execution>
-            <id>grunt build</id>
+            <id>generate dist</id>
+            <phase>generate-resources</phase>
             <goals>
-              <goal>grunt</goal>
+             <goal>yarn</goal>
             </goals>
-            <phase>generate-resources</phase>
             <configuration>
-              <arguments>build</arguments>
+              <arguments>build-prod</arguments>
             </configuration>
           </execution>
+          <!-- TODO: Use this for testing and make it skippable:
+          <execution>
+            <id>run tests</id>
+            <phase>test</phase>
+            <goals>
+            <goal>yarn</goal>
+           </goals>
+           <configuration>
+            <arguments>test</arguments>
+           </configuration>
+          </execution>
+          -->
         </executions>
-        <configuration>
-          <workingDirectory>target/webapp-build</workingDirectory>
-        </configuration>
       </plugin>
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
         <version>2.6</version>
         <executions>
           <execution>
-            <id>copy-resources</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${basedir}/target/classes/static</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>src/main/webapp</directory>
-                  <filtering>false</filtering>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-          <execution>
             <id>process-webapp-sources</id>
             <phase>process-sources</phase>
             <goals>
@@ -111,26 +108,31 @@
                 <resource>
                   <directory>${basedir}</directory>
                   <includes>
-                    <include>bower.json</include>
-                    <include>.bowerrc</include>
+                    <include>e2e/**</include>
+                    <include>src/**</include>
+                    <include>.*</include>
                     <include>package.json</include>
-                    <include>Gruntfile.js</include>
+                    <include>protactor.conf.js</include>
+                    <include>yarn.lock</include>
+                    <include>karma.conf.js</include>
+                    <include>tsconfig.json</include>
+                    <include>tslint.json</include>
                   </includes>
                 </resource>
               </resources>
             </configuration>
           </execution>
           <execution>
-            <id>copy-webapp-libs</id>
-            <phase>prepare-package</phase>
+            <id>copy-resources</id>
+            <phase>process-resources</phase>
             <goals>
               <goal>copy-resources</goal>
             </goals>
             <configuration>
-              <outputDirectory>${basedir}/target/classes/static/libs/bower</outputDirectory>
+              <outputDirectory>${basedir}/target/classes/dist</outputDirectory>
               <resources>
                 <resource>
-                  <directory>${basedir}/target/libs</directory>
+                  <directory>${basedir}/target/webapp-build/dist</directory>
                   <filtering>false</filtering>
                 </resource>
               </resources>
@@ -139,37 +141,19 @@
         </executions>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <version>1.7</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <configuration>
-              <target>
-                <ant antfile="build.xml">
-                  <target name="package"/>
-                </ant>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
         <configuration>
           <excludes>
-            <exclude>src/main/webapp/libs/**/*</exclude>
-            <exclude>src/main/webapp/robots.txt</exclude>
-            <exclude>src/main/webapp/styles/animate.css</exclude>
-            <exclude>src/main/webapp/styles/visualsearch.css</exclude>
+            <exclude>README.md</exclude>
+            <exclude>*.editorconfig</exclude>
+            <exclude>src/vendor/**</exclude>
+            <exclude>yarn.lock</exclude>
+            <exclude>node_modules/**</exclude>
+            <exclude>dist/**</exclude>
             <exclude>**/*.json</exclude>
             <exclude>**/*.log</exclude>
-            <exclude>.bowerrc</exclude>
+            <exclude>**/*.txt</exclude>
           </excludes>
         </configuration>
         <executions>
@@ -183,4 +167,5 @@
       </plugin>
     </plugins>
   </build>
+
 </project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/protractor.conf.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/protractor.conf.js b/ambari-logsearch/ambari-logsearch-web/protractor.conf.js
new file mode 100644
index 0000000..6b4a31c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/protractor.conf.js
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Protractor configuration file, see link for more information
+// https://github.com/angular/protractor/blob/master/lib/config.ts
+
+const { SpecReporter } = require('jasmine-spec-reporter');
+
+exports.config = {
+  allScriptsTimeout: 11000,
+  specs: [
+    './e2e/**/*.e2e-spec.ts'
+  ],
+  capabilities: {
+    'browserName': 'chrome'
+  },
+  directConnect: true,
+  baseUrl: 'http://localhost:4200/',
+  framework: 'jasmine',
+  jasmineNodeOpts: {
+    showColors: true,
+    defaultTimeoutInterval: 30000,
+    print: function() {}
+  },
+  beforeLaunch: function() {
+    require('ts-node').register({
+      project: 'e2e/tsconfig.e2e.json'
+    });
+  },
+  onPrepare() {
+    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+  }
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
new file mode 100644
index 0000000..c08cb3a
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -0,0 +1,169 @@
+/**
+ * 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 {BrowserModule} from '@angular/platform-browser';
+import {NgModule, CUSTOM_ELEMENTS_SCHEMA, Injector} from '@angular/core';
+import {FormsModule, ReactiveFormsModule} from '@angular/forms';
+import {HttpModule, Http, XHRBackend, BrowserXhr, ResponseOptions, XSRFStrategy} from '@angular/http';
+import {InMemoryBackendService} from 'angular-in-memory-web-api';
+import {AlertModule} from 'ngx-bootstrap';
+import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
+import {TranslateHttpLoader} from '@ngx-translate/http-loader';
+import {StoreModule} from '@ngrx/store';
+import {MomentModule} from 'angular2-moment';
+import {MomentTimezoneModule} from 'angular-moment-timezone';
+import {environment} from '@envs/environment';
+import {mockApiDataService} from '@app/services/mock-api-data.service'
+import {HttpClientService} from '@app/services/http-client.service';
+import {ComponentActionsService} from '@app/services/component-actions.service';
+import {FilteringService} from '@app/services/filtering.service';
+import {UtilsService} from '@app/services/utils.service';
+import {LogsContainerService} from '@app/services/logs-container.service';
+import {ComponentGeneratorService} from '@app/services/component-generator.service';
+
+import {AppSettingsService} from '@app/services/storage/app-settings.service';
+import {AppStateService} from '@app/services/storage/app-state.service';
+import {AuditLogsService} from '@app/services/storage/audit-logs.service';
+import {ServiceLogsService} from '@app/services/storage/service-logs.service';
+import {ServiceLogsHistogramDataService} from '@app/services/storage/service-logs-histogram-data.service';
+import {GraphsService} from '@app/services/storage/graphs.service';
+import {HostsService} from '@app/services/storage/hosts.service';
+import {UserConfigsService} from '@app/services/storage/user-configs.service';
+import {FiltersService} from '@app/services/storage/filters.service';
+import {ClustersService} from '@app/services/storage/clusters.service';
+import {ComponentsService} from '@app/services/storage/components.service';
+import {ServiceLogsFieldsService} from '@app/services/storage/service-logs-fields.service';
+import {AuditLogsFieldsService} from '@app/services/storage/audit-logs-fields.service';
+import {reducer} from '@app/services/storage/reducers.service';
+
+import {AppComponent} from '@app/components/app.component';
+import {LoginFormComponent} from '@app/components/login-form/login-form.component';
+import {TopMenuComponent} from '@app/components/top-menu/top-menu.component';
+import {MenuButtonComponent} from '@app/components/menu-button/menu-button.component';
+import {MainContainerComponent} from '@app/components/main-container/main-container.component';
+import {FiltersPanelComponent} from '@app/components/filters-panel/filters-panel.component';
+import {FilterDropdownComponent} from '@app/components/filter-dropdown/filter-dropdown.component';
+import {DropdownListComponent} from '@app/components/dropdown-list/dropdown-list.component';
+import {FilterTextFieldComponent} from '@app/components/filter-text-field/filter-text-field.component';
+import {FilterButtonComponent} from '@app/components/filter-button/filter-button.component';
+import {AccordionPanelComponent} from '@app/components/accordion-panel/accordion-panel.component';
+import {LogsListComponent} from '@app/components/logs-list/logs-list.component';
+import {DropdownButtonComponent} from '@app/components/dropdown-button/dropdown-button.component';
+import {PaginationComponent} from '@app/components/pagination/pagination.component';
+import {PaginationControlsComponent} from '@app/components/pagination-controls/pagination-controls.component';
+import {TimeHistogramComponent} from '@app/components/time-histogram/time-histogram.component';
+import {LogsContainerComponent} from '@app/components/logs-container/logs-container.component';
+import {ModalComponent} from '@app/components/modal/modal.component';
+import {TimeZonePickerComponent} from '@app/components/timezone-picker/timezone-picker.component';
+import {NodeBarComponent} from '@app/components/node-bar/node-bar.component';
+
+import {TimeZoneAbbrPipe} from '@app/pipes/timezone-abbr.pipe';
+
+export function HttpLoaderFactory(http: Http) {
+  // adding 'static' parameter to step over mock data request
+  return new TranslateHttpLoader(http, 'assets/i18n/', '.json?static=true');
+}
+
+export function getXHRBackend(injector: Injector, browser: BrowserXhr, xsrf: XSRFStrategy, options: ResponseOptions): any {
+  if (environment.production) {
+    return new XHRBackend(browser, options, xsrf);
+  } else {
+    return new InMemoryBackendService(
+      injector,
+      new mockApiDataService(),
+      {
+        passThruUnknownUrl: true,
+        rootPath: ''
+      }
+    );
+  }
+}
+
+@NgModule({
+  declarations: [
+    AppComponent,
+    LoginFormComponent,
+    TopMenuComponent,
+    MenuButtonComponent,
+    MainContainerComponent,
+    FiltersPanelComponent,
+    DropdownListComponent,
+    FilterDropdownComponent,
+    FilterTextFieldComponent,
+    FilterButtonComponent,
+    AccordionPanelComponent,
+    LogsListComponent,
+    DropdownButtonComponent,
+    PaginationComponent,
+    PaginationControlsComponent,
+    TimeHistogramComponent,
+    LogsContainerComponent,
+    ModalComponent,
+    TimeZonePickerComponent,
+    NodeBarComponent,
+    TimeZoneAbbrPipe
+  ],
+  imports: [
+    BrowserModule,
+    FormsModule,
+    ReactiveFormsModule,
+    HttpModule,
+    AlertModule.forRoot(),
+    TranslateModule.forRoot({
+      loader: {
+        provide: TranslateLoader,
+        useFactory: HttpLoaderFactory,
+        deps: [Http]
+      }
+    }),
+    StoreModule.provideStore(reducer),
+    MomentModule,
+    MomentTimezoneModule
+  ],
+  providers: [
+    HttpClientService,
+    ComponentActionsService,
+    FilteringService,
+    UtilsService,
+    LogsContainerService,
+    ComponentGeneratorService,
+    AppSettingsService,
+    AppStateService,
+    AuditLogsService,
+    ServiceLogsService,
+    ServiceLogsHistogramDataService,
+    GraphsService,
+    HostsService,
+    UserConfigsService,
+    FiltersService,
+    ClustersService,
+    ComponentsService,
+    ServiceLogsFieldsService,
+    AuditLogsFieldsService,
+    {
+      provide: XHRBackend,
+      useFactory: getXHRBackend,
+      deps: [Injector, BrowserXhr, XSRFStrategy, ResponseOptions]
+    }
+  ],
+  bootstrap: [AppComponent],
+  entryComponents: [NodeBarComponent],
+  schemas: [CUSTOM_ELEMENTS_SCHEMA]
+})
+export class AppModule {
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/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
new file mode 100644
index 0000000..ef8cf28
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.class.ts
@@ -0,0 +1,50 @@
+/**
+ * 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?: string;
+  start_time?: string;
+  end_time?: string;
+  clusters?: string;
+  iMessage?: string;
+  eMessage?: string;
+  mustBe?: string;
+  mustNot?: string;
+  includeQuery?: string;
+  excludeQuery?: string;
+  from?: string;
+  to?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/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
new file mode 100644
index 0000000..83c3261
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/query-params.class.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/02360dd5/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
new file mode 100644
index 0000000..efa2459
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.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.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/02360dd5/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
new file mode 100644
index 0000000..87e82f6
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-histogram-query-params.class.ts
@@ -0,0 +1,69 @@
+/**
+ * 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;
+  iMessage?: string;
+  level?: string;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/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
new file mode 100644
index 0000000..c88ec46
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/service-logs-query-params.class.ts
@@ -0,0 +1,31 @@
+/**
+ * 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;
+  host_name?: 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/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.html
new file mode 100644
index 0000000..1b134c3
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.html
@@ -0,0 +1,25 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<div class="panel panel-default">
+  <div class="panel-body">
+    <ng-template [ngTemplateOutlet]="template"></ng-template>
+    <div class="accordion-toggle">
+      <span class="fa collapsed toggle-icon" data-toggle="collapse" attr.data-target="#{{toggleId}}" aria-expanded="false">&nbsp;</span>
+    </div>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less
new file mode 100644
index 0000000..8366952
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less
@@ -0,0 +1,42 @@
+/**
+ * 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 '../variables';
+
+.panel-body {
+  position: relative;
+
+  .accordion-toggle {
+    position: absolute;
+
+    // TODO get rid of magic numbers, base on actual design
+    right: 10px;
+    top: 15px;
+
+    .toggle-icon {
+      .clickable-item;
+
+      &:before {
+        content: '\F077';
+      }
+
+      &.collapsed:before {
+        content: '\F078';
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.spec.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.spec.ts
new file mode 100644
index 0000000..3706d51
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.spec.ts
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
+
+import {AccordionPanelComponent} from './accordion-panel.component';
+
+describe('AccordionPanelComponent', () => {
+  let component: AccordionPanelComponent;
+  let fixture: ComponentFixture<AccordionPanelComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [AccordionPanelComponent]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(AccordionPanelComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create component', () => {
+    expect(component).toBeTruthy();
+  });
+});


Mime
View raw message