Skip to content

Commit

Permalink
Pull request update/231101
Browse files Browse the repository at this point in the history
d9ad836 OS-6953. Use css-only to set margin for flavor boxes
1bc5802 OS-6967: Hide Nebius recommendations with a flag
  • Loading branch information
maxb-hystax authored Nov 2, 2023
2 parents be418e6 + d9ad836 commit a73f9a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import QuestionMark from "components/QuestionMark";
import TextWithDataTestId from "components/TextWithDataTestId";
import Tooltip from "components/Tooltip";
import { useIsSizeSelected, useSelectionActions } from "reducers/cloudCostComparisonSelectedSizes/hooks";
import { isLastItem } from "utils/arrays";
import { AWS_CNR, AZURE_CNR, FORMATTED_MONEY_TYPES, NEBIUS } from "utils/constants";

const Flavor = ({ flavor }) => {
Expand Down Expand Up @@ -82,11 +81,13 @@ const Flavor = ({ flavor }) => {

const FlavorsCell = ({ flavors }) => (
<ExpandableList
items={flavors.map((flavor, itemIndex) => (
items={flavors.map((flavor) => (
<Box
key={flavor.id}
sx={{
marginBottom: isLastItem(itemIndex, flavors.length) ? 0 : 1
"&:not(:last-child)": {
marginBottom: 1
}
}}
>
<Flavor flavor={flavor} />
Expand Down
8 changes: 2 additions & 6 deletions ngui/ui/src/hooks/useOptscaleRecommendations.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,10 @@ export const useOptscaleRecommendations = () => {
PublicS3Buckets,
ObsoleteImages,
AbandonedImages,
AbandonedNebiusS3Buckets,
CvocAgreementOpportunities
CvocAgreementOpportunities,
...(isNebiusConnectionEnabled ? [AbandonedNebiusS3Buckets, NebiusMigration] : [])
];

if (isNebiusConnectionEnabled) {
recommendations.push(NebiusMigration);
}

return Object.fromEntries(recommendations.map((Rec) => [new Rec().type, Rec]));
}, [isNebiusConnectionEnabled]);
};

0 comments on commit a73f9a6

Please sign in to comment.