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

Set dashboard container functions and fix license headers #4540

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add TODOs from PR
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
  • Loading branch information
kavilla committed Jul 11, 2023
commit 1a01b223611acaa34dfb6cd1f4828d60aa5f0ff4
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ export const DashboardListing = () => {
[history, application]
);

// TODO: Currently, dashboard listing is using a href to view items.
// Dashboard listing should utilize a callback to take us away from using a href in favor
// of using onClick.
//
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3365
//
// const viewItem = useCallback(
// ({ appId, viewUrl }: any) => {
// if (appId === 'dashboard') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,18 @@ export const createDashboardGlobalAndAppState = ({
...state,
});
} else {
// TODO: This logic was ported over this but can be handled more gracefully and intentionally
// Sync from state url should be refactored within this application. The app is syncing from
// the query state and the dashboard in different locations which can be handled better.
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3365
//
// Do nothing in case when state from url is empty,
// this fixes: https://github.com/elastic/kibana/issues/57789
// There are not much cases when state in url could become empty:
// 1. User manually removed `_a` from the url
// 2. Browser is navigating away from the page and most likely there is no `_a` in the url.
// In this case we don't want to do any state updates
// and just allow $scope.$on('destroy') fire later and clean up everything
// and just unmount later and clean up everything
}
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export const useSavedDashboardInstance = ({
history.replace(DashboardConstants.LANDING_PAGE_PATH);
};

// TODO: handle try/catch as expected workflows instead of catching as an error
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3365
const getSavedDashboardInstance = async () => {
try {
let dashboardInstance: {
Expand Down