Skip to content

Commit

Permalink
[6.4] Fix centered dashboard listing (#21119) (#21427)
Browse files Browse the repository at this point in the history
* Fix centered dashboard listing (#21119)
  • Loading branch information
snide authored Jul 31, 2018
1 parent fbdbbc6 commit 8af2540
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ exports[`after fetch hideWriteControls 1`] = `
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
restrictWidth={false}
>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -37,9 +38,10 @@ exports[`after fetch initialFilter 1`] = `
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
restrictWidth={false}
>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -189,9 +191,10 @@ exports[`after fetch renders call to action when no dashboards exist 1`] = `
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
restrictWidth={false}
>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -249,9 +252,10 @@ exports[`after fetch renders table rows 1`] = `
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
restrictWidth={false}
>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -401,9 +405,10 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
restrictWidth={false}
>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -584,7 +589,7 @@ exports[`renders empty page in before initial fetch to avoid flickering 1`] = `
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
restrictWidth={false}
/>
</EuiPage>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export class DashboardListing extends React.Component {
}

return (
<EuiPageContent horizontalPosition="center">
<EuiPageContent className="dashboardLandingPageContent" horizontalPosition="center">
{this.renderListingOrEmptyState()}
</EuiPageContent>
);
Expand All @@ -463,7 +463,8 @@ export class DashboardListing extends React.Component {
render() {
return (
<EuiPage data-test-subj="dashboardLandingPage" className="dashboardLandingPage">
<EuiPageBody restrictWidth>
{/* TODO: add restrictWidth prop on EuiPageBody here when [email protected] is applied */}
<EuiPageBody>
{this.renderPageContent()}
</EuiPageBody>
</EuiPage>
Expand Down
11 changes: 10 additions & 1 deletion src/core_plugins/kibana/public/dashboard/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,16 @@ dashboard-viewport-provider {
}
}

.dashboardLandingPage {
// Mimics EuiPageBackground
dashboard-listing {
background-color: @globalColorLightestGray;
min-height: 100vh;
}

.dashboardLandingPage {
background: @globalColorLightestGray;
}

.dashboardLandingPageContent {
max-width: 1000px !important; // Temp fix till [email protected] is merged
}

0 comments on commit 8af2540

Please sign in to comment.