Kibana now keeps a constant connection between the browser and the
server from Canvas's websocket. When there's a reverse proxy between the
server and the browser, the fallback is XHR polling. This open polling
connection was keeping the network alive all the time, never idle, which
resulted in the Chromium browser driver kept waiting. Eventually, the
Report job would fail with a timeout error.
* Adds progress function and elements
Added progress elements
Added progress view
Added unit tests for progress common function
Fixed prop type in toggle arg
Renamed vert -> vertical and horiz -> horizontal
Adjusted progress element dimensions
Removed check for null context in progress function
Refactored progress shapes
Added unicorn shape
Adds labelPosition arg
Added tests for labelPosition
* Added percentage column to demodata
* Updated elements to use percent_uptime in demodata
* Updated demodata percent values
* Refactored progress to use SVGs instead of shape defs
* Added barWeight arg to progress function
* Removed labelPosition arg. Set static label position for each progress shape
* Added label to unicorn shape
* Fixed element images
Improves the display of the Explorer Chart labels to fix the following issues:
- Long chart labels could be cut off, so it's not possible to tell what entity fields a chart is referring to. A workaround is to hover the info icon tooltip but that's really slow and cumbersome if you have to do it for every chart.
- The list of entity fields and its values is an unformatted text blob which makes it hard to read and tell which values refer to which field.
Changes:
- If any of the chart labels is longer than 60 chars, the entity fields will wrap to a new line (for all charts to a achieve a consistent look).
- Entity fields use EuiBadge and some custom formatting to make it easier to see field/value pairs.
- If the detector description is too long, it still uses ellipsis for text-overflow:
- If the entity badges are too long, they will be just cut off to the right. There's no simple CSS fix for that, we cannot use ellipsis and we don't want to wrap those badges again because then multiple charts could have different heights. I experimented with gradients but that turned out to be somewhat unreliable. I still consider this a good enough improvement compare to the previous version and would like to leave a tweak for that to a follow up PR.
- If there are mixed detectors with and without entity fields and the existing one wrap, multiple charts are aligned considered the height of the entity fields on display:
- Additionally, this changes the link to the single series viewer from custom code using a Font Awesome icon to use EuiButtonEmpty with the same EUI based icon and a tooltip.
* EUIify report management page
* wire ReportListing component together
* fetch jobs and display content in EuiPage
* display jobs in table
* add title and remove page size dropdown
* format date and display date in status column
* add poller
* add download button
* report error button
* remove old reporting table
* fix page styling
* create type for job
* remove job queue service
* remove angular-paging dependency from x-pack
* make download lib, update job notification hack to use jobQueueClient
* fix some more typescript stuff
* remove last angular service
* make report object type subdued color and small text
* update import in canvas
* stricter typing
* fix stuff lost in branch merge
* add return types to JobQueueClient
* wrap javascript code in {} in JSX
* Feat: ad-hoc grouping
* Feat: deleting ad-hoc group constituents
* Chore: deleted the former removeElement action
* Feat: make group snap to guides
* Feat: make group snap to guides 2
* Feat: make group snap to guides 3
* Begin replacing pipeline editor KUI elements.
* WIP build out EUI rendering of Create Pipeline view.
* Add settings components.
* Add close functionality.
* Add save functionality.
* Add temporary dependency hack for testing purposes until EUI XY Chart replaces jquery-flot.
* Add delete pipeline button/capability.
* Add delete modal.
* Remove TODO comment.
* Added toasts.
* Switch to global toast system.
* Add toast for inactive license and readonly state.
* Remove pipeline edit template.
* Add notify on PUT and DELETE errors.
* Add null check for username prop of securityService return value.
* Add disable save button if invalid ID.
* Remove pipeline id field when editing existing pipeline.
* Remove obsolete code.
* Move PipelineEditor component to dedicated file.
* Add EUI table to pipeline list view.
* Add search to pipelines table.
* Add create/delete pipelines buttons.
* Add pagination stubs. Complete after EUI bug resolved.
* Added unselectable for non-centrally-managed pipelines.
* Add clone button to pipelines list.
* Add min page height. Fix bug with edit pipeline link.
* Remove obsolete pipeline list code.
* Remove obsolete tooltip, edit, list code.
* Disable create pipeline if id is empty.
* Move PipelineList component to dedicated file.
* Add empty state to pipeline list. Add selection messages.
* Update loading message.
* Move methods to more logical positions in component.
* Add info alerts to pipeline list.
* Remove obsolete angular template.
* Remove obsolete imports from pipeline list directive.
* Define UpgradeFailure component.
* Move UpgradeFailure subcomponents to dedicated files. Write tests.
* Move PipelineEditor subcomponents to dedicated files.
* Write tests for pipeline editor subcomponents.
* Move bare strings into constants.
* Move PipelineEditor constant values into constants file.
* Break subcomponents of InfoAlerts component into dedicated files.
* Remove obsolete constants.
* WIP - write tests for PipelineList, break table into separate component, add error empty prompt message.
* Move ConfirmDeleteModal component to dedicated file and test.
* Add TODO comment.
* Add test tags to react components.
* Add 'data-test-subj' prop to fields for func tests. Minor layout update. Run prettier on some files.
* Add data-test-subj prop to button. Disable two tests until pagination is re-added.
* Re-enabled pagination for pipeline list.
* Remove wallaby hack.
* Update pagination options, remove obsolete code.
* Fix bug introduced in refactor to display delete button at appropriate time.
* Handle max_bytes setting correctly. Add theme/mode to code editor.
* Update snapshot for new pagination.
* Remove angular template for UpgradeFailure view.
* Move bare text from Modal functional component to constant file. Update test + snapshot.
* Ran prettier on all changed documents.
* Remove obsolete TODO comments.
* Re-enable disabled functional test. Clean up TODO code.
* Fix unresolved promise in functional tests.
* Pipeline delete button hidden unless enabled, move to left.
* Make filter title more readable.
* Apply width to clone column on Pipeline List.
* Modify pipeline edit view to use 's'-size icons.
* Change pipeline editor delete button to empty button.
* Move pipeline edit actions to bottom left of form.
* Add propTypes for PipelineEditor.
* Update test snapshots.
* Update pipeline list delete button func test.
* Add pipeline edit test. Add heading to pipeline edit page.
* Move constant files to modules where they are consumed.
* Move UPGRADE_FAILURE constants into module that consumes them.
* Remove redundant tests and remove text constant imports from tests.
* Give initial values to id and description text fields to make them controlled components.
* Clean up pipeline ID form regex validation and add tests.
Fixes two issues in IE11 for Anomaly Explorer:
- The format of the string returned from element.attr('transform') is different in IE11 so the regex based on it would fail. This fixes the issue and adds tests for the different formats. The code was also changed to gracefully return NaN in case the regex wouldn't return results, the previous version triggered a JS error.
- The migration of the swimlanes to React caused the cell selection to malfunction in IE11. This fixes it by updating the dragSelect library to use the new method setSelectables. The previous method we used (addSelectables) didn't play well with how React rerenders the swimlanes. Note this lib update using the new method will require to run yarn kbn bootstrap.
* Use an instance of SavedObjectsSerializer for migrations and the repository
* Fixing spelling of serialization
* Making the serializer conditionally include and prepend id with ns
* Adding repository tests for the namespaces
* Implementing find
* Modifying the SOCs to pass the options with the namespace
* Centralizing omitting the namespace when using serializer.rawToSavedObject
* Passing the schema through to the SavedObjectRepositoryProvider
* Changing the schema to work with undefined ui exports schemas
* Adding schema tests
* Making the complimentary serialization test use the namespace
* Fixing uiExports
* Fixing some tests
* Fixing included fields for the find
* Fixing include field tests, they're checking length also...
* Updating Repository test after adding namespace to always included
fields
* Renaming UIExportsSavedObjectTypeSchema to SavedObjectsSchemaDefinition
* Completing rename... forgot to save usages
* Fixing issue with the serialization.isRawSavedObject and the trailing :
* Merge in boilerplate branch
* Manually copy over the specific metrics and UIs
* Add api integration tests
* Fix tests
* Remove unused metrics
* Update snapshot
* Fix tests
* Remove types agg
* Use ApmClusterMetric
* provide description for apm-server monitoring metrics (#23331)
* Vis LESS to SASS (cont.) (#23199)
* Tweak migrations integraiton tests to have a stable sort (#23265)
* Fix: plugin api route with security enabled (#23334)
Closes https://github.com/elastic/kibana/issues/23266
This is more of a quick fix than the final solution. The issue was that Canvas tries to check the plugins API without checking to see if the user it logged in. As a result, instead of the plugins response, it gets the HTML from the login page and that causes an error to be thrown when attempting to parse the results.
For now, this PR just disables the auth requirement on the Canvas plugin API endpoint.
* [migrations/tests] sort results before assertion (#23347)
There have been several failures in this test, seemingly caused by a lack of sorting in the results. It makes sense that since both migrations are run simultaneously that sometimes one would succeed and sometimes another would, so I've just sorted the results before checking.
![image](https://user-images.githubusercontent.com/1329312/45791153-44e9cc80-bc3d-11e8-88c4-760d4c7b35bd.png)
cc: @chrisdavies
* [ML] Moves custom URL editor Add button and form to top of flyout (#23326)
* [ML] Moves custom URL editor Add button and form to top of flyout
* [ML] Edits to custom URL editor class name
* Graph LESS to SASS (#23348)
* Developer documentation for integrating with the telemetry service (#23295)
* Developer documentation for integrating with the telemetry service
* open with a bang
* more faqs
* thing about tracking ui interactions
* talk to the plat team
* create and register
* Fix a bug where ES sends a string and migrations expect a boolean (#23313)
* chore: use cheerio in i18n.html.getDirectiveMessages (#23342)
this was only using jsdom to parse html, but cheerio allows parsing html without requiring a dom. cheerio was also already in the dependency list.
* [core/utils] add shareWeakReplay() operator (#23333)
* Chore: fix canvas test runner (#23336)
Blocked by https://github.com/elastic/kibana/pull/23342
This fixes the local test runner in Canvas. It should not affect anything else, including the CI test runner.
- Bumps JSDOM to ^12.0.0
- I matched Kibana's version on migration, but nothing else in X-Pack uses JSDOM, so we can use the newer version (which has a very different API)
- I had to match it because of a script that enforces version matching, but #23342 removed jsdom from Kibana, so we no longer have a version to match
- Restores the local `.babelrc` file
- I thought it was only used for building plugins; I was wrong 😢
* Convert Discover open top nav to EUI flyout (#22971)
* move find logic to SavedObjectFinder component since savedObjectClient is no longer coupled to angular
* implement flyout open saved searches
* remove old open stuff
* add jest test for OpenSearchPanel and simplify panel title
* fix functional tests
* fix _lab_mode functional test
* Migrate save top nav in Discover and Visualize to EUI (#23190)
* extract reusable save component from DashboardSaveModal
* update discover search to use SavedObjectSaveModal
* create generic show_save_model that works for both discover and dashboard
* fix last bits of discover save
* remove old save functionallity
* migrate visualize save to EUI
* fix functional tests
* disable save button if title is empty
* mark title input as invalid when title is not provided
* fix funtional tests
* Moves styleSheetPath to uiExports (#23007)
This was previously defined in uiExports.app, which limited plugins which are not an app of providing a stylesheet. This allows any plugin to define a stylesheet which will be available on page load.
* Timelion less to sass (#23339)
* Consistent casing
* Fix snapshot
* Update tests
- This fixes the limit dropdown behavior. The fix for that is actually just the $scope.appState.fetch(); statements in explorer_controller.js, they avoid to run the information stored in appState across modules out of sync.
- Additionally, the aim of this PR is to simplify the state management of Anomaly Explorer in the context of selecting cells in the swimlanes and updating the influencers list, charts and table accordingly.
Closes https://github.com/elastic/kibana/issues/23266
This is more of a quick fix than the final solution. The issue was that Canvas tries to check the plugins API without checking to see if the user it logged in. As a result, instead of the plugins response, it gets the HTML from the login page and that causes an error to be thrown when attempting to parse the results.
For now, this PR just disables the auth requirement on the Canvas plugin API endpoint.
This was previously defined in uiExports.app, which limited plugins which are not an app of providing a stylesheet. This allows any plugin to define a stylesheet which will be available on page load.
Blocked by https://github.com/elastic/kibana/pull/23342
This fixes the local test runner in Canvas. It should not affect anything else, including the CI test runner.
- Bumps JSDOM to ^12.0.0
- I matched Kibana's version on migration, but nothing else in X-Pack uses JSDOM, so we can use the newer version (which has a very different API)
- I had to match it because of a script that enforces version matching, but #23342 removed jsdom from Kibana, so we no longer have a version to match
- Restores the local `.babelrc` file
- I thought it was only used for building plugins; I was wrong 😢
- Even with the check if fadeTimeout was set in show(), I could reproduce race conditions where a new tooltip would disappear again, because a previous fadeTimeout would trigger and set the new tooltips display to none.
- This PR fixes it by adding a non-asynchronous visible flag to mlChartTooltipService to check if the tooltip should stay visible if fadeTimeout triggers.
* adding opt in for telemetry to start trial and upload license
* fixing scrolling issue with start basic modal in small browser window and improving a11y for read more
* Design cleanup
Mostly spacing and alignment fixes.
* updating jest snapshots
* IE Fixes
* PR feedback
- This refactor gets rid of jQuery as a requirement for the Anomaly Explorer Swimlanes. All the DOM manipulation previously done by jQuery is now done by d3.
- The primary aim here is to replace jQuery with d3. To avoid refactoring regressions, this PR sticks as much as possible to the original structure. Overall, this could be done in a more "d3"-way, but it's a good start.
- The resulting DOM is a bit different: The structure is exactly the same, just how we use certain data-attributes changed.
- Instead of using jQuery's data-feature for storing click event data, that data is now directly stored on DOM nodes. Again, this could be done in a more "d3"-way but would require quite some further refactoring.
* chore: merge canavs into x-pack
squashed, since 6.x history isn't important and i want to be able to rebase...
* chore: eslint fixes in canvas
adds license headers and includes project linting overrides
* Chore: Reorg the x-pack gulp tasks (#22785)
- Removes deprecated, non-functional lint scripts
- Removes some unused (and barely used) dependencies
- Replaces deprecated `gulp-util` dependency
- Adds eslint rule to prevent future use of deprecated `gulp-util` dependency
- Moves all gulp tasks into `tasks` path
- Moves `gulp_helpers` into `tasks/helpers`
- All tasks in `gulpfile.js` were moved into `tasks` and broken up by domain
This is basically a no-op moving files around PR. All the existing tasks appear to work the same with these changes.
<img width="334" alt="screenshot 2018-09-06 15 42 45" src="https://user-images.githubusercontent.com/404731/45188971-8618c000-b1eb-11e8-9b26-b072ccc7ddb7.png">
* chore: rename files to match rules
* chore: copy canvas dependencies
* chore: reduce package.json to essentials
* chore: make canvas work in xpack
* chore: make browser tests work
* chore: fix include paths
node_modules is in a different relative path
* chore: fix ml tests with canvas code in x-pack
explicitely enable state management so the mlStateFactory tests pass
* chore: fix RBAC tests with canvas
* chore: split up the xpack prepare scripts
* chore: canvas tasks - dev, peg, and plugins
get dev, peg, and plugin building tasks working
* chore: canvas tasks - local tests
* chore: additional file cleanup
* chore: yarn lockfiles and eslint fixes
license headers and some small formatting stuff
- Fixes a regression introduced in #22814. Because of the stricter checking for scope/props updates, resizing the browser window would miss updating the Anomaly Explorer Charts widths. This fixes it by adding a check to trigger anomalyDataChange in redrawOnResize().
- Additionally, if only one chart is up for display, this update makes sure a single chart always spans across the full available width.
- This fixes a regression introduced in #22814. The influencer list wouldn't update if no cell in the swimlanes was selected.
- Renames getTopInfluencers to loadTopInfluencers to be in line with the other functions loadDataForCharts and loadAnomaliesTableData
- Changes the order of arguments for loadDataForCharts so they are the same like in loadTopInfluencers.
- The aim of this is to more clearly visualize how the timerange of the cell selected in the swimlane relates to the time span shown in the charts.
- The most important change is that the vertical date axis ticks no longer are randomly positioned by d3. Instead they are aligned with the cell interval of the swimlane. This way, the date information shown in the swimlane tooltip will always align with the date tick shown left of the emphasized area in the chart.
- The highlighted area now features a gray rounded border to resemble the styling of the selected cell in the swimlane.
- The chart also fixes where to long chart headers would wrap the "View" link to a new line.
- The x/y axis labels blackness has been reduced to reduce emphasis on the labels.