Skip to content

Commit 08a42b9

Browse files
upcoming: [UIE-10432] - Implement drawer to reserve an IP address (#13541)
1 parent b023c4d commit 08a42b9

13 files changed

Lines changed: 883 additions & 18 deletions

File tree

packages/api-v4/src/networking/networking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export const unReserveIP = (ipAddress: string) =>
294294
*/
295295
export const getReservedIPsTypes = (params?: Params) =>
296296
Request<Page<PriceType>>(
297-
setURL(`${API_ROOT}/networking/reserved/ips/types`),
297+
setURL(`${BETA_API_ROOT}/networking/reserved/ips/types`),
298298
setMethod('GET'),
299299
setParams(params),
300300
);

packages/api-v4/src/networking/types.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
export interface AssignedEntity {
2-
id: number;
3-
label: string;
4-
type: string;
5-
url: string;
6-
}
1+
import type { Entity } from '../account/types';
72

83
export interface IPAddress {
94
address: string;
10-
assigned_entity: AssignedEntity | null;
5+
assigned_entity: Entity | null;
116
gateway: null | string;
127
interface_id: null | number;
138
linode_id: null | number;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Upcoming Features
3+
---
4+
5+
Reserve IP - Implement drawer to reserve an IP address ([#13541](https://github.com/linode/manager/pull/13541))

packages/manager/src/components/TagsInput/TagsInput.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export interface TagsInputProps {
4747
* Callback fired when the value changes.
4848
*/
4949
onChange: (selected: TagOption[]) => void;
50+
/**
51+
* If true, displays "(optional)" after the label.
52+
*/
53+
optional?: boolean;
5054
/**
5155
* An error to display beneath the input.
5256
*/
@@ -58,8 +62,16 @@ export interface TagsInputProps {
5862
}
5963

6064
export const TagsInput = (props: TagsInputProps) => {
61-
const { disabled, hideLabel, label, noMarginTop, onChange, tagError, value } =
62-
props;
65+
const {
66+
disabled,
67+
hideLabel,
68+
label,
69+
noMarginTop,
70+
onChange,
71+
optional,
72+
tagError,
73+
value,
74+
} = props;
6375

6476
const [errors, setErrors] = React.useState<APIError[]>([]);
6577

@@ -185,7 +197,7 @@ export const TagsInput = (props: TagsInputProps) => {
185197
/>
186198
));
187199
}}
188-
textFieldProps={{ hideLabel, noMarginTop }}
200+
textFieldProps={{ hideLabel, noMarginTop, optional }}
189201
value={value}
190202
/>
191203
);

packages/manager/src/factories/types.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,20 @@ export const networkTransferPriceTypeFactory =
298298
],
299299
transfer: 0,
300300
});
301+
302+
export const reservedIPsTypeFactory = Factory.Sync.makeFactory<PriceType>({
303+
id: 'reserved-ipv4',
304+
label: 'Reserved IPv4 Address',
305+
price: {
306+
hourly: 0.007,
307+
monthly: 5,
308+
},
309+
region_prices: [
310+
{
311+
hourly: 0.014,
312+
id: 'pl-labkrk-2',
313+
monthly: 10,
314+
},
315+
],
316+
transfer: 0,
317+
});

0 commit comments

Comments
 (0)