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

poorejc pushed a commit to branch zipkinExample
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git


The following commit(s) were added to refs/heads/zipkinExample by this push:
     new 890e409  updated userale filter
890e409 is described below

commit 890e40996dbc2ca2e69a07ce617d3b58d5dcabd5
Author: poorejc <[email protected]>
AuthorDate: Tue Jun 2 14:00:27 2020 -0400

    updated userale filter
---
 example/zipkinExample/browser.js | 11 ++++++++---
 example/zipkinExample/bundle.js  | 11 ++++++++---
 example/zipkinExample/index.html | 10 ++++++++--
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/example/zipkinExample/browser.js b/example/zipkinExample/browser.js
index de6011b..328eb58 100644
--- a/example/zipkinExample/browser.js
+++ b/example/zipkinExample/browser.js
@@ -3,7 +3,6 @@
 // use higher-precision time than milliseconds
 process.hrtime = require('browser-process-hrtime');
 
-const theButton = document.getElementById('theButton');
 // setup tracer
 const {recorder} = require('./recorder');
 const {Tracer, ExplicitContext} = require('zipkin');
@@ -32,6 +31,12 @@ function ziptest() {
     .catch(err => log(`Failed:\n${err.stack}`));
 }
 
-ziptest();
+//ziptest();
 
-//document.getElementById('theButton').addEventListener('click', () => test, 
false);
+window.userale.filter(function (log) {
+  var type_array = ['mouseup', 'mouseover', 'mousedown', 'keydown', 
'dblclick', 'blur', 'focus', 'input', 'wheel'];
+  var logType_array = ['interval'];
+  return !type_array.includes(log.type) && 
!logType_array.includes(log.logType);
+});
+
+document.getElementById('theButton').addEventListener('click', () => ziptest, 
false);
diff --git a/example/zipkinExample/bundle.js b/example/zipkinExample/bundle.js
index 5e713c7..f084d03 100644
--- a/example/zipkinExample/bundle.js
+++ b/example/zipkinExample/bundle.js
@@ -5,7 +5,6 @@
 // use higher-precision time than milliseconds
 process.hrtime = require('browser-process-hrtime');
 
-const theButton = document.getElementById('theButton');
 // setup tracer
 const {recorder} = require('./recorder');
 const {Tracer, ExplicitContext} = require('zipkin');
@@ -34,9 +33,15 @@ function ziptest() {
     .catch(err => log(`Failed:\n${err.stack}`));
 }
 
-// test();
+//ziptest();
 
-//document.getElementById('theButton').addEventListener('click', () => test, 
false);
+window.userale.filter(function (log) {
+  var type_array = ['mouseup', 'mouseover', 'mousedown', 'keydown', 
'dblclick', 'blur', 'focus', 'input', 'wheel'];
+  var logType_array = ['interval'];
+  return !type_array.includes(log.type) && 
!logType_array.includes(log.logType);
+});
+
+document.getElementById('theButton').addEventListener('click', () => ziptest, 
false);
 
 }).call(this,require('_process'))
 
},{"./recorder":18,"_process":6,"browser-process-hrtime":2,"zipkin":17,"zipkin-instrumentation-fetch":13}],2:[function(require,module,exports){
diff --git a/example/zipkinExample/index.html b/example/zipkinExample/index.html
index 77a04d9..6987514 100644
--- a/example/zipkinExample/index.html
+++ b/example/zipkinExample/index.html
@@ -1,11 +1,17 @@
 <html>
   <head>
-
+    <script src="./userale-2.1.0.min.js"
+            data-url="http://localhost:8000/";
+            data-user="example-user"
+            data-log-details="true"
+            data-version="2.1.0"
+            data-tool="Apache UserALE.js Example"
+    ></script>
   </head>
   <body>
     <pre id='log'>Calling frontend service...</pre>
   <br>
-    <button id="theButton">Click Me.</button>
+    <button type="button" id="theButton">Click Me.</button>
     <script src="./bundle.js"></script>
   </body>
 </html>

Reply via email to