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

Modularize and cleanup panel #603

Merged

Conversation

eugenesk24
Copy link
Contributor

Description

  • Clean up breadcrumbs
  • Remove switchToEditViz becuase it is called in home
  • Add onEditClick prop that takes the function to call when edit visualization is clicked
  • Make add visualization popover a component
  • Change button text to sentence case for event analytics to match rest of Observability
  • Add cypress tests to check
    • App panels don't show up in Operational Panels table
    • App visualizations don't show up in Event Analytics table
    • App visualizations don't show up in add existing visualization flyout in Operational Panels
    • Show all visualizations of this application in availability configuration
    • Empty panel view has working add button in Operational Panels
    • Empty panel view has working add button in App Analytics

Issues Resolved

[List any issues this PR will resolve]

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.

Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2022

Codecov Report

Merging #603 (b1a264f) into main (84e56a2) will increase coverage by 0.14%.
The diff coverage is 35.41%.

@@             Coverage Diff              @@
##               main     #603      +/-   ##
============================================
+ Coverage     54.54%   54.69%   +0.14%     
  Complexity      283      283              
============================================
  Files           239      240       +1     
  Lines          7795     7780      -15     
  Branches       1605     1597       -8     
============================================
+ Hits           4252     4255       +3     
+ Misses         3371     3354      -17     
+ Partials        172      171       -1     
Flag Coverage Δ
dashboards-observability 46.30% <35.41%> (+0.17%) ⬆️
opensearch-observability 76.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...isualization_container/visualization_container.tsx 2.27% <0.00%> (+0.14%) ⬆️
...ks/components/paragraph_components/para_output.tsx 86.11% <0.00%> (-2.47%) ⬇️
...lic/components/custom_panels/custom_panel_view.tsx 0.53% <5.55%> (+0.05%) ⬆️
...ustom_panels/helpers/add_visualization_popover.tsx 50.00% <50.00%> (ø)
...ules/visualization_flyout/visualization_flyout.tsx 42.55% <66.66%> (+0.61%) ⬆️
...onents/custom_panels/panel_modules/empty_panel.tsx 100.00% <100.00%> (+26.66%) ⬆️
...tom_panels/panel_modules/panel_grid/panel_grid.tsx 66.66% <100.00%> (-0.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84e56a2...b1a264f. Read the comment docs.

@eugenesk24 eugenesk24 marked this pull request as ready for review March 23, 2022 22:28
@eugenesk24 eugenesk24 requested a review from a team as a code owner March 23, 2022 22:28
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
spanQueryOnePartThree,
spanQueryTwoPartOne,
spanQueryTwoPartTwo,
spanQueryTwoPartThree,
Copy link
Member

Choose a reason for hiding this comment

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

np but might be better to loop over array, also why does this need to be split into 3 parts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was finding that cypress would mistype it if it was just one long string, if I split it up and start at the parts where it was missing it works. 🦺

Copy link
Member

Choose a reason for hiding this comment

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

i see, this is ok but you can also just pass the whole string and use a separate function to split by fixed length and feed to cypress.type()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea the only problem is cypress would repeatedly miss certain characters so I had to split the string at those places not at a fixed length

cy.get('.euiTab').contains('Panel').click();
cy.wait(delay);
cy.get('[aria-label="actionMenuButton"]').click();
cy.get('.euiContextMenuItem').contains('Edit').click();
supressResizeObserverIssue();
cy.wait(delay);
cy.get('[data-test-subj="superDatePickerShowDatesButton"]').should('contain', 'Last 24 hours');
cy.get('[data-test-subj="superDatePickerShowDatesButton"]').should('contain', 'Last 24 months');
Copy link
Member

Choose a reason for hiding this comment

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

will this test work when it's 2024?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The year 2024??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do the sample logs not get updated every time the cypress tests run??

Copy link
Member

Choose a reason for hiding this comment

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

if it's using dashboards sample data then should be ok, if using the trace data then no

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the tests with time range changes are using dashboards sample data with logs so I think it should be okay.

@eugenesk24 eugenesk24 merged commit fbab17e into opensearch-project:main Mar 31, 2022
@eugenesk24 eugenesk24 deleted the modularize-and-cleanup-panel branch March 31, 2022 17:33
eugenesk24 added a commit to eugenesk24/trace-analytics that referenced this pull request Jun 6, 2022
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants