Skip to content

Commit

Permalink
enhancement: Global service view enhancements (#1927)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm authored Feb 20, 2025
1 parent bee7e5c commit b8d1fbe
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/* @pluralsh/frontend
3 changes: 2 additions & 1 deletion assets/src/components/cd/globalServices/GlobalService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export const columns = [
ColLastActivity,
ColActions,
]
const crumbs = [

export const crumbs = [
...CD_BASE_CRUMBS,
{
label: 'global services',
Expand Down
13 changes: 13 additions & 0 deletions assets/src/components/cd/globalServices/details/GlobalService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ListBoxItem,
ReloadIcon,
Select,
useSetBreadcrumbs,
} from '@pluralsh/design-system'
import LoadingIndicator from 'components/utils/LoadingIndicator'
import {
Expand All @@ -29,6 +30,8 @@ import { PluralErrorBoundary } from '../../PluralErrorBoundary'
import { GlobalServiceServices } from './GlobalServiceServices.tsx'
import GlobalServiceSidecar from './GlobalServiceSidecar.tsx'
import { ResponsiveLayoutPage } from '../../../utils/layout/ResponsiveLayoutPage.tsx'
import { crumbs } from '../GlobalService.tsx'
import { RESPONSIVE_LAYOUT_CONTENT_WIDTH } from '../../../utils/layout/ResponsiveLayoutContentContainer.tsx'

export default function GlobalService() {
const theme = useTheme()
Expand All @@ -41,6 +44,13 @@ export default function GlobalService() {

const globalService = data?.globalService

useSetBreadcrumbs(
useMemo(
() => [...crumbs, { label: globalService?.name ?? globalServiceId }],
[globalService?.name, globalServiceId]
)
)

const { data: globalServicesData, error: globalServicesError } =
useFetchPaginatedData(
{
Expand Down Expand Up @@ -79,6 +89,9 @@ export default function GlobalService() {
<Flex
direction={'column'}
gap={'large'}
flexGrow={1}
flexShrink={1}
width={RESPONSIVE_LAYOUT_CONTENT_WIDTH}
>
<GlobalServiceSelect
selectedGlobalService={globalService}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function GlobalServiceSidecar({
<Flex
direction={'column'}
gap={'medium'}
width={220}
>
<Sidecar heading="Source">
<SidecarItem heading="Type">
Expand All @@ -63,7 +64,7 @@ export default function GlobalServiceSidecar({
)
}
>
Go to root service
Root service
</Button>
) : (
<Button
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/cd/services/ServicesColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const ColErrors = columnHelper.accessor(
original: { node },
},
}) => (
<div css={{ minWidth: 160 }}>
<div>
<ServicesTableErrors service={node} />
<ServiceDeprecations service={node} />
</div>
Expand Down

0 comments on commit b8d1fbe

Please sign in to comment.