Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux Runtime Card and Page #55

Merged
merged 34 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dd99132
Add get deployments across clusters hook
AlinaGoaga Oct 17, 2023
6f5707f
Add flux runtime card - WIP
AlinaGoaga Oct 18, 2023
cc53d00
Update proxy mock and getAllDeployments function
AlinaGoaga Oct 19, 2023
5e967e7
Install react query to retrieve data in getAllDeployments
AlinaGoaga Oct 20, 2023
c8f7295
Update flux runtime card to be organized around the clusters rather t…
AlinaGoaga Oct 21, 2023
b69fd15
Add tests for the Flux Runtime Card - WIP
AlinaGoaga Oct 21, 2023
101639f
Add test for getDeploymentsLists - WIP
AlinaGoaga Oct 21, 2023
5fc53ab
Add test for getDeploymentsLists - WIP2
AlinaGoaga Oct 21, 2023
91b2cc8
Add mock implementation for getClusters in getDeploymentsList test
AlinaGoaga Oct 23, 2023
36579a1
Update useWeaveFluxDeepLink to remove Flux Controller as we won't be …
AlinaGoaga Oct 23, 2023
8140a81
Fix the clusterNameFilteringColumn for flux runtime
AlinaGoaga Oct 23, 2023
4cc967b
Update flux runtime card to use a local ct rather than importing from…
AlinaGoaga Oct 23, 2023
bf039b9
Update data retrieval to work with dynamic workspaces - WIP
AlinaGoaga Oct 25, 2023
e51aedb
Update data retrieval to work with dynamic workspaces
AlinaGoaga Oct 25, 2023
02cd792
Solve linting errors
AlinaGoaga Oct 25, 2023
8bd5842
Small cleanup
AlinaGoaga Oct 25, 2023
a1814df
Update useGetDeployments test
AlinaGoaga Oct 25, 2023
9fd2c04
Adjust deployment structure to match k8s
AlinaGoaga Oct 26, 2023
2a7726f
Adjust deployment structure to match k8s - updated
AlinaGoaga Oct 26, 2023
3cb9112
Add clusterName as flux controllers are retrieved
AlinaGoaga Oct 26, 2023
3758906
Update types to include the flux controller cluster name
AlinaGoaga Oct 26, 2023
55f9fc5
Add Flux Runtime Page
AlinaGoaga Oct 26, 2023
9dbf311
Add Flux Runtime Page - nav and icon
AlinaGoaga Oct 27, 2023
cae0d9b
Add Flux Runtime Page - update layout
AlinaGoaga Oct 27, 2023
1b6225f
Fix up ns.name -> ns.metadata.name
foot Oct 27, 2023
60214fd
Update page exports and readme with how to add a page - WIP
AlinaGoaga Oct 27, 2023
27302f8
Merge branch 'flux-runtime' of github.com:weaveworks/weaveworks-backs…
AlinaGoaga Oct 27, 2023
71f2f9b
Update readme with instructions on how to add a page
AlinaGoaga Oct 27, 2023
470a87a
Adjust ns type in test
AlinaGoaga Oct 27, 2023
e0c4f65
Update Readme instructions on how to use page
AlinaGoaga Oct 30, 2023
57b937b
Update test mock in flux runtime for deployments and namespace
AlinaGoaga Oct 30, 2023
439178c
Add default return value for proxy in tests
AlinaGoaga Oct 30, 2023
226c36a
Small copy tweaks
foot Oct 30, 2023
7cf284c
Update plugins/backstage-plugin-flux/README.md
AlinaGoaga Oct 30, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export function FluxEntityTable<T extends object = {}>({
emptyContent={
<div className={classes.empty}>
<Typography variant="body1">
No {title} found for this entity.
No {title} found
{title === 'flux controllers' ? '' : 'for this entity'}.
</Typography>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const FluxRuntimeTable = ({

return (
<FluxEntityTable
title={'flux controllers'}
columns={columns}
data={data as Cluster[]}
isLoading={isLoading}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {
Content,
ContentHeader,
Header,
Page,
SupportButton,
} from '@backstage/core-components';
import { Content, Header, Page } from '@backstage/core-components';
import { Grid, makeStyles } from '@material-ui/core';
import Typography from '@material-ui/core/Typography';
import React from 'react';
import { FluxRuntimeCard } from '../FluxRuntimeCard';

Expand Down Expand Up @@ -53,29 +30,14 @@ export interface FluxRuntimePageProps {
* @public
*/
export function FluxRuntimePage(props: FluxRuntimePageProps) {
const {
title = 'Flux Runtime',
subtitle = 'Render the Deployments in Flux Runtime.',
pageTitle = 'Flux Controllers',
} = props;
const { title = 'Flux Runtime' } = props;
const classes = useStyles();

return (
<Page themeId="tool">
<Header title={title} subtitle={subtitle} />
<Header title={title} />
<Content className={classes.overflowXScroll}>
<ContentHeader title={pageTitle}>
<SupportButton>
<Typography paragraph>
Description of what user can find on the page
</Typography>
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="row">
<Grid item xs={12} sm={6} md={4}>
<FluxRuntimeCard />
</Grid>
</Grid>
<FluxRuntimeCard />
</Content>
</Page>
);
Expand Down
5 changes: 3 additions & 2 deletions plugins/backstage-plugin-flux/src/images/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ export const oci = (
export const flux = (
<svg
role="img"
width="25"
height="25"
fill="currentColor"
width="20"
height="20"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
Expand Down
1 change: 1 addition & 0 deletions plugins/backstage-plugin-flux/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export {
EntityFluxSourcesCard,
EntityFluxImagePoliciesCard,
FluxRuntimeCard,
FluxIcon,
} from './plugin';
15 changes: 14 additions & 1 deletion plugins/backstage-plugin-flux/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,24 @@ export const FluxRuntimeCard = weaveworksFluxPlugin.provide(
* Page used to show Flux Controllers / Deployments in Flux Runtime
* @public
*/
export const TechRadarPage = weaveworksFluxPlugin.provide(
export const FluxRuntimePage = weaveworksFluxPlugin.provide(
AlinaGoaga marked this conversation as resolved.
Show resolved Hide resolved
createRoutableExtension({
name: 'TechRadarPage',
AlinaGoaga marked this conversation as resolved.
Show resolved Hide resolved
component: () =>
import('./components/FluxRuntimePage').then(m => m.FluxRuntimePage),
mountPoint: rootRouteRef,
}),
);

/**
* Export for Flux Icon to use in nav
* @public
*/
export const FluxIcon = weaveworksFluxPlugin.provide(
createComponentExtension({
name: 'FluxIcon',
component: {
lazy: () => import('./images/icons').then(m => m.FluxIcon),
},
}),
);
Loading