From c6eda91a5f3251624ca78c6c6d2a004819c55f4a Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Mon, 23 Jul 2018 16:09:51 -0700 Subject: [PATCH] fix centered dashboard listing --- .../dashboard_listing.test.js.snap | 29 +++++++------------ .../dashboard/listing/dashboard_listing.js | 5 ++-- .../kibana/public/dashboard/styles/index.less | 11 ++++++- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/core_plugins/kibana/public/dashboard/listing/__snapshots__/dashboard_listing.test.js.snap b/src/core_plugins/kibana/public/dashboard/listing/__snapshots__/dashboard_listing.test.js.snap index 0d01cb7ebd034..932d4e8ecc676 100644 --- a/src/core_plugins/kibana/public/dashboard/listing/__snapshots__/dashboard_listing.test.js.snap +++ b/src/core_plugins/kibana/public/dashboard/listing/__snapshots__/dashboard_listing.test.js.snap @@ -6,10 +6,9 @@ exports[`after fetch hideWriteControls 1`] = ` data-test-subj="dashboardLandingPage" restrictWidth={false} > - + @@ -36,10 +35,9 @@ exports[`after fetch initialFilter 1`] = ` data-test-subj="dashboardLandingPage" restrictWidth={false} > - + @@ -188,10 +186,9 @@ exports[`after fetch renders call to action when no dashboards exist 1`] = ` data-test-subj="dashboardLandingPage" restrictWidth={false} > - + @@ -248,10 +245,9 @@ exports[`after fetch renders table rows 1`] = ` data-test-subj="dashboardLandingPage" restrictWidth={false} > - + @@ -400,10 +396,9 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = ` data-test-subj="dashboardLandingPage" restrictWidth={false} > - + @@ -583,8 +578,6 @@ exports[`renders empty page in before initial fetch to avoid flickering 1`] = ` data-test-subj="dashboardLandingPage" restrictWidth={false} > - + `; diff --git a/src/core_plugins/kibana/public/dashboard/listing/dashboard_listing.js b/src/core_plugins/kibana/public/dashboard/listing/dashboard_listing.js index e1a077c995c99..6c9e454febf1e 100644 --- a/src/core_plugins/kibana/public/dashboard/listing/dashboard_listing.js +++ b/src/core_plugins/kibana/public/dashboard/listing/dashboard_listing.js @@ -454,7 +454,7 @@ export class DashboardListing extends React.Component { } return ( - + {this.renderListingOrEmptyState()} ); @@ -463,7 +463,8 @@ export class DashboardListing extends React.Component { render() { return ( - + {/* TODO: add restrictWidth prop on EuiPageBody here when EUI@3.0.2 is applied */} + {this.renderPageContent()} diff --git a/src/core_plugins/kibana/public/dashboard/styles/index.less b/src/core_plugins/kibana/public/dashboard/styles/index.less index ea7b5b3c3bf88..ca1359dc35003 100644 --- a/src/core_plugins/kibana/public/dashboard/styles/index.less +++ b/src/core_plugins/kibana/public/dashboard/styles/index.less @@ -434,7 +434,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 EUI@3.0.2 is merged +}