Skip to content
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

GettingStarted Rework #2194

Merged
merged 9 commits into from
Oct 11, 2024
Merged

Conversation

TackAdam
Copy link
Collaborator

@TackAdam TackAdam commented Oct 8, 2024

Description

Updates to GettingStarted

  1. Restructure getting started to be Logs, Metrics, and Traces
  2. Remove the dashboard creation
  3. Change the workflow order to have Schema / Index Patterns (and create asset button)at the first steps before the user creates there index.
  4. Get rid of the query and analyze panel and add them into the workflow.
  5. If the integration exist (Currently only for Nginx) give an option to redirect to the integration panel to finish creating it.
  6. Break apart the OTEL workflow into logs, metrics, and traces/services.
  7. Remove the quickstart workflow and replace it with "Self Managed" and an additional tab for "AWS"(for OTEL logs/metrics/traces)
  8. Add default behavior to open up OTEL Logs when landing on the page.
  9. Remove workflow for file upload
Before After
Before Image 1 After Image 1
Before Image 2 After Image 2
Before Image 3 After Image 3
Before Image 4 After Image 4

Video of new experience
https://github.com/user-attachments/assets/a8cc30d6-70a7-4d18-b8c3-6b7ffada0869

For Nginx
Screenshot 2024-10-10 at 2 46 53 PM
Redirect to
Screenshot 2024-10-10 at 2 47 12 PM

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

@TackAdam TackAdam added enhancement New feature or request backport 2.x labels Oct 10, 2024
@TackAdam TackAdam marked this pull request as ready for review October 10, 2024 21:42
@TackAdam TackAdam changed the title [WIP] GettingStarted Rework GettingStarted Rework Oct 10, 2024
Adam Tackett added 2 commits October 10, 2024 15:03
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
@@ -108,88 +108,45 @@
}
],
"getting-started": {
"info": "https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/nginx/getting-started/Getting-Started.md",
"info": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where's the source of these json files, do we have to main all these files?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is not exposed to the user and was previously used to generate information on the dashboard we are not creating anymore.
We are currently manually making all these json's to provide the steps/workflows but would like to eventually move these to the catalog.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is not exposed to the user and was previously used to generate information on the dashboard we are not creating anymore.

We've spoke about this offline, this is not specifically for this info but overall like do we have to manually create/maintain these json files on the UI side.

We are currently manually making all these json's to provide the steps/workflows but would like to eventually move these to the catalog.

Could we create issue for this just for tracking purposes?

@@ -98,6 +99,9 @@ export const Home = (props: HomeProps) => {
return (
<div>
{dataSourceMenuComponent}
<HeaderControlledComponentsWrapper
description={'Get started with collecting and monitoring your observability data.'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move this to constant file and add i18n

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added i18n

      <HeaderControlledComponentsWrapper
        description={i18n.translate('observabilityGetStarted.description', {
          defaultMessage: 'Get started with collecting and monitoring your observability data.',
        })}

I don't think it should be moved to constant folder as it is a 1 off description and currently all the top nav registration of descriptions are done in file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, generally we should for better maintainability but not a blocker

height: 40px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These styles should be moved to corresponding component scss file(s), here should only contain general import as this is the index file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icon components are shared between integrations and getting-started to keep the image size consistent between the plugins.

Copy link
Collaborator

@mengweieric mengweieric Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could reuse existing or create new shared scss files for general styings that are shared across different modules. index file here are for modularity importing of scss partials.

@@ -8,8 +8,12 @@ import path from 'path';

export const assetMapper = (tutorialId: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to consider refactor this code piece as it is

  • not easy to maintain, the growing number of cases makes these magic strings
    • proven to typos
    • not easy to be modified when naming and version changes along the way

we want to consider

  • use map or enum for all these file names and move these stuff to constant file.
type TutorialId = 'otelLogs' | 'otelMetrics' | 'otelTraces' | 'nginx' | 'java' | 'python' | 'golang';

const assetMap: Record<TutorialId, string> = {
  otelLogs: 'otel-index-patterns-1.0.0-Logs.ndjson',
  otelMetrics: 'otel-index-patterns-1.0.0-Metrics.ndjson',
  otelTraces: 'otel-index-patterns-1.0.0-Traces.ndjson',
  nginx: 'nginx-1.0.0.ndjson',
  java: 'java-tutorial-1.0.0.ndjson',
  python: 'python-tutorial-1.0.0.ndjson',
  golang: 'golang-tutorial-1.0.0.ndjson',
};

export const assetMapper = (tutorialId: TutorialId): string => {
  return assetMap[tutorialId] || '';
};
  • maybe use concatenations like ${component}-${indexPattens}-${version}-${signal}.ndjson
  • provides a default return?

Also similar question: are these files coming from integration? If so, do we need to maintain these files from within get started module? Can't we just fetch from somewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all currently manually created.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted it to be

export const assetMapper = (tutorialId: TutorialId): string => {
  const component = COMPONENT_MAP[tutorialId] || 'default-component';
  const version = VERSION_MAP[tutorialId] || '1.0.0';
  const signal = SIGNAL_MAP[tutorialId] ? `-${SIGNAL_MAP[tutorialId]}` : '';

  return `${component}-${version}${signal}.ndjson`;
};

and moved others to constants.

@mengweieric
Copy link
Collaborator

Could we also add tests to some of these changes?

Signed-off-by: Adam Tackett <[email protected]>
@TackAdam TackAdam merged commit f68eba1 into opensearch-project:main Oct 11, 2024
10 of 18 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-2194-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f68eba1c45920df2866875dd5542cfe805e3f241
# Push it to GitHub
git push --set-upstream origin backport/backport-2194-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-2194-to-2.x.

TackAdam added a commit to TackAdam/dashboards-observability that referenced this pull request Oct 11, 2024
* UI pass updating everything

Signed-off-by: Adam Tackett <[email protected]>

* dashboard re-direct to integration for otel

Signed-off-by: Adam Tackett <[email protected]>

* correct naming and icon for three cases

Signed-off-by: Adam Tackett <[email protected]>

* updates to jsons and ndjsons

Signed-off-by: Adam Tackett <[email protected]>

* remove dashboard creation from the create assets call

Signed-off-by: Adam Tackett <[email protected]>

* update name to Self Managed

Signed-off-by: Adam Tackett <[email protected]>

* Remove hyperlink from discover

Signed-off-by: Adam Tackett <[email protected]>

* address comments

Signed-off-by: Adam Tackett <[email protected]>

---------

Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: Adam Tackett <[email protected]>
(cherry picked from commit f68eba1)
TackAdam added a commit that referenced this pull request Oct 12, 2024
* UI pass updating everything

Signed-off-by: Adam Tackett <[email protected]>

* dashboard re-direct to integration for otel

Signed-off-by: Adam Tackett <[email protected]>

* correct naming and icon for three cases

Signed-off-by: Adam Tackett <[email protected]>

* updates to jsons and ndjsons

Signed-off-by: Adam Tackett <[email protected]>

* remove dashboard creation from the create assets call

Signed-off-by: Adam Tackett <[email protected]>

* update name to Self Managed

Signed-off-by: Adam Tackett <[email protected]>

* Remove hyperlink from discover

Signed-off-by: Adam Tackett <[email protected]>

* address comments

Signed-off-by: Adam Tackett <[email protected]>

---------

Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: Adam Tackett <[email protected]>
(cherry picked from commit f68eba1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants