Rison was already pulled out into an npm module so it could be reused in
the reporting plugin, so this should essentially be a noop on the
resulting source.
The rison file was originally copied and pasted directly into the Kibana
project, so it doesn't match our styleguide and is unlintable. This
means we basically have to keep our hands off of it. The node module
also has the benefit of including some tests.
The previous version of this pr relied on the State service to catch times when the URL would grow out of control. While overflows will commonly occur in the State service, this didn't handle urls that were navigated to using a link. They worked because the state service would eventually be called, but the failure was unexpected and required interaction to trigger.
This new approach does the checking at a higher level, in the chrome.
We also removed the `url:limit` configuration value in favor of browser detection (I was not able to find or come up with a way to quietly and quickly feature detect this). The new limits are 2000 characters for IE and 25000 for all other browsers.
This change was applied to any .js files under the src/ui/public/utils
directory except for the `rison.js` file. The rison code has block level
hoisting issues, but it seems safer to just not touch the file rather
than fix them.
This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.
For example:
`var foo = 'bar';` becomes `let foo = 'var';`
This was accomplished by replacing:
find: `var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=`
replace: `let $1$2=`
This change was applied only to files in
src/ui/public/utils/lodash-mixins directory.
All instances of var were replaced with let, and then all instances
of let that wouldn't flag the no-const-assign rule in the linter were
replaced with const.
This change was applied to any .js files under directories beginning
with `u` through `w` (other than utils and vislib) in src/ui/public.
There are no `y` or `z` directories. The utils directory isn't included
because the generic change breaks something in it. The vislib directory
isn't included because it had too many changes on its own.
This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.
For example:
`var foo = 'bar';` becomes `let foo = 'var';`
This was accomplished by replacing:
find: `var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=`
replace: `let $1$2=`
This change was applied to any .js files under directories beginning
with `a` through `d` in src/ui/public.
This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.
For example:
`var foo = 'bar';` becomes `let foo = 'var';`
This was accomplished by replacing:
find: `var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=`
replace: `let $1$2=`
This change was applied to all .js files under src/ui/public/vislib.
This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.
For example:
`var foo = 'bar';` becomes `let foo = 'var';`
This was accomplished by replacing:
find: `var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=`
replace: `let $1$2=`