Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan
- [#367](https://github.com/kobsio/kobs/pull/#367): [app] Change filtering for select components, by using `item.includes(value)`.
- [#369](https://github.com/kobsio/kobs/pull/#369): [app] Add `insights` panel, to display the insights of an application within a dashboard.
- [#370](https://github.com/kobsio/kobs/pull/#370): [app] Change toolbar handling by replacing the Patternfly `Toolbar` and `ToolbarItem` components with a custom `Toolbar` and `ToolbarItem` component.
- [#371](https://github.com/kobsio/kobs/pull/#371): [app] Change `hasDivider` property to `PageContentSection` component to explicit enable / disable the diver.

## [v0.8.0](https://github.com/kobsio/kobs/releases/tag/v0.8.0) (2022-03-24)

Expand Down
2 changes: 1 addition & 1 deletion plugins/app/public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<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>
<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>
4 changes: 2 additions & 2 deletions plugins/app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

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

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

<title>kobs</title>
Expand Down
6 changes: 5 additions & 1 deletion plugins/app/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@
"type": "image/png",
"density": "4.0"
}
]
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
2 changes: 1 addition & 1 deletion plugins/app/src/components/applications/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const Application: React.FunctionComponent = () => {
}
/>

<PageContentSection hasPadding={false} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={false} hasDivider={false} toolbarContent={undefined} panelContent={details}>
{data.dashboards ? (
<DashboardsWrapper manifest={data} references={data.dashboards} setDetails={setDetails} />
) : (
Expand Down
1 change: 1 addition & 0 deletions plugins/app/src/components/applications/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Applications: React.FunctionComponent = () => {

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={options ? <ApplicationsToolbar options={options} setOptions={changeOptions} /> : undefined}
panelContent={
selectedApplication ? (
Expand Down
2 changes: 1 addition & 1 deletion plugins/app/src/components/dashboards/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const DashboardPage: React.FunctionComponent = () => {
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
<Dashboard dashboard={data} forceDefaultSpan={false} setDetails={setDetails} />
</PageContentSection>
</React.Fragment>
Expand Down
1 change: 1 addition & 0 deletions plugins/app/src/components/plugins/PluginInstances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const PluginInstances: React.FunctionComponent = () => {

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={
<Toolbar usePageInsets={true}>
<ToolbarItem width="200px">
Expand Down
2 changes: 1 addition & 1 deletion plugins/app/src/components/plugins/PluginPageLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const PluginPageLoading: React.FunctionComponent = () => {
<br />
<Skeleton width="75%" fontSize="sm" screenreaderText="Loading description" />
</PageSection>
<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
<PageContentSection hasPadding={true} hasDivider={false} toolbarContent={undefined} panelContent={undefined}>
<p></p>
</PageContentSection>
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion plugins/app/src/components/profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Profile: React.FunctionComponent = () => {
<React.Fragment>
<PageHeaderSection title={authContext.user.email} description="" />

<PageContentSection hasPadding={false} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={false} hasDivider={false} toolbarContent={undefined} panelContent={details}>
<ProfileWrapper email={authContext.user.email} setDetails={setDetails} />
</PageContentSection>
</React.Fragment>
Expand Down
1 change: 1 addition & 0 deletions plugins/app/src/components/resources/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const Resources: React.FunctionComponent = () => {

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={options ? <ResourcesToolbar options={options} setOptions={changeOptions} /> : undefined}
panelContent={details ? details : undefined}
>
Expand Down
2 changes: 1 addition & 1 deletion plugins/app/src/components/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Settings: React.FunctionComponent = () => {
description="The settings for you hub and all the satellites. You can also view the resources, which are available via each satellite."
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
<div>TODO: Show settings</div>
</PageContentSection>
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion plugins/app/src/components/teams/Team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const Team: React.FunctionComponent = () => {
}
/>

<PageContentSection hasPadding={false} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={false} hasDivider={false} toolbarContent={undefined} panelContent={details}>
{data.dashboards ? (
<DashboardsWrapper manifest={data} references={data.dashboards} setDetails={setDetails} />
) : (
Expand Down
1 change: 1 addition & 0 deletions plugins/app/src/components/teams/Teams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const Teams: React.FunctionComponent = () => {

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={
<Toolbar usePageInsets={true}>
<ToolbarItem>
Expand Down
1 change: 1 addition & 0 deletions plugins/app/src/components/topology/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const Applications: React.FunctionComponent = () => {

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={options ? <ApplicationsToolbar options={options} setOptions={changeOptions} /> : undefined}
panelContent={details}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const ContainerInstancesPage: React.FunctionComponent<IContainerInstancesPagePro
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
<ContainerGroups instance={instance} resourceGroups={resourceGroups} setDetails={setDetails} />
</PageContentSection>
</React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const CostManagementPage: React.FunctionComponent<ICostManagementPageProps> = ({

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={
<CostManagementToolbar resourceGroups={resourceGroups} options={options} setOptions={changeOptions} />
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const KubernetesServicesPage: React.FunctionComponent<IKubernetesServicesPagePro
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
<KubernetesServices instance={instance} resourceGroups={resourceGroups} setDetails={setDetails} />
</PageContentSection>
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-azure/src/components/page/OverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const OverviewPage: React.FunctionComponent<IOverviewPageProps> = ({ instance }:
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
<Gallery hasGutter={true}>
{Object.keys(services).map((service) => (
<GalleryItem key={service}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const VirtualMachineScaleSetsPage: React.FunctionComponent<IVirtualMachineScaleS
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
<VirtualMachineScaleSets instance={instance} resourceGroups={resourceGroups} setDetails={setDetails} />
</PageContentSection>
</React.Fragment>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-elasticsearch/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-flux/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
panelContent={details}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-grafana/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const ArtifactsPage: React.FunctionComponent<IArtifactsPageProps> = ({ instance

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={details}
>
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-harbor/src/components/page/ProjectsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const ProjectsPage: React.FunctionComponent<IProjectsPageProps> = ({ instance }:
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
{isLoading ? (
<div className="pf-u-text-align-center">
<Spinner />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const RepositoriesPage: React.FunctionComponent<IRepositoriesPageProps> = ({ ins

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-helm/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
panelContent={details}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-istio/src/components/page/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const Application: React.FunctionComponent<IApplicationProps> = ({ instance }: I

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<ApplicationToolbar options={options} setOptions={changeOptions} />}
panelContent={details}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-istio/src/components/page/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const Applications: React.FunctionComponent<IApplicationsProps> = ({ instance }:

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<ApplicationsToolbar instance={instance} options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-jaeger/src/components/page/Traces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const Traces: React.FunctionComponent<ITracesProps> = ({ instance }: ITracesProp

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<TracesToolbar instance={instance} options={options} setOptions={changeOptions} />}
panelContent={details}
>
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-kiali/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
}
/>
<PageContentSection
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
panelContent={details}
>
{options.namespaces && options.namespaces.length > 0 ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const AggregationPage: React.FunctionComponent<IAggregationPageProps> = ({ insta

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<AggregationToolbar options={tmpOptions} setOptions={setTmpOptions} />}
panelContent={undefined}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-klogs/src/components/page/LogsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const LogsPage: React.FunctionComponent<ILogsPageProps> = ({ instance }: ILogsPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<LogsToolbar options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-opsgenie/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={details}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-prometheus/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar instance={instance} options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-rss/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
<div></div>
</PageContentSection>
</React.Fragment>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-sonarqube/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-sql/src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const Page: React.FunctionComponent<IPluginPageProps> = ({ instance }: IPluginPa

<PageContentSection
hasPadding={true}
hasDivider={true}
toolbarContent={<PageToolbar options={options} setOptions={changeOptions} />}
panelContent={undefined}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const ServicePage: React.FunctionComponent<IServicePageProps> = ({ instance }: I
component={<PluginPageTitle satellite={data.key} name={data.name} description={data.description} />}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={details}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={details}>
<ServicePageWrapper
instance={instance}
index={data}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TechDocsPage: React.FunctionComponent<ITechDocsPageProps> = ({ instance }:
}
/>

<PageContentSection hasPadding={true} toolbarContent={undefined} panelContent={undefined}>
<PageContentSection hasPadding={true} hasDivider={true} toolbarContent={undefined} panelContent={undefined}>
<Card>
<TechDocsList instance={instance} />
</Card>
Expand Down
10 changes: 4 additions & 6 deletions plugins/shared/src/components/misc/PageContentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ import React from 'react';

interface IPageContentSectionProps {
hasPadding: boolean;
hasDivider: boolean;
panelContent: React.ReactNode;
toolbarContent: React.ReactNode;
children: React.ReactElement;
}

export const PageContentSection: React.FunctionComponent<IPageContentSectionProps> = ({
hasPadding,
hasDivider,
panelContent,
toolbarContent,
children,
}: IPageContentSectionProps) => {
return (
<PageSection isFilled={true} padding={{ default: 'noPadding' }}>
<Drawer isExpanded={panelContent !== undefined}>
{toolbarContent && (
<DrawerSection>
{toolbarContent}
<Divider component="div" />
</DrawerSection>
)}
{toolbarContent && <DrawerSection>{toolbarContent}</DrawerSection>}
{hasDivider && <Divider component="div" />}
<DrawerContent className="pf-m-no-background" panelContent={panelContent}>
<DrawerContentBody hasPadding={hasPadding}>{children}</DrawerContentBody>
</DrawerContent>
Expand Down