Skip to content

Commit

Permalink
fix(kiali): update styles, remove item details links (#1207)
Browse files Browse the repository at this point in the history
Update styles, remove item details links
  • Loading branch information
josunect authored Feb 19, 2024
1 parent 84a0d44 commit c133ea7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
9 changes: 4 additions & 5 deletions plugins/kiali/src/components/VirtualList/Renderers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const getIstioLink = (item: TResource): string => {
};

// Links
// TODO: Will be used for details pages
// @ts-ignore
const getLink = (item: TResource, config: Resource, query?: string): string => {
let url =
config.name === 'istio'
Expand Down Expand Up @@ -87,10 +89,9 @@ export const actionRenderer = (

export const item: Renderer<TResource> = (
resource: TResource,
config: Resource,
_: Resource,
badge: PFBadgeType,
) => {
const key = `link_definition_${config.name}_${resource.namespace}_${resource.name}`;
let serviceBadge = badge;

if ('serviceRegistry' in resource && resource.serviceRegistry) {
Expand All @@ -114,9 +115,7 @@ export const item: Renderer<TResource> = (
style={{ verticalAlign: 'middle', whiteSpace: 'nowrap' }}
>
<PFBadge badge={serviceBadge} position={topPosition} />
<Link key={key} to={getLink(resource, config)}>
{resource.name}
</Link>
{resource.name}
</TableCell>
);
};
Expand Down
2 changes: 1 addition & 1 deletion plugins/kiali/src/components/VirtualList/VirtualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const VirtualList = (listProps: VirtualListProps<RenderResource>) => {
{listProps.tableToolbar}
<TableContainer>
<Table>
<TableHead style={{ border: 'collapse' }}>
<TableHead style={{ border: 'collapse', background: 'white' }}>
<TableRow>
{columns.map((column: ResourceType<any>, index: number) => (
<TableCell
Expand Down
7 changes: 4 additions & 3 deletions plugins/kiali/src/pages/WorkloadList/WorkloadListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { useRef } from 'react';
import { useAsyncFn, useDebounce } from 'react-use';

import { Content, Page } from '@backstage/core-components';
import { Content } from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';

import { CircularProgress } from '@material-ui/core';
Expand All @@ -14,6 +14,7 @@ import { VirtualList } from '../../components/VirtualList/VirtualList';
import { isMultiCluster } from '../../config';
import { getErrorString, kialiApiRef } from '../../services/Api';
import { KialiAppState, KialiContext } from '../../store';
import { baseStyle } from '../../styles/StyleUtils';
import { WorkloadListItem } from '../../types/Workload';
import { NamespaceInfo } from '../Overview/NamespaceInfo';
import { getNamespaces } from '../Overview/OverviewPage';
Expand Down Expand Up @@ -120,7 +121,7 @@ export const WorkloadListPage = () => {
};

return (
<Page themeId="tool">
<div className={baseStyle}>
<Content>
<DefaultSecondaryMasthead elements={grids()} onRefresh={() => load()} />
<VirtualList
Expand All @@ -130,6 +131,6 @@ export const WorkloadListPage = () => {
hiddenColumns={hiddenColumns}
/>
</Content>
</Page>
</div>
);
};
5 changes: 5 additions & 0 deletions plugins/kiali/src/styles/StyleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ export const kialiStyle = (styleProps: NestedCSSProperties) => {
...styleProps,
});
};

export const baseStyle = kialiStyle({
display: 'contents',
overflow: 'visible',
});

0 comments on commit c133ea7

Please sign in to comment.