Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
OliwiaGowor committed Sep 2, 2024
1 parent 61bad23 commit ccb6218
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
18 changes: 9 additions & 9 deletions src/resources/LimitRanges/LimitRangeDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ type LimitResources = {
storage?: string;
};

export type LimitProps = {
type: string;
max?: LimitResources;
min?: LimitResources;
default?: LimitResources;
defaultRequest?: LimitResources;
};

export type LimitRangeProps = {
metadata: {
name: string;
namespace: string;
};
spec: {
limits: [
{
type: string;
max?: LimitResources;
min?: LimitResources;
default?: LimitResources;
defaultRequest?: LimitResources;
},
];
limits: [LimitProps];
};
};

Expand Down
14 changes: 2 additions & 12 deletions src/resources/LimitRanges/LimitRangeSpecification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { GenericList } from 'shared/components/GenericList/GenericList';
import { EMPTY_TEXT_PLACEHOLDER } from 'shared/constants';
import { UI5Panel } from 'shared/components/UI5Panel/UI5Panel';
import './LimitRangeSpecification.scss';
import { LimitRangeProps } from './LimitRangeDetails';

type FlatLimitProps = {
type?: string;
Expand All @@ -15,17 +16,6 @@ type FlatLimitProps = {
maxLimitRequestRatio: string;
};

const compactEmptyLimit = [
{
type: EMPTY_TEXT_PLACEHOLDER,
resource: EMPTY_TEXT_PLACEHOLDER,
max: EMPTY_TEXT_PLACEHOLDER,
min: EMPTY_TEXT_PLACEHOLDER,
default: EMPTY_TEXT_PLACEHOLDER,
defaultRequest: EMPTY_TEXT_PLACEHOLDER,
},
];

const emptyLimit = [
{
type: EMPTY_TEXT_PLACEHOLDER,
Expand All @@ -45,7 +35,7 @@ export default function LimitRangeSpecification({
resource,
isCompact = false,
}: {
resource: any;
resource: LimitRangeProps;
isCompact?: boolean;
}) {
const { t } = useTranslation();
Expand Down

0 comments on commit ccb6218

Please sign in to comment.