Skip to content

Commit f3917c2

Browse files
committed
Redesigns home page
Adds auto scroll to advanced setting provided in the URL hash Registered plugins to feature catalogue to be displayed on home page Rearrange add data section Fix solution panel conditional rendering Removed extraneous import Remmoved environment update from observability plugin Registrered features to feature catalog for ingest manager, ml, and index lifecycle management Fixed import Added max width to Kibana solution card Fixed feature id Fixed enterprise search link Updated solutions logos Fixed beta label on ingest manager card Fixed logos Cleaned up CSS Change home route redirects user to advanced settings Conditionally renders default route advanced setting link Restored app search logo Hides graph description on home page on basic license Style home page header and other misc design tweaks (#72481)
1 parent cc84ee3 commit f3917c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1184
-597
lines changed

src/plugins/advanced_settings/kibana.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"version": "kibana",
44
"server": true,
55
"ui": true,
6-
"requiredPlugins": ["management"],
6+
"requiredPlugins": ["management", "home"],
77
"requiredBundles": ["kibanaReact"]
88
}

src/plugins/advanced_settings/public/management_app/advanced_settings.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ export class AdvancedSettingsComponent extends Component<
114114
filteredSettings: this.mapSettings(Query.execute(query, this.settings)),
115115
});
116116
});
117+
118+
// scrolls to setting provided in the URL hash
119+
const { hash } = window.location;
120+
if (hash !== '') {
121+
setTimeout(() => {
122+
const id = hash.replace('#', '');
123+
const element = document.getElementById(id);
124+
if (element) {
125+
element.scrollIntoView();
126+
window.scrollBy(0, -48); // offsets scroll by height of the global nav
127+
}
128+
}, 0);
129+
}
117130
}
118131

119132
componentWillUnmount() {

src/plugins/advanced_settings/public/management_app/components/field/field.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ export class Field extends PureComponent<FieldProps> {
671671

672672
return (
673673
<EuiDescribedFormGroup
674+
id={id}
674675
className={className}
675676
title={this.renderTitle(setting)}
676677
description={this.renderDescription(setting)}

src/plugins/advanced_settings/public/plugin.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { i18n } from '@kbn/i18n';
2020
import { CoreSetup, Plugin } from 'kibana/public';
21+
import { FeatureCatalogueCategory } from '../../home/public';
2122
import { ComponentRegistry } from './component_registry';
2223
import { AdvancedSettingsSetup, AdvancedSettingsStart, AdvancedSettingsPluginSetup } from './types';
2324

@@ -29,7 +30,7 @@ const title = i18n.translate('advancedSettings.advancedSettingsLabel', {
2930

3031
export class AdvancedSettingsPlugin
3132
implements Plugin<AdvancedSettingsSetup, AdvancedSettingsStart, AdvancedSettingsPluginSetup> {
32-
public setup(core: CoreSetup, { management }: AdvancedSettingsPluginSetup) {
33+
public setup(core: CoreSetup, { management, home }: AdvancedSettingsPluginSetup) {
3334
const kibanaSection = management.sections.section.kibana;
3435

3536
kibanaSection.registerApp({
@@ -44,6 +45,20 @@ export class AdvancedSettingsPlugin
4445
},
4546
});
4647

48+
if (home) {
49+
home.featureCatalogue.register({
50+
id: 'advanced_settings',
51+
title,
52+
description: i18n.translate('xpack.advancedSettings.featureCatalogueTitle', {
53+
defaultMessage: 'Customize your Kibana experience',
54+
}),
55+
icon: 'gear', // TODO: Do we want to use this icon here?
56+
path: '/app/management/kibana/settings',
57+
showOnHomePage: true,
58+
category: FeatureCatalogueCategory.ADMIN,
59+
});
60+
}
61+
4762
return {
4863
component: component.setup,
4964
};

src/plugins/advanced_settings/public/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919

2020
import { ComponentRegistry } from './component_registry';
21+
import { HomePublicPluginSetup } from '../../home/public';
22+
2123
import { ManagementSetup } from '../../management/public';
2224

2325
export interface AdvancedSettingsSetup {
@@ -29,6 +31,7 @@ export interface AdvancedSettingsStart {
2931

3032
export interface AdvancedSettingsPluginSetup {
3133
management: ManagementSetup;
34+
home?: HomePublicPluginSetup;
3235
}
3336

3437
export { ComponentRegistry };
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export const PLUGIN_ID = 'home';
21+
export const HOME_APP_BASE_PATH = `/app/${PLUGIN_ID}`;
Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,8 @@
1-
.homAddData__card {
2-
border: none;
3-
box-shadow: none;
4-
}
5-
6-
.homAddData__cardDivider {
7-
position: relative;
8-
9-
&:after {
10-
position: absolute;
11-
content: '';
12-
width: 1px;
13-
right: -$euiSizeS;
14-
top: 0;
15-
bottom: 0;
16-
background: $euiBorderColor;
17-
}
18-
}
19-
20-
.homAddData__icon {
21-
width: $euiSizeXL * 2;
22-
height: $euiSizeXL * 2;
23-
}
24-
25-
.homAddData__footerItem--highlight {
26-
background-color: tintOrShade($euiColorPrimary, 90%, 70%);
27-
padding: $euiSize;
28-
}
29-
30-
.homAddData__footerItem {
1+
.homAddData__image {
312
text-align: center;
32-
}
33-
34-
.homAddData__logo {
35-
margin-left: $euiSize;
36-
}
37-
38-
@include euiBreakpoint('xs', 's') {
39-
.homeAddData__flexGroup {
40-
flex-wrap: wrap;
41-
}
42-
}
43-
44-
@include euiBreakpoint('xs', 's', 'm') {
45-
.homAddDat__flexTablet {
46-
flex-direction: column;
47-
}
48-
49-
.homAddData__cardDivider:after {
50-
display: none;
51-
}
52-
53-
.homAddData__cardDivider {
54-
flex-grow: 0 !important;
55-
flex-basis: 100% !important;
56-
}
57-
}
583

59-
@include euiBreakpoint('l', 'xl') {
60-
.homeAddData__flexGroup {
61-
flex-wrap: nowrap;
4+
.euiImage__img {
5+
max-height: $euiSize * 16; // too tall if only two "Add data" features are enabled
6+
width: auto;
627
}
638
}

src/plugins/home/public/application/components/_home.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
// Local page vars
2+
$homePageHeaderHeight: $euiSize * 8;
3+
$homePageWidth: 1200px;
4+
5+
.homPageHeader {
6+
height: $homePageHeaderHeight;
7+
margin: 0 auto;
8+
max-width: $homePageWidth;
9+
padding: $euiSizeXL $euiSize 0;
10+
}
11+
12+
.homPageContainer {
13+
min-height: calc(100vh - #{$homePageHeaderHeight});
14+
background-color: $euiColorEmptyShade;
15+
border-top: 1px solid $euiColorLightShade;
16+
}
17+
18+
.homPage {
19+
display: flex;
20+
max-width: $homePageWidth;
21+
margin: 0 auto;
22+
padding: 0 $euiSize $euiSizeXL;
23+
background-color: transparent;
24+
}
25+
26+
.homHome__synopsisItem {
27+
max-width: 50%;
28+
}
29+
130
@include euiBreakpoint('xs', 's', 'm') {
231
.homHome__synopsisItem {
332
flex-basis: 100% !important;

src/plugins/home/public/application/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@import 'add_data';
99
@import 'home';
1010
@import 'sample_data_set_cards';
11+
@import 'solutions_panel';
1112
@import 'synopsis';
1213
@import 'welcome';
1314

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
.homSolutionsPanel {
2+
margin-top: -$euiSizeXL;
3+
min-height: $euiSize*16;
4+
display: flex;
5+
6+
.homSolutionsPanel--restrictHalfWidth {
7+
max-width: 50%;
8+
}
9+
10+
.homSolutionsPanel__solutionPanel {
11+
display: flex;
12+
align-items: stretch;
13+
14+
.homSolutionsPanel__solutionTitle {
15+
padding: $euiSize;
16+
17+
.euiToken {
18+
padding: $euiSizeS;
19+
}
20+
}
21+
22+
.homSolutionsPanel__CTA {
23+
height: 100%;
24+
display: flex;
25+
flex-direction: column;
26+
justify-content: center;
27+
padding: $euiSize;
28+
}
29+
}
30+
31+
.homSolutionsPanel__header {
32+
border-radius: $euiBorderRadius 0 0 $euiBorderRadius;
33+
color: $euiColorEmptyShade;
34+
35+
img {
36+
position: absolute;
37+
width: auto;
38+
}
39+
}
40+
41+
.homSolutionsPanel__enterpriseSearch {
42+
.homSolutionsPanel__enterpriseSearchHeader {
43+
background-color: #017d73;
44+
45+
.homSolutionsPanel__enterpriseSearchTopLeftImage img {
46+
top: $euiSizeS;
47+
left: 0;
48+
height: $euiSizeXL;
49+
}
50+
51+
.homSolutionsPanel__enterpriseSearchBottomRightImage img {
52+
right: $euiSizeS;
53+
bottom: $euiSizeS;
54+
height: $euiSizeXL;
55+
}
56+
}
57+
}
58+
59+
.homSolutionsPanel__observability {
60+
.homSolutionsPanel__observabilityHeader {
61+
background-color: #c42373;
62+
63+
.homSolutionsPanel__observabilityTopRightImage img {
64+
top: $euiSizeS;
65+
right: $euiSizeS;
66+
height: $euiSizeXL;
67+
}
68+
}
69+
}
70+
71+
.homSolutionsPanel__securitySolution {
72+
.homSolutionsPanel__securitySolutionHeader {
73+
background-color: #343741;
74+
75+
.homSolutionsPanel__securitySolutionTopLeftImage img {
76+
top: $euiSizeS;
77+
left: $euiSizeS;
78+
height: $euiSizeXXL;
79+
}
80+
}
81+
}
82+
83+
.homSolutionsPanel__kibana {
84+
.homSolutionsPanel__kibanaHeader {
85+
background-color: #006bb4;
86+
87+
.homSolutionsPanel__kibanaTopLeftImage img {
88+
top: 0;
89+
left: 0;
90+
height: $euiSizeXXL * 4;
91+
}
92+
93+
.homSolutionsPanel__kibanaBottomRightImage img {
94+
right: 0;
95+
bottom: 0;
96+
height: $euiSizeXXL * 4;
97+
}
98+
}
99+
}
100+
}

0 commit comments

Comments
 (0)