-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add maps saved object for sample datasets #240
Add maps saved object for sample datasets #240
Conversation
Signed-off-by: Naveen Tatikonda <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Naveen Tatikonda <[email protected]>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #240 +/- ##
==========================================
+ Coverage 91.60% 91.66% +0.06%
==========================================
Files 9 10 +1
Lines 262 264 +2
Branches 34 34
==========================================
+ Hits 240 242 +2
Misses 16 16
Partials 6 6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
description: 'Shows cancelled flights', | ||
type: 'documents', | ||
id: 'f3ae28ce-2494-4e50-ae31-4603cfcbfd7d', | ||
zoomRange: [2, 22], |
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.
How about make the example of document layer to be visible when user initially open it at zoom 0, like [0, 5]
? IMO, as a demo example, it should be visualization friendly when at first glance.
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.
IMO, We should have use case why some layers can be invisible from beginning. User might not notice if everything is visible starting from 0.
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.
Agree, so that we can show layer is invisible after like zoom 5. I think the initially display on demo example is important for new users to show the main features. But yeah, any choice should be good.
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.
Lets make it between [0 - 14] like junqiu suggested.
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.
Sure, I will set the zoom range to [0-14] in the sample object of actual default map while checking it into the repo. As this is a dummy sample object just to validate the changes. For now, I'm leaving it as it is.
import { i18n } from '@osd/i18n'; | ||
import { ConfigSchema } from '../../../common/config'; | ||
|
||
const layerList = (config: ConfigSchema) => [ |
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.
nit: can this be destructured?
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 tried. But, not able to destructure it.
Signed-off-by: Naveen Tatikonda <[email protected]>
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! Thanks.
* Add Default Saved object for Maps Signed-off-by: Naveen Tatikonda <[email protected]> * Consume config and output result Signed-off-by: Kawika Avilla <[email protected]> * Refactor the code Signed-off-by: Naveen Tatikonda <[email protected]> * Address Review Comments Signed-off-by: Naveen Tatikonda <[email protected]> --------- Signed-off-by: Naveen Tatikonda <[email protected]> Signed-off-by: Kawika Avilla <[email protected]> Co-authored-by: Kawika Avilla <[email protected]> (cherry picked from commit 816ce79)
* Add Default Saved object for Maps Signed-off-by: Naveen Tatikonda <[email protected]> * Consume config and output result Signed-off-by: Kawika Avilla <[email protected]> * Refactor the code Signed-off-by: Naveen Tatikonda <[email protected]> * Address Review Comments Signed-off-by: Naveen Tatikonda <[email protected]> --------- Signed-off-by: Naveen Tatikonda <[email protected]> Signed-off-by: Kawika Avilla <[email protected]> Co-authored-by: Kawika Avilla <[email protected]> (cherry picked from commit 816ce79) Co-authored-by: Naveen Tatikonda <[email protected]>
Description
This PR includes the changes which adds the dashboards-maps saved object to the existing sample dataset. When the user install a sample dataset then in the dashboards-maps panel, we can see a default saved map which will help maps users to explore maps with that dataset instead of creating a new map from scratch.
We have two videos below which shows the dashboards-maps panel before adding these changes and after adding these changes for flights sample dataset. Similarly, we can add saved objects for other sample datasets.
Before.adding.changes.mov
After.adding.changes.mov
Testing
Tested it to make sure the saved object consumes the latest changes in config(dataUrl and styleUrl):
config/opensearch_dashboards.yml
Issues Resolved
opensearch-project/OpenSearch-Dashboards#3244
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.