Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7fb84a2
Add Clone Linode power-off notice
hkhalil-akamai Jan 17, 2024
193f986
Add new feature flag for Linode Clone UI updates
hkhalil-akamai Jan 17, 2024
649ae71
Added changeset: Clone Linode power-off notice
hkhalil-akamai Jan 17, 2024
bc2d297
Reduce spacing between notices
hkhalil-akamai Jan 18, 2024
49f5c11
Refactored DebouncedSearchTextField to enable external state management
hkhalil-akamai Jan 19, 2024
aed317c
Add search to SelectLinodePanel and autopopulate when cloning
hkhalil-akamai Jan 19, 2024
4ed06f9
Fix bug causing filter value to update every time a Linode is selected
hkhalil-akamai Jan 19, 2024
3d4a6f2
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Jan 19, 2024
c2bfb1f
Make clear icon blue on hover
hkhalil-akamai Jan 19, 2024
e3fe3ef
Gate changes behind feature flag
hkhalil-akamai Jan 19, 2024
fbd5106
Added changeset: Search filter in Clone Linode and Create Linode from…
hkhalil-akamai Jan 19, 2024
e63b7de
Added -> upcoming
hkhalil-akamai Jan 23, 2024
5acd91a
Add explanatory comment
hkhalil-akamai Jan 23, 2024
58b2cd3
Change InputAdornment to IconButton
hkhalil-akamai Jan 23, 2024
80beada
Add missing useEffect dependencies
hkhalil-akamai Jan 23, 2024
d4e80b9
Fix unused customValue prop
hkhalil-akamai Jan 23, 2024
d176d08
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Jan 24, 2024
c0afbeb
Simplify export
hkhalil-akamai Jan 24, 2024
305c1c5
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Jan 26, 2024
e7786af
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Jan 30, 2024
2284d00
Add table view to Clone and Backups flow
hkhalil-akamai Feb 12, 2024
c0396b4
Add unit test for SelectLinodeRow
hkhalil-akamai Feb 13, 2024
5563ee8
Switch to useOrder hook
hkhalil-akamai Feb 13, 2024
624b774
Gate table view behind feature flag
hkhalil-akamai Feb 13, 2024
1108f51
Added changeset: List view for Linode Clone and Create from Backup
hkhalil-akamai Feb 13, 2024
e2262ab
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Feb 14, 2024
61c8af0
No clear icon when search field empty
hkhalil-akamai Feb 14, 2024
06acfc3
Extract render functions to components
hkhalil-akamai Feb 14, 2024
91e5c03
linodeID -> linodeId
hkhalil-akamai Feb 14, 2024
112218c
Feedback
hkhalil-akamai Feb 14, 2024
581c37f
Remove unnecessary ExtendedLinodes interface and utility
hkhalil-akamai Feb 15, 2024
828fd93
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Feb 16, 2024
6bb9202
Rename feature flag to camelcase
hkhalil-akamai Feb 21, 2024
1b305d4
Add unit tests for SelectLinodePanel
hkhalil-akamai Feb 21, 2024
e01bc6b
Only show power off action for selected linodes
hkhalil-akamai Feb 21, 2024
66ff449
Feedback @bnussman-akamai
hkhalil-akamai Feb 21, 2024
b2730af
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Feb 21, 2024
ea6d1ad
Bulleted notices
hkhalil-akamai Feb 21, 2024
9625654
Don't show power actions for from backup
hkhalil-akamai Feb 21, 2024
a93733e
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Feb 23, 2024
d3787b2
UX feedback: remove "Notice:" heading
hkhalil-akamai Feb 26, 2024
663824a
Fix table column rendering inconsistencies
hkhalil-akamai Feb 26, 2024
f13a059
Merge remote-tracking branch 'upstream/develop' into M3-7580-linode-c…
hkhalil-akamai Feb 26, 2024
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
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

List view for Linode Clone and Create from Backup ([#10182](https://github.com/linode/manager/pull/10182))
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export const DebouncedSearchTextField = React.memo(
<CircleProgress mini={true} />
</InputAdornment>
) : (
clearable && (
clearable &&
textFieldValue && (
<IconButton
aria-label="Clear"
onClick={() => setTextFieldValue('')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { StyledActionButton } from 'src/components/Button/StyledActionButton';
interface InlineMenuActionProps {
/** Required action text */
actionText: string;
/** Optional height when displayed as a button */
buttonHeight?: number;
/** Optional class names */
className?: string;
/** Optional disabled */
Expand All @@ -27,6 +29,7 @@ interface InlineMenuActionProps {
export const InlineMenuAction = (props: InlineMenuActionProps) => {
const {
actionText,
buttonHeight,
className,
disabled,
href,
Expand All @@ -53,6 +56,7 @@ export const InlineMenuAction = (props: InlineMenuActionProps) => {
disabled={disabled}
loading={loading}
onClick={onClick}
sx={buttonHeight !== undefined ? { height: buttonHeight } : {}}
tooltipAnalyticsEvent={tooltipAnalyticsEvent}
tooltipText={tooltip}
{...rest}
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/dev-tools/FeatureFlagTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const MOCK_FEATURE_FLAGS_STORAGE_KEY = 'devTools/mock-feature-flags';
const options: { flag: keyof Flags; label: string }[] = [
{ flag: 'aclb', label: 'ACLB' },
{ flag: 'aclbFullCreateFlow', label: 'ACLB Full Create Flow' },
{ flag: 'linodeCloneUIChanges', label: 'Linode Clone UI Changes' },
{ flag: 'linodeCloneUiChanges', label: 'Linode Clone UI Changes' },
{ flag: 'gecko', label: 'Gecko' },
{ flag: 'parentChildAccountAccess', label: 'Parent/Child Account' },
{ flag: 'selfServeBetas', label: 'Self Serve Betas' },
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export interface Flags {
firewallNodebalancer: boolean;
gecko: boolean;
ipv6Sharing: boolean;
linodeCloneUIChanges: boolean;
linodeCloneUiChanges: boolean;
linodeCreateWithFirewall: boolean;
mainContentBanner: MainContentBanner;
metadata: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import { validatePassword } from 'src/utilities/validatePassword';
import LinodeCreate from './LinodeCreate';
import { deriveDefaultLabel } from './deriveDefaultLabel';
import { HandleSubmit, Info, LinodeCreateValidation, TypeInfo } from './types';
import { getRegionIDFromLinodeID } from './utilities';

import type {
CreateLinodeRequest,
Expand Down Expand Up @@ -588,19 +587,13 @@ class LinodeCreateContainer extends React.PureComponent<CombinedProps, State> {
* since the API does not infer this automatically.
*/

/**
* safe to ignore possibility of "undefined"
* null checking happens in CALinodeCreate
*/
const selectedRegionID = getRegionIDFromLinodeID(
this.props.linodesData!,
id
);
this.setState({
selectedBackupID: undefined,
selectedDiskSize: diskSize,
selectedLinodeID: id,
selectedRegionID,
selectedRegionID: this.props.linodesData?.find(
(linode) => linode.id == id
)?.region,
selectedTypeID: undefined,
});
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { Linode } from '@linode/api-v4';
import React from 'react';

import { SelectionCard } from 'src/components/SelectionCard/SelectionCard';
import { useImageQuery } from 'src/queries/images';
import { useRegionsQuery } from 'src/queries/regions';
import { useTypeQuery } from 'src/queries/types';
import { formatStorageUnits } from 'src/utilities/formatStorageUnits';
import { isNotNullOrUndefined } from 'src/utilities/nullOrUndefined';

interface Props {
disabled?: boolean;
handleSelection: () => void;
linode: Linode;
selected?: boolean;
}

export const SelectLinodeCard = ({
disabled,
handleSelection,
linode,
selected,
}: Props) => {
const { data: regions } = useRegionsQuery();

const { data: linodeType } = useTypeQuery(
linode?.type ?? '',
Boolean(linode?.type)
);

const { data: linodeImage } = useImageQuery(
linode?.image ?? '',
Boolean(linode?.image)
);

const type = linodeType ? formatStorageUnits(linodeType?.label) : linode.type;
const image = linodeImage?.label ?? linode.image;
const region =
regions?.find((region) => region.id == linode.region)?.label ??
linode.region;

return (
<SelectionCard
subheadings={[
[type, image, region].filter(isNotNullOrUndefined).join(', '),
]}
checked={selected}
disabled={disabled}
heading={linode.label}
key={`selection-card-${linode.id}`}
onClick={handleSelection}
/>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import Grid from '@mui/material/Unstable_Grid2';
import React from 'react';

import { SelectLinodeCard } from './SelectLinodeCard';
import { RenderLinodeProps } from './SelectLinodePanel';

export const SelectLinodeCards = ({
disabled,
handleSelection,
orderBy: { data: linodes },
selectedLinodeId,
}: RenderLinodeProps) => (
<Grid container spacing={2}>
{linodes.map((linode) => (
<SelectLinodeCard
handleSelection={() =>
handleSelection(linode.id, linode.type, linode.specs.disk)
}
disabled={disabled}
key={linode.id}
linode={linode}
selected={linode.id == selectedLinodeId}
/>
))}
</Grid>
);
Loading