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

[Dashboard De-Angular] Fix remaining functional test #4496

Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
);
}
}
}, [appState?.getState(), savedDashboardInstance, chrome]);

Check failure on line 77 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

React Hook useEffect has missing dependencies: 'appState' and 'dashboard'. Either include them or remove the dependency array

Check failure on line 77 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked

Check failure on line 77 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

React Hook useEffect has missing dependencies: 'appState' and 'dashboard'. Either include them or remove the dependency array

Check failure on line 77 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked

useEffect(() => {
// clean up all registered listeners if any is left
Expand All @@ -83,16 +83,16 @@
};
}, [eventEmitter]);

console.log('savedDashboardInstance', savedDashboardInstance);

Check failure on line 86 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 86 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
console.log('dashboard', dashboard);

Check failure on line 87 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 87 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
console.log('appState', appState);

Check failure on line 88 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 88 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
console.log('appStateData', appState?.getState());

Check failure on line 89 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 89 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
console.log('currentAppState', currentAppState);

Check failure on line 90 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 90 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
console.log('isEmbeddableRendered', isEmbeddableRendered);

Check failure on line 91 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 91 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
if (dashboard) {
console.log('isDirty', dashboard.isDirty);

Check failure on line 93 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 93 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
}
console.log('dashboardContainer', dashboardContainer);

Check failure on line 95 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux

Unexpected console statement

Check failure on line 95 in src/plugins/dashboard/public/application/components/dashboard_editor.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Windows

Unexpected console statement
console.log('indexPatterns', indexPatterns);

return (
Expand All @@ -112,6 +112,7 @@
isEmbeddableRendered={isEmbeddableRendered}
indexPatterns={indexPatterns}
dashboardContainer={dashboardContainer}
dashboardIdFromUrl={dashboardIdFromUrl}
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface DashboardTopNavProps {
isEmbeddableRendered: boolean;
indexPatterns: IndexPattern[];
dashboardContainer?: DashboardContainer;
dashboardIdFromUrl?: string;
}

export enum UrlParams {
Expand All @@ -42,6 +43,7 @@ const TopNav = ({
isEmbeddableRendered,
dashboardContainer,
indexPatterns,
dashboardIdFromUrl,
}: DashboardTopNavProps) => {
const [topNavMenu, setTopNavMenu] = useState<any>();
const [isFullScreenMode, setIsFullScreenMode] = useState<any>();
Expand Down Expand Up @@ -80,6 +82,7 @@ const TopNav = ({
savedDashboardInstance,
services,
dashboard,
dashboardIdFromUrl,
dashboardContainer
);
setTopNavMenu(
Expand All @@ -99,6 +102,7 @@ const TopNav = ({
stateContainer,
isEmbeddableRendered,
dashboard,
dashboardIdFromUrl
]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@

&:hover,
&:focus {
background-color: $embEditingModeHoverColor;
// TODO: this is a sass error, $embEditingModeHoverColor is undefined, comment it out for now
//background-color: $embEditingModeHoverColor;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import 'react-grid-layout/css/styles.css';
import 'react-resizable/css/styles.css';
import './_dashboard_grid.scss'

// @ts-ignore
import sizeMe from 'react-sizeme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export function saveDashboard(

updateSavedDashboard(savedDashboard, appState, timeFilter, dashboard);

// TODO: should update Dashboard class in the if(id) block
return savedDashboard.save(saveOptions).then((id: string) => {
if (id) {
return id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
savedDashboard: any,
services: DashboardServices,
dashboard: Dashboard,
dashboardIdFromUrl?: string,
dashboardContainer?: DashboardContainer
) => {
const {
Expand Down Expand Up @@ -390,7 +391,11 @@
'data-test-subj': 'saveDashboardSuccess',
});

chrome.docTitle.change(savedDashboard.lastSavedTitle);
if (id !== dashboardIdFromUrl) {
history.replace(createDashboardEditUrl(id));

Check warning on line 395 in src/plugins/dashboard/public/application/utils/get_nav_actions.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/dashboard/public/application/utils/get_nav_actions.tsx#L395

Added line #L395 was not covered by tests
}

chrome.docTitle.change(savedDashboard.title);

Check warning on line 398 in src/plugins/dashboard/public/application/utils/get_nav_actions.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/dashboard/public/application/utils/get_nav_actions.tsx#L398

Added line #L398 was not covered by tests
stateContainer.transitions.set('viewMode', ViewMode.VIEW);
}
return { id };
Expand Down
Loading