You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flagon.apache.org by "Joshua Poore (JIRA)" <ji...@apache.org> on 2019/08/09 18:43:00 UTC

[jira] [Commented] (FLAGON-440) create sendOnRefresh function in sendlog

    [ https://issues.apache.org/jira/browse/FLAGON-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16904120#comment-16904120 ] 

Joshua Poore commented on FLAGON-440:
-------------------------------------

added a simple sendLogs function wrapper (sendOnRefresh) to sendLogs src:

/**
 * Provides a simplified send function that can be called before events that would
 * refresh page can resolve so that log queue ('logs) can be shipped immediately. This
 * is different than sendOnClose because browser security practices prevent you from
 * listening the process responsible for window navigation actions, in action (e.g., refresh;
 * you can only detect, after the fact, the process responsible for the current window state.
 * @param \{Array} logs Array of logs to read from.
 * @param \{Object} config Configuration object to be read from.
 */
export function sendOnRefresh(logs, config) {
 if (!config.on) {
 return;
 }
 if (logs.length > 0) {
 sendLogs(logs, config.url, 1);
 }
}

> create sendOnRefresh function in sendlog
> ----------------------------------------
>
>                 Key: FLAGON-440
>                 URL: https://issues.apache.org/jira/browse/FLAGON-440
>             Project: Flagon
>          Issue Type: Sub-task
>          Components: UserALE.js
>    Affects Versions: UserALE.js 2.1.0
>         Environment: java script
>            Reporter: Joshua Poore
>            Assignee: Joshua Poore
>            Priority: Major
>             Fix For: UserALE.js 2.1.0
>
>
> In order to capture events that cascade and ultimately trigger page refreshes, we need a function to wrap up sendLogs.
> This function needs to be included in the listening function of the event handler for classes of events that initiate refreshes



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)