Commit graph

14193 commits

Author SHA1 Message Date
spalger 445ceba48f [state] enable storing the state in session storage by default 2016-09-06 10:06:20 -07:00
spalger 6f9c708c6f incorporate feedback from @thomasneirynck 2016-09-06 10:06:20 -07:00
CJ Cenizal 06ed9339bb Remove LazyLruStore, HashingStore, and createStorageHash.
- Replace with HashedItemStore, createStateHash, and isStateHash.
- Refactor stubBrowserStorage.
2016-09-06 10:06:20 -07:00
CJ Cenizal df2c116561 Simplify HashingStore interface. Extract createHash method into a createStorageHash module. 2016-09-06 10:06:20 -07:00
CJ Cenizal b51b5cb3fe Rename HashingStore interface methods for consistency and clarity. Remove unused '#remove' method. 2016-09-06 10:06:20 -07:00
spalger ed12206f01 [share] stop caching unhashUrl() call 2016-09-06 10:06:20 -07:00
CJ Cenizal df8e5ac1fa Export HashingStore and LazyLruStore from index module. 2016-09-06 10:06:20 -07:00
CJ Cenizal 55a923dd77 Refactor state-hashing files into state_hashing and state_storage subdirectories. 2016-09-06 10:06:20 -07:00
spalger 8f7af7d093 [state] store url states into session storage
Kibana currently stores it's entire application state in the URL by rison encoding it and sticking it into a query string parameter, _a for AppState and _g for GlobalState.

This has functioned fine for a while, but Internet Explorer's short URL length restriction are starting to become a problem for more and more users. To provide these users with a workaround this adds an advanced config option that will store the state in sessionStorage instead of the URL.

This is accomplished by hashing the serialized version of the state, storing a short version of the hash in the URL, and storing the whole serialized state in sessionStorage using the hash + state-type as a key.

Since sessionStorage is limited in size, we must clean up old stored states after they become unreachable to the application. This is done using the new `LazyLruStore` class, a wrapper around sessionStorage. This wrapper helps us maintain the list of stored states based on the time they are accessed (On each set the access time is updates).

It's cleanup style is configured with it's maxItems, idealClearRatio, and maxIdealClearPercent configurations. The defaults for which should be sufficient.

`maxItems`: limits the store to n items, removing the oldest item when the list overflows
`idealClearRatio+maxIdealClearPercent`: when `store.setItem(key, value)` throws an error we try to clear space equal to `idealClearRatio * (key+value).length`, but no more space than `totalSize * maxIdealClearPercent`
2016-09-06 10:06:00 -07:00
Rashid Khan 6aa8ca4a42 Merge pull request #7994 from rashidkpc/migrate/timelion
Add timelion to kibana core
2016-09-02 15:10:27 -07:00
Rashid Khan 95177455a0 Remove old config population function 2016-09-02 14:28:28 -07:00
Rashid Khan 1c6af33069 Remove timelion header 2016-09-02 14:22:17 -07:00
Rashid Khan 13da673bc8 Merge branch 'master' of github.com:elastic/kibana into migrate/timelion 2016-09-02 12:47:19 -07:00
Spencer d94ab0bf17 Merge pull request #8150 from spalger/test/shardTestsToEaseMemoryPressure
add test sharding
2016-09-02 12:43:30 -07:00
spalger 88427e9a43 add test sharding
The tests in master are currently failing regularly because our current browser tests are serious memory hogs. Investigation reveals that nearly every test is retaining all of the memory it causes to be allocated. We have made some progress to being able to diagnose the problems, but we expect that problem to take some serious work to fix. We need a short-term solution though, and this is it.

Rather than modify the bundling process, we will shard the top-level test suites by name. For now, we've created 4 shards, but adding new shards is trivial if we need to.

Sharding is accomplished by creating a murmur3 hash of the top level suite names, then bucketing based on the hash output. If a test suite resolves to shard2, but we are running shard1, we simply never pass the function to `mocha.describe()`. Rather than redefine every describe statement, we have shimmed the global `window.describe()` function to accomplish this.
2016-09-02 10:38:29 -07:00
Rashid Khan 8c3d9efb57 Fix precision of worldbank series 2016-09-02 09:21:11 -07:00
Rashid Khan 589ea55f7e Merge branch 'master' of github.com:elastic/kibana into migrate/timelion 2016-09-02 09:20:49 -07:00
Shaunak Kashyap 9bff06769f Merge pull request #8097 from ycombinator/fwd-port-8043
Adding system API module
2016-08-31 17:09:44 -07:00
Shaunak Kashyap 3bdffb7f31
Export system API module so plugins may use it 2016-08-31 15:31:00 -07:00
Shaunak Kashyap 14ea5c3ff5
Adding server-side module for system APIs 2016-08-31 14:15:23 -07:00
Shaunak Kashyap 77d7e8d53c
Fixing module name 2016-08-31 14:14:38 -07:00
debadair 48da8246fb Docs: Reorganized setup topic to fix "missing" install instructions. 2016-08-31 13:14:39 -07:00
Shaunak Kashyap 9455755194 Merge branch 'master' into fwd-port-8043 2016-08-31 12:17:34 -07:00
Tim Sullivan fdcd9a3167 Merge pull request #8014 from tsullivan/uuid-rewrite-datafile
uuid: rewrite using path.data file instead of .kibana index
2016-08-30 16:21:05 -07:00
Timothy Sullivan 56e4527006 doc: release notes: add uuid line 2016-08-30 16:11:43 -07:00
Timothy Sullivan 73cf57aee4 uuid: use server.config for hostname 2016-08-30 16:11:43 -07:00
Timothy Sullivan fa6b33eba2 uuid: config key rename uuid => server.uuid 2016-08-30 16:11:43 -07:00
Timothy Sullivan 56e2532353 test/uuid: simplify test to not rely on elasticsearch 2016-08-30 16:11:43 -07:00
Timothy Sullivan 0515489092 uuid: rewrite using path.data file instead of .kibana index 2016-08-30 16:11:43 -07:00
Court Ewing edf1ee89ba Merge pull request #8125 from LeeDr/defaultIndexPattern7496
Re-set default index pattern in navigateToApp
2016-08-30 17:32:37 -04:00
Tim Sullivan ecc3df996e Merge pull request #8017 from tsullivan/notifications-banner-styling
Style fixes for banner notifications
2016-08-30 13:57:53 -07:00
LeeDr cf67bb35d6 Merge branch 'defaultIndexPattern7496' of github.com:LeeDr/kibana into defaultIndexPattern7496 2016-08-30 15:11:46 -05:00
LeeDr a66fc9d52d return promise from updateConfigDoc 2016-08-30 15:11:04 -05:00
LeeDr 4cad856136 Work-around #7496 and/or #7055 by re-setting default index pattern 2016-08-30 15:11:03 -05:00
Court Ewing 132dbdf774 Merge pull request #8127 from LeeDr/fixSideFieldBarExpandCollapse
Changed required field data pane width and increased window width for…
2016-08-30 16:04:35 -04:00
Timothy Sullivan f0712586ca [Notifier] fix broken css helper class karma test 2016-08-30 12:32:33 -07:00
LeeDr 4bc86f4327 Changed required field data pane width and increased window width for changes in side bar. 2016-08-30 14:19:15 -05:00
Timothy Sullivan 36d11660a6 [Notifier] css cleanup and selector un-nesting 2016-08-30 12:18:42 -07:00
Timothy Sullivan 8ed14a2f2e [Notifier] helper classes: mapping between notif.type and classes 2016-08-30 12:18:42 -07:00
Timothy Sullivan 3b8067a856 banner notifications: new styling per design
- helper functions for dynamic css class names
- notifications: reposition the countdown button outside of the button group
- notifications/buttons: bootstrap primary/default button classes for custom actions
2016-08-30 12:18:42 -07:00
Court Ewing 401dea9ee3 Merge pull request #8123 from spalger/fix/configRaceInTests
remove config.set() call to avoid race
2016-08-30 14:40:18 -04:00
spalger a1fb3239f1 remove config.set() call to avoid race
Several tests have been failing recently with "Error: Unexpected request: POST /api/kibana/settings/shortDots:enable, No more request expected" which seems to be caused by the field chooser tests calling `config.set('shortDots:enable', origValue)` in the test cleanup task. Rather than investigate it further I avoided the need to call `config.set()` by stubbing the `config.get()` method.
2016-08-30 11:11:54 -07:00
Rashid Khan 8e5ef7c5b2 Merge branch 'master' of github.com:elastic/kibana into migrate/timelion 2016-08-30 11:11:03 -07:00
Rashid Khan e34d2c1e92 Add log function 2016-08-30 11:10:29 -07:00
LeeDr 6c668d7ae1 return promise from updateConfigDoc 2016-08-30 11:29:37 -05:00
LeeDr e2b7aea899 Work-around #7496 and/or #7055 by re-setting default index pattern 2016-08-30 10:28:14 -05:00
Shaunak Kashyap c74f1f46c4 Merge pull request #8072 from lukasolson/fix/kbn-base-url
Export Kibana base URL for use in other plugins
2016-08-30 06:37:49 -07:00
Lukas Olson f27ac3c7d6 Re-add the leading slash I accidentally removed 2016-08-29 12:42:21 -07:00
Matt Bargar 5bbe02e66a Merge pull request #7700 from Bargs/painless
Set language for scripted field
2016-08-29 12:12:02 -04:00
Rashid Khan 1c47159939 Merge branch 'master' of github.com:elastic/kibana into migrate/timelion 2016-08-29 09:09:01 -07:00