Skip to content

Commit ed4e671

Browse files
committed
[app] Add hasDivider prop for PageContentSection
The PageContentSection component has now a "hasDivider" property to explicit enable and disable the Divider component. This allows us to also show an diver when no toolbar is set. Before this the divider was only enabled when also a toolbar was provided.
1 parent 5d0a42a commit ed4e671

File tree

41 files changed

+50
-25
lines changed

Some content is hidden

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

41 files changed

+50
-25
lines changed

CHANGELOG.md

+1

plugins/app/public/browserconfig.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<browserconfig><msapplication><tile><square70x70logo src="ms-icon-70x70.png"/><square150x150logo src="ms-icon-150x150.png"/><square310x310logo src="ms-icon-310x310.png"/><TileColor>#0066cc</TileColor></tile></msapplication></browserconfig>
2+
<browserconfig><msapplication><tile><square70x70logo src="ms-icon-70x70.png"/><square150x150logo src="ms-icon-150x150.png"/><square310x310logo src="ms-icon-310x310.png"/><TileColor>#000000</TileColor></tile></msapplication></browserconfig>

plugins/app/public/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
2424

25-
<meta name="theme-color" content="#0066cc" />
26-
<meta name="msapplication-TileColor" content="#0066cc" />
25+
<meta name="theme-color" content="#000000" />
26+
<meta name="msapplication-TileColor" content="#000000" />
2727
<meta name="msapplication-TileImage" content="%PUBLIC_URL%/ms-icon-144x144.png" />
2828

2929
<title>kobs</title>

plugins/app/public/manifest.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@
3838
"type": "image/png",
3939
"density": "4.0"
4040
}
41-
]
41+
],
42+
"start_url": ".",
43+
"display": "standalone",
44+
"theme_color": "#000000",
45+
"background_color": "#ffffff"
4246
}

plugins/app/src/components/applications/Application.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const Application: React.FunctionComponent = () => {
104104
}
105105
/>
106106

107-
<PageContentSection hasPadding={false} toolbarContent={undefined} panelContent={details}>
107+
<PageContentSection hasPadding={false} hasDivider={false} toolbarContent={undefined} panelContent={details}>
108108
{data.dashboards ? (
109109
<DashboardsWrapper manifest={data} references={data.dashboards} setDetails={setDetails} />
110110
) : (

plugins/app/src/components/applications/Applications.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const Applications: React.FunctionComponent = () => {
4545

4646
<PageContentSection
4747
hasPadding={true}
48+
hasDivider={true}
4849
toolbarContent={options ? <ApplicationsToolbar options={options} setOptions={changeOptions} /> : undefined}
4950
panelContent={
5051
selectedApplication ? (

plugins/app/src/components/dashboards/DashboardPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const DashboardPage: React.FunctionComponent = () => {
9797
}
9898
/>
9999

100-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
100+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
101101
<Dashboard dashboard={data} forceDefaultSpan={false} setDetails={setDetails} />
102102
</PageContentSection>
103103
</React.Fragment>

plugins/app/src/components/plugins/PluginInstances.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const PluginInstances: React.FunctionComponent = () => {
4949

5050
<PageContentSection
5151
hasPadding={true}
52+
hasDivider={true}
5253
toolbarContent={
5354
<Toolbar usePageInsets={true}>
5455
<ToolbarItem width="200px">

plugins/app/src/components/plugins/PluginPageLoading.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const PluginPageLoading: React.FunctionComponent = () => {
1111
<br />
1212
<Skeleton width="75%" fontSize="sm" screenreaderText="Loading description" />
1313
</PageSection>
14-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
14+
<PageContentSection hasPadding={true} hasDivider={false} toolbarContent={undefined} panelContent={undefined}>
1515
<p></p>
1616
</PageContentSection>
1717
</React.Fragment>

plugins/app/src/components/profile/Profile.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Profile: React.FunctionComponent = () => {
2323
<React.Fragment>
2424
<PageHeaderSection title={authContext.user.email} description="" />
2525

26-
<PageContentSection hasPadding={false} toolbarContent={undefined} panelContent={details}>
26+
<PageContentSection hasPadding={false} hasDivider={false} toolbarContent={undefined} panelContent={details}>
2727
<ProfileWrapper email={authContext.user.email} setDetails={setDetails} />
2828
</PageContentSection>
2929
</React.Fragment>

plugins/app/src/components/resources/Resources.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const Resources: React.FunctionComponent = () => {
4343

4444
<PageContentSection
4545
hasPadding={true}
46+
hasDivider={true}
4647
toolbarContent={options ? <ResourcesToolbar options={options} setOptions={changeOptions} /> : undefined}
4748
panelContent={details ? details : undefined}
4849
>

plugins/app/src/components/settings/Settings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Settings: React.FunctionComponent = () => {
1010
description="The settings for you hub and all the satellites. You can also view the resources, which are available via each satellite."
1111
/>
1212

13-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
13+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
1414
<div>TODO: Show settings</div>
1515
</PageContentSection>
1616
</React.Fragment>

plugins/app/src/components/teams/Team.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const Team: React.FunctionComponent = () => {
108108
}
109109
/>
110110

111-
<PageContentSection hasPadding={false} toolbarContent={undefined} panelContent={details}>
111+
<PageContentSection hasPadding={false} hasDivider={false} toolbarContent={undefined} panelContent={details}>
112112
{data.dashboards ? (
113113
<DashboardsWrapper manifest={data} references={data.dashboards} setDetails={setDetails} />
114114
) : (

plugins/app/src/components/teams/Teams.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const Teams: React.FunctionComponent = () => {
5757

5858
<PageContentSection
5959
hasPadding={true}
60+
hasDivider={true}
6061
toolbarContent={
6162
<Toolbar usePageInsets={true}>
6263
<ToolbarItem>

plugins/app/src/components/topology/Applications.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const Applications: React.FunctionComponent = () => {
4343

4444
<PageContentSection
4545
hasPadding={true}
46+
hasDivider={true}
4647
toolbarContent={options ? <ApplicationsToolbar options={options} setOptions={changeOptions} /> : undefined}
4748
panelContent={details}
4849
>

plugins/plugin-azure/src/components/containerinstances/Page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const ContainerInstancesPage: React.FunctionComponent<IContainerInstancesPagePro
2929
}
3030
/>
3131

32-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
32+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
3333
<ContainerGroups instance={instance} resourceGroups={resourceGroups} setDetails={setDetails} />
3434
</PageContentSection>
3535
</React.Fragment>

plugins/plugin-azure/src/components/costmanagement/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const CostManagementPage: React.FunctionComponent<ICostManagementPageProps> = ({
5252

5353
<PageContentSection
5454
hasPadding={true}
55+
hasDivider={true}
5556
toolbarContent={
5657
<CostManagementToolbar resourceGroups={resourceGroups} options={options} setOptions={changeOptions} />
5758
}

plugins/plugin-azure/src/components/kubernetesservices/Page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const KubernetesServicesPage: React.FunctionComponent<IKubernetesServicesPagePro
2929
}
3030
/>
3131

32-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
32+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
3333
<KubernetesServices instance={instance} resourceGroups={resourceGroups} setDetails={setDetails} />
3434
</PageContentSection>
3535
</React.Fragment>

plugins/plugin-azure/src/components/page/OverviewPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const OverviewPage: React.FunctionComponent<IOverviewPageProps> = ({ instance }:
2929
}
3030
/>
3131

32-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
32+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
3333
<Gallery hasGutter={true}>
3434
{Object.keys(services).map((service) => (
3535
<GalleryItem key={service}>

plugins/plugin-azure/src/components/virtualmachinescalesets/Page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const VirtualMachineScaleSetsPage: React.FunctionComponent<IVirtualMachineScaleS
2929
}
3030
/>
3131

32-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
32+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
3333
<VirtualMachineScaleSets instance={instance} resourceGroups={resourceGroups} setDetails={setDetails} />
3434
</PageContentSection>
3535
</React.Fragment>

plugins/plugin-elasticsearch/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
8080

8181
<PageContentSection
8282
hasPadding={true}
83+
hasDivider={true}
8384
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
8485
panelContent={undefined}
8586
>

plugins/plugin-flux/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
4545

4646
<PageContentSection
4747
hasPadding={true}
48+
hasDivider={true}
4849
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
4950
panelContent={details}
5051
>

plugins/plugin-grafana/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
4141

4242
<PageContentSection
4343
hasPadding={true}
44+
hasDivider={true}
4445
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
4546
panelContent={undefined}
4647
>

plugins/plugin-harbor/src/components/page/ArtifactsPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const ArtifactsPage: React.FunctionComponent<IArtifactsPageProps> = ({ instance
9999

100100
<PageContentSection
101101
hasPadding={true}
102+
hasDivider={true}
102103
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
103104
panelContent={details}
104105
>

plugins/plugin-harbor/src/components/page/ProjectsPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const ProjectsPage: React.FunctionComponent<IProjectsPageProps> = ({ instance }:
8989
}
9090
/>
9191

92-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
92+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
9393
{isLoading ? (
9494
<div className="pf-u-text-align-center">
9595
<Spinner />

plugins/plugin-harbor/src/components/page/RepositoriesPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const RepositoriesPage: React.FunctionComponent<IRepositoriesPageProps> = ({ ins
9797

9898
<PageContentSection
9999
hasPadding={true}
100+
hasDivider={true}
100101
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
101102
panelContent={undefined}
102103
>

plugins/plugin-helm/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
5050

5151
<PageContentSection
5252
hasPadding={true}
53+
hasDivider={true}
5354
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
5455
panelContent={details}
5556
>

plugins/plugin-istio/src/components/page/Application.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const Application: React.FunctionComponent<IApplicationProps> = ({ instance }: I
7474

7575
<PageContentSection
7676
hasPadding={true}
77+
hasDivider={true}
7778
toolbarContent={<ApplicationToolbar options={options} setOptions={changeOptions} />}
7879
panelContent={details}
7980
>

plugins/plugin-istio/src/components/page/Applications.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const Applications: React.FunctionComponent<IApplicationsProps> = ({ instance }:
5858

5959
<PageContentSection
6060
hasPadding={true}
61+
hasDivider={true}
6162
toolbarContent={<ApplicationsToolbar instance={instance} options={options} setOptions={changeOptions} />}
6263
panelContent={undefined}
6364
>

plugins/plugin-jaeger/src/components/page/Traces.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const Traces: React.FunctionComponent<ITracesProps> = ({ instance }: ITracesProp
5454

5555
<PageContentSection
5656
hasPadding={true}
57+
hasDivider={true}
5758
toolbarContent={<TracesToolbar instance={instance} options={options} setOptions={changeOptions} />}
5859
panelContent={details}
5960
>

plugins/plugin-kiali/src/components/page/Page.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
4747
}
4848
/>
4949
<PageContentSection
50-
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
5150
hasPadding={true}
51+
hasDivider={true}
52+
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
5253
panelContent={details}
5354
>
5455
{options.namespaces && options.namespaces.length > 0 ? (

plugins/plugin-klogs/src/components/page/AggregationPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const AggregationPage: React.FunctionComponent<IAggregationPageProps> = ({ insta
6060

6161
<PageContentSection
6262
hasPadding={true}
63+
hasDivider={true}
6364
toolbarContent={<AggregationToolbar options={tmpOptions} setOptions={setTmpOptions} />}
6465
panelContent={undefined}
6566
>

plugins/plugin-klogs/src/components/page/LogsPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const LogsPage: React.FunctionComponent<ILogsPageProps> = ({ instance }: ILogsPa
106106

107107
<PageContentSection
108108
hasPadding={true}
109+
hasDivider={true}
109110
toolbarContent={<LogsToolbar options={options} setOptions={changeOptions} />}
110111
panelContent={undefined}
111112
>

plugins/plugin-opsgenie/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
4848

4949
<PageContentSection
5050
hasPadding={true}
51+
hasDivider={true}
5152
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
5253
panelContent={details}
5354
>

plugins/plugin-prometheus/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
4747

4848
<PageContentSection
4949
hasPadding={true}
50+
hasDivider={true}
5051
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
5152
panelContent={undefined}
5253
>

plugins/plugin-rss/src/components/page/Page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
1616
}
1717
/>
1818

19-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
19+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
2020
<div></div>
2121
</PageContentSection>
2222
</React.Fragment>

plugins/plugin-sonarqube/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
9292

9393
<PageContentSection
9494
hasPadding={true}
95+
hasDivider={true}
9596
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
9697
panelContent={undefined}
9798
>

plugins/plugin-sql/src/components/page/Page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
4141

4242
<PageContentSection
4343
hasPadding={true}
44+
hasDivider={true}
4445
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
4546
panelContent={undefined}
4647
>

plugins/plugin-techdocs/src/components/page/ServicePage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const ServicePage: React.FunctionComponent<IServicePageProps> = ({ instance }: I
9494
component={<PluginPageTitle satellite={data.key} name={data.name} description={data.description} />}
9595
/>
9696

97-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
97+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
9898
<ServicePageWrapper
9999
instance={instance}
100100
index={data}

plugins/plugin-techdocs/src/components/page/TechDocsPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const TechDocsPage: React.FunctionComponent<ITechDocsPageProps> = ({ instance }:
2222
}
2323
/>
2424

25-
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
25+
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
2626
<Card>
2727
<TechDocsList instance={instance} />
2828
</Card>

plugins/shared/src/components/misc/PageContentSection.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,24 @@ import React from 'react';
33

44
interface IPageContentSectionProps {
55
hasPadding: boolean;
6+
hasDivider: boolean;
67
panelContent: React.ReactNode;
78
toolbarContent: React.ReactNode;
89
children: React.ReactElement;
910
}
1011

1112
export const PageContentSection: React.FunctionComponent<IPageContentSectionProps> = ({
1213
hasPadding,
14+
hasDivider,
1315
panelContent,
1416
toolbarContent,
1517
children,
1618
}: IPageContentSectionProps) => {
1719
return (
1820
<PageSection isFilled={true} padding={{ default: 'noPadding' }}>
1921
<Drawer isExpanded={panelContent !== undefined}>
20-
{toolbarContent && (
21-
<DrawerSection>
22-
{toolbarContent}
23-
<Divider component="div" />
24-
</DrawerSection>
25-
)}
22+
{toolbarContent && <DrawerSection>{toolbarContent}</DrawerSection>}
23+
{hasDivider && <Divider component="div" />}
2624
<DrawerContent className="pf-m-no-background" panelContent={panelContent}>
2725
<DrawerContentBody hasPadding={hasPadding}>{children}</DrawerContentBody>
2826
</DrawerContent>

0 commit comments

Comments
 (0)