Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/api-v4/src/networking/networking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export const unReserveIP = (ipAddress: string) =>
*/
export const getReservedIPsTypes = (params?: Params) =>
Request<Page<PriceType>>(
setURL(`${API_ROOT}/networking/reserved/ips/types`),
setURL(`${BETA_API_ROOT}/networking/reserved/ips/types`),
setMethod('GET'),
setParams(params),
);
9 changes: 2 additions & 7 deletions packages/api-v4/src/networking/types.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
export interface AssignedEntity {
id: number;
label: string;
type: string;
url: string;
}
import type { Entity } from '../account/types';

export interface IPAddress {
address: string;
assigned_entity: AssignedEntity | null;
assigned_entity: Entity | null;
gateway: null | string;
interface_id: null | number;
linode_id: null | number;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Reserve IP - Implement drawer to reserve an IP address ([#13541](https://github.com/linode/manager/pull/13541))
18 changes: 15 additions & 3 deletions packages/manager/src/components/TagsInput/TagsInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export interface TagsInputProps {
* Callback fired when the value changes.
*/
onChange: (selected: TagOption[]) => void;
/**
* If true, displays "(optional)" after the label.
*/
optional?: boolean;
/**
* An error to display beneath the input.
*/
Expand All @@ -58,8 +62,16 @@ export interface TagsInputProps {
}

export const TagsInput = (props: TagsInputProps) => {
const { disabled, hideLabel, label, noMarginTop, onChange, tagError, value } =
props;
const {
disabled,
hideLabel,
label,
noMarginTop,
onChange,
optional,
tagError,
value,
} = props;

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

Expand Down Expand Up @@ -185,7 +197,7 @@ export const TagsInput = (props: TagsInputProps) => {
/>
));
}}
textFieldProps={{ hideLabel, noMarginTop }}
textFieldProps={{ hideLabel, noMarginTop, optional }}
value={value}
/>
);
Expand Down
17 changes: 17 additions & 0 deletions packages/manager/src/factories/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,20 @@ export const networkTransferPriceTypeFactory =
],
transfer: 0,
});

export const reservedIPsTypeFactory = Factory.Sync.makeFactory<PriceType>({
id: 'reserved-ipv4',
label: 'Reserved IPv4 Address',
price: {
hourly: 0.007,
monthly: 5,
},
region_prices: [
{
hourly: 0.014,
id: 'pl-labkrk-2',
monthly: 10,
},
],
transfer: 0,
});
Loading
Loading