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 10:57:57 UTC
[ambari] branch trunk updated: [AMBARI-24303] [Log Search UI] Move
the dev environment information from .gitignore to README.md (#1785)
This is an automated email from the ASF dual-hosted git repository.
tobiasistvan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4f66c74 [AMBARI-24303] [Log Search UI] Move the dev environment information from .gitignore to README.md (#1785)
4f66c74 is described below
commit 4f66c7448aadaffd8b6474694ebb428c272d46c7
Author: Istvan Tobias <to...@gmail.com>
AuthorDate: Thu Jul 19 12:57:55 2018 +0200
[AMBARI-24303] [Log Search UI] Move the dev environment information from .gitignore to README.md (#1785)
---
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`.