-
Notifications
You must be signed in to change notification settings - Fork 892
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
[Data Explorer] Initial commit #4292
[Data Explorer] Initial commit #4292
Conversation
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Codecov Report
@@ Coverage Diff @@
## feature/data-explorer #4292 +/- ##
========================================================
Coverage ? 66.55%
========================================================
Files ? 3278
Lines ? 62654
Branches ? 9760
========================================================
Hits ? 41702
Misses ? 18587
Partials ? 2365
Flags with carried forward coverage won't be shown. Click here to find out 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.
Am i correct to assume everything under discover_legacy
is just renamed discover
with possibly some reference changes?
@@ -0,0 +1,11 @@ | |||
# dataExplorer | |||
|
|||
A OpenSearch Dashboards plugin |
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.
A OpenSearch Dashboards plugin | |
An OpenSearch Dashboards plugin to ... ??? |
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.
Most of these are placeholders for now. Just want to setup the initial framework
<EuiComboBox | ||
placeholder="Select a datasource" | ||
singleSelection={{ asPlainText: true }} | ||
options={[ | ||
{ | ||
label: 'Select a datasource', |
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.
Can we i18nize these?
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 whole component here will be replaced. This is just a placeholder for now
$osdHeaderOffset: $euiHeaderHeightCompensation; | ||
|
||
.dePageTemplate { | ||
height: calc(100vh - #{$osdHeaderOffset}); |
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.
Does this take into account the expanded header being true
or false
?
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.
Yes it does. This is how VisBuilder does it
|
||
private registerView(viewDefinition: View) { | ||
if (this.views[viewDefinition.id]) { | ||
throw new Error(`A view with this the id ${viewDefinition.id} already exists!`); |
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.
Should we wrap the id in ""
, ``
or []
?
throw new Error(`A view with this the id "${viewDefinition.id}" already exists!`);
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.
We could, this is never a user facing error and mostly copied over from a similar service in the other apps. no strong opinions here :)
* returns all registered Views | ||
*/ | ||
all: (): View[] => { | ||
return [...Object.values(this.views)]; |
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.
Why would we need to spread this?
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 question, I dont remember why i did this. Again something i just referenced from a similar service in VisBuilder.
import React from 'react'; | ||
|
||
export const createCanvas = () => { | ||
return <div>Test Canvas</div>; |
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.
What do we expect to place instead of this Test? Does it need a ToDo:
or will this stay as is?
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.
Again, this is a placeholder. Will go away before the merge to main.
import React from 'react'; | ||
|
||
export const createPanel = () => { | ||
return <div>Test Panel</div>; |
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.
Is this something we plan on changing?
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.
Yes, will go away soon. It is a placeholder
Mostly yes, the server component is not moved over from |
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
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.
have played with it for table vis
think this is good to merge in as an initial starting point
*/ | ||
|
||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor |
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.
do we still need this one?
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 good catch, ill update them in a followup PR
@@ -47,6 +48,17 @@ import { | |||
} from '../common'; | |||
|
|||
export const uiSettings: Record<string, UiSettingsParams> = { | |||
[DISCOVER_LEGACY_TOGGLE]: { | |||
name: i18n.translate('discover.advancedSettings.legacyToggleTitle', { | |||
defaultMessage: 'Disable new discover app', |
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: should we change this to be Disable legacy discover app
? Or is there an action item to change the logic above so that it will route to the new discover app on true?
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 default should be the new app but i set it to the legacy to see if the CI would pass. Looks like the legacy path is causing a problem so i will revert the change
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 like it. Seems relatively safe to get into main?
I know historically, the legacy
suffix has been used in the process of migrating stuff? To which i guess can cause some changes throughout the app if we want full support (for example the routing). I wonder if we want to consider the next
suffix to have the new code and a new route and then once we fully adopt it then we either delete or add the legacy
suffix if it is still needed.
I want to fix the functional tests before going into main, so for now ill merge it into the feature branch for now :) |
Description
discover
todiscover_legacy
Issues Resolved
closes #4217
closes #4218
closes #4219
closes #4220
closes #4223
Screenshot
Screen.Recording.2023-06-15.at.12.27.22.PM.mov
Testing the changes
Click on the discover tab with both the advanced settings turned on and off for discover legacy. All discover routes should work when discover legacy is turned on.
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr