You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by to...@apache.org on 2018/07/19 12:50:29 UTC

[ambari] branch branch-2.7 updated: [AMBARI-24303] [Log Search UI] Move the dev environment information from .gitignore to README.md (#1790)

This is an automated email from the ASF dual-hosted git repository.

tobiasistvan pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 760e4e6  [AMBARI-24303] [Log Search UI] Move the dev environment information from .gitignore to README.md (#1790)
760e4e6 is described below

commit 760e4e682662e6124cdd1ff7e66ddf5153602e9a
Author: Istvan Tobias <to...@gmail.com>
AuthorDate: Thu Jul 19 14:50:27 2018 +0200

    [AMBARI-24303] [Log Search UI] Move the dev environment information from .gitignore to README.md (#1790)
    
    (cherry picked from commit 28d51a8b5536442522befa92ffd6691d99700cbb)
---
 ambari-logsearch/ambari-logsearch-web/.gitignore | 18 ------------------
 ambari-logsearch/ambari-logsearch-web/README.md  | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/ambari-logsearch/ambari-logsearch-web/.gitignore b/ambari-logsearch/ambari-logsearch-web/.gitignore
index 04e38b9..d64ee8c 100644
--- a/ambari-logsearch/ambari-logsearch-web/.gitignore
+++ b/ambari-logsearch/ambari-logsearch-web/.gitignore
@@ -42,22 +42,4 @@ testem.log
 Thumbs.db
 
 # Development Test Files
-#
-# Webpack Development Config
-# In order to use Webpack Devserver proxy without changing the main config file
-# and commit accidentally we can use a webpack.config.dev.js file for that
-# Eg.:
-# const merge = require('webpack-merge');
-# const baseConfig = require('./webpack.config.js');
-#
-# module.exports = merge(baseConfig, {
-#   devServer: {
-#     historyApiFallback: true,
-#     proxy: {
-#       '/': 'http://c7401.ambari.apache.org:61888'
-#     }
-#   }
-# });
-# And you can start it that way: NODE_ENV=production yarn start --config webpack.config.dev.js
-# You have to set the NODE_ENV to production in order to skip the mock data usage
 webpack.config.dev.js
diff --git a/ambari-logsearch/ambari-logsearch-web/README.md b/ambari-logsearch/ambari-logsearch-web/README.md
index 081d22a..a91ad9a 100644
--- a/ambari-logsearch/ambari-logsearch-web/README.md
+++ b/ambari-logsearch/ambari-logsearch-web/README.md
@@ -6,6 +6,26 @@ This project was generated with [Angular CLI](https://github.com/angular/angular
 
 Run `npm start` or `yarn start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
 
+## Webpack Development Config
+In order to use Webpack Devserver proxy without changing the main config file and commit accidentally we can use a `webpack.config.dev.js` file for that. So you can set a service URL in order to test the UI against real data.
+
+The content of the `webpack.config.dev.js` can be:
+```
+const merge = require('webpack-merge');
+const baseConfig = require('./webpack.config.js');
+
+module.exports = merge(baseConfig, {
+  devServer: {
+    historyApiFallback: true,
+    proxy: {
+      '/': 'http://c7401.ambari.apache.org:61888'
+    }
+  }
+});
+```
+And you can start it that way: `NODE_ENV=production yarn start --config webpack.config.dev.js`
+You have to set the `NODE_ENV` to production in order to skip the mock data usage
+
 ## Code scaffolding
 
 Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.