-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geocentroid / tilemap bug fixes #10871
Geocentroid / tilemap bug fixes #10871
Conversation
functionality wise it looks great! i also gave a quick look at the code and can't find anything. im gonna give it another run later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied over the relevant comments from the previous PRs, so a lot of this is the same, but a few things are new.
import KibanaMapLayer from './kibana_map_layer'; | ||
import _ from 'lodash'; | ||
import { EventEmitter } from 'events'; | ||
import Heatmap from './heatmap'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for splitting this file up. It might be worthwhile to put all of the Layers into a folder.
src/ui/public/vis/agg_configs.js
Outdated
return _.sortBy(this, function (agg) { | ||
|
||
|
||
const aggregations = _.sortBy(this, function (agg) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's currently an extension point in the AppConfig to allow each individual item to customize the responseAggs, I added one for the requestAggs as well so that we can do the geohash logic there and it seems to work: kobelb@fd6b344
That way we don't have to hard-code the logic for specific aggregations here.
We should add unit-tests for this, regardless of which direction we go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oki, changed it using this approach, thx!
break; | ||
case 'Heatmap': | ||
this._geohashMarkers = new Heatmap(this._geohashGeoJson, { | ||
radius: +this._geohashOptions.heatmap.heatRadius, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The +
before this is to ensure that they're positive numbers, right? When were we seeing this? It seems like something that should be caught by our validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it coerces it to the number type. It was like that before. Agreed it looks weird and is probably not necessary, I will change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, forgot you could do it that way in Javascript...
src/ui/public/vis_maps/heatmap.js
Outdated
* @param geoJson {geoJson Object} | ||
* @param params {Object} | ||
*/ | ||
export default class Heatmap extends EventEmitter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty legend is still showing up, when it isn't in 5.2.2. Obviously, not a blocker, but just FYI.
src/server/config/schema.js
Outdated
status: Joi.object({ | ||
allowAnonymous: Joi.boolean().default(false) | ||
}).default(), | ||
vectormap: Joi.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This config section snuck in here, even though we won't be adding vectormap support with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, thanks
@@ -0,0 +1,507 @@ | |||
import { EventEmitter } from 'events'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the data on just a single earth is normal. it is a limitation of leaflet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zoom on save is fixed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
.vis-option-item { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jenkins, test this |
is CI broken or are the unit test failures related to this PR ? |
@ppisljar tests are broken due to this PR. |
add tooltip boilerplate
move legend with option add tms settings add min/max zoom settings add valueformatters
ad1e852
to
9ba3894
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- adds the geo-centroid metric as the new default for visualizations - various bug fixes and improvements - avoid unnecessary calls to manifest - avoid map flicker when zooming - enable scroll/pinch/touch zooming - avoid heatmap errors - ensure map fills screen in dashboard - ensure fit works consistently - relax tilemap constraints - remove support for multi-maps - this refactor sets the stage for new vector map visualization which will reuse the same map components
due to merge conflicts, this also required backporting the resize_checker components * Geocentroid / tilemap bug fixes (#10871) - adds the geo-centroid metric as the new default for visualizations - various bug fixes and improvements - avoid unnecessary calls to manifest - avoid map flicker when zooming - enable scroll/pinch/touch zooming - avoid heatmap errors - ensure map fills screen in dashboard - ensure fit works consistently - relax tilemap constraints - remove support for multi-maps - this refactor sets the stage for new vector map visualization which will reuse the same map components
Summary:
Kibana now uses the geo-centroid of the results to place results on a map. The result is a more natural looking map with fewer visual artifacts. It avoids the "gridded"-look from earlier versions. The map now also supports panning&zooming with touchscreens, as well as bug fixes that improve stability.
New PR, without the vector map. This is so we can resolve the blocker for X-pack quicker.
todos: