This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch FLAGON-447
in repository https://gitbox.apache.org/repos/asf/incubator-flagon.git
The following commit(s) were added to refs/heads/FLAGON-447 by this push:
new 050dfac [FLAGON-444] Added options API example in API examples
050dfac is described below
commit 050dfaca7a0af6c04b91096a07f29ace41e11cb8
Author: poorejc <[email protected]>
AuthorDate: Thu Aug 29 22:59:10 2019 -0400
[FLAGON-444] Added options API example in API examples
---
docker/README.md | 16 ++++++++--------
site/_docs/useralejs/API.md | 23 ++++++++++++++++++++---
2 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/docker/README.md b/docker/README.md
index 6124dd2..44619d1 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -1,11 +1,11 @@
Building Apache Flagon Docker Containers
===================================
-*Last Integration Test: 12 JUL 2019 using Docker Engine v18.09.2, Compose
v1.23.2, Machine v0.16.1*
+*Last Integration Test: 29 AUG 2019 using Docker Engine v19.03.1, Compose
v1.24.1, Machine v0.16.1*
Prerequisites
-------------
-1. Install [``Docker``](http://docker.com) on your machine. Requires Docker
Compose 1.7 and above.
+1. Install [``Docker``](http://docker.com) on your machine. Requires Docker
Compose 1.23 and above.
1. Install docker-compose. Full instructions can be found
[``here``](https://docs.docker.com/compose/install/).
If you install Docker through the [``Desktop
bundle``](https://www.docker.com/products/docker-desktop), docker-compose is
included.
@@ -38,21 +38,21 @@ requires special configuration. Please reach out to us at
[our dev list](mailto:
```
1. Create externel docker network to enable system monitoring. Only enable if
running
- the Elasticsearch 6.5.4 configuration (single and cluster mode)
+ Elasticsearch >6.5.4 configuration (single and cluster mode)
```bash
$ docker network create esnet
```
-1. Start Elasticsearch 6.5.4 or 6.6.2 (Recommended) Give Elasticsearch about
1-2 minutes to start before confirming its state.
+1. Start Elasticsearch 6.6.2 or 6.8.2 (Recommended) Give Elasticsearch about
1-2 minutes to start before confirming its state.
```bash
- #start Elasticsearch v6.5.4 (Deprecated)
- $ docker-compose -f docker-compose-6.5.4.yml up -d elasticsearch
+ #start Elasticsearch v6.6.2 (Deprecated)
+ $ docker-compose -f docker-compose-6.6.2.yml up -d elasticsearch
or
- #start Elasticsearch v6.6.2 (Recommended)
+ #start Elasticsearch v6.8.2 (Recommended)
$ docker-compose up -d elasticsearch
```
@@ -175,7 +175,7 @@ compose up commands above to restart containers.
$ docker-machine ls #confirm state
#output should look like this:
NAME ACTIVE DRIVER STATE URL SWARM
DOCKER ERRORS
- flagon - virtualbox Running tcp://192. ...
v18.09.3
+ flagon - virtualbox Running tcp://192. ...
v19.03.1
```
Having Issues?
diff --git a/site/_docs/useralejs/API.md b/site/_docs/useralejs/API.md
index d8b0497..351cc08 100644
--- a/site/_docs/useralejs/API.md
+++ b/site/_docs/useralejs/API.md
@@ -8,14 +8,14 @@ priority: 2
[Apache UserALE.js](https://github.com/apache/incubator-flagon-useralejs)
features a robust API that allows you
customize official Apache Flagon UserALE.js
[builds](https://github.com/apache/incubator-flagon-useralejs/tree/master/build)
page-by-page to suite your needs.
-The API exposes two functions: `setLogFilter` & `setLogMapper`. With these two
powerful functions, you have a lot of
+The API exposes a number of functions, including: `options`, `setLogFilter`, &
`setLogMapper`. With these two powerful functions, you have a lot of
latitude in customizing and curating your logs.
# API Usage
To invoke the API, simply add additional javascript code blocks under your
UserALE.js script tag.
-Don't forget to add the UserALE.js script tag:
+Don't forget to add the UserALE.js script tag! For an in depth example, see
our [Getting Started Guide]({{ '/docs/useralejs' | prepend: site.baseurl }}))
and our [example test
utility](https://github.com/apache/incubator-flagon-useralejs/tree/master/example).
```html
@@ -24,9 +24,26 @@ Don't forget to add the UserALE.js script tag:
<!--
Add the UserALE.js script tag to the top of your doc
-->
- <script src="/path/to/userale-1.0.0.min.js"
data-url="http://yourLoggingUrl"></script>
+ <script src="/path/to/userale-2.0.0.min.js"
data-url="http://yourLoggingUrl"></script>
```
+## `options` Examples
+
+`options` allows you to modify UserALE.js script tag parameters. This can be
particularly useful if need to pass additional data about users from your page
into the logging parameters, like username and sessionID. You can build
variables constructors that pass data from form data or browser storage to
UserALE's paramters.
+
+```html
+<!--
+Try out the options API to pass dynamic page data into your UserALE params
page by page.
+-->
+<script type="text/javascript">
+ const changeMe = "me";
+ window.userale.options({
+ "userId": changeMe,
+ "version": "4.0.2",
+ "sessionID": "4"
+ })
+</script>
+```
## `setLogFilter` Examples