Skip to content

Commit

Permalink
Merge pull request #10377 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.117.0 - staging → master
  • Loading branch information
mjac0bs authored Apr 15, 2024
2 parents d7b1caa + a455707 commit 5825d01
Show file tree
Hide file tree
Showing 186 changed files with 5,814 additions and 3,760 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h3 align="center">
<img src="https://github.com/linode/manager/blob/develop/packages/manager/src/assets/logo/akamai-logo.svg" width="200" />
<img src="https://github.com/linode/manager/blob/develop/packages/manager/src/assets/logo/akamai-logo-color.svg" width="200" />
<br />
<br />
Akamai Connected Cloud Manager
Expand Down
12 changes: 11 additions & 1 deletion packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## [2024-04-15] - v0.114.0

### Added:

- New endpoint and type for `nodebalancers/types` ([#10265](https://github.com/linode/manager/pull/10265))
- Severity fields to support ticket endpoints and new account capability ([#10317](https://github.com/linode/manager/pull/10317))

### Upcoming Features:

- Modify Region Placement Groups Limits types ([#10343](https://github.com/linode/manager/pull/10343))

## [2024-04-01] - v0.113.0

### Added:
Expand All @@ -16,7 +27,6 @@

## [2024-03-18] - v0.112.0


### Changed:

- Make `match_condition` optional in Rule types to support TCP rules ([#10264](https://github.com/linode/manager/pull/10264))
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linode/api-v4",
"version": "0.113.0",
"version": "0.114.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
1 change: 1 addition & 0 deletions packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export type AccountCapability =
| 'Object Storage Access Key Regions'
| 'Object Storage'
| 'Placement Group'
| 'Support Ticket Severity'
| 'Vlans'
| 'VPCs';

Expand Down
17 changes: 15 additions & 2 deletions packages/api-v4/src/nodebalancers/nodebalancers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Request, {
setURL,
setXFilter,
} from '../request';
import { Filter, Params, ResourcePage as Page } from '../types';
import {
import type { Filter, Params, ResourcePage as Page, PriceType } from '../types';
import type {
CreateNodeBalancerPayload,
NodeBalancer,
NodeBalancerStats,
Expand Down Expand Up @@ -130,3 +130,16 @@ export const getNodeBalancerFirewalls = (
setXFilter(filter),
setParams(params)
);

/**
* getNodeBalancerTypes
*
* Return a paginated list of available NodeBalancer types; used for pricing.
* This endpoint does not require authentication.
*/
export const getNodeBalancerTypes = (params?: Params) =>
Request<Page<PriceType>>(
setURL(`${API_ROOT}/nodebalancers/types`),
setMethod('GET'),
setParams(params)
);
6 changes: 4 additions & 2 deletions packages/api-v4/src/regions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ export interface Region {
label: string;
country: Country;
capabilities: Capabilities[];
maximum_pgs_per_customer: number;
maximum_vms_per_pg: number;
placement_group_limits: {
maximum_pgs_per_customer: number;
maximum_linodes_per_pg: number;
};
status: RegionStatus;
resolvers: DNSResolvers;
site_type: RegionSite;
Expand Down
4 changes: 4 additions & 0 deletions packages/api-v4/src/support/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface SupportTicket {
summary: string;
updated: string;
updated_by: string | null;
severity: TicketSeverity | null;
}

export interface SupportReply {
Expand All @@ -39,4 +40,7 @@ export interface TicketRequest {
longviewclient_id?: number;
nodebalancer_id?: number;
volume_id?: number;
severity?: TicketSeverity;
}

export type TicketSeverity = 1 | 2 | 3;
10 changes: 10 additions & 0 deletions packages/api-v4/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { PriceObject, RegionPriceObject } from './linodes/types';

export interface APIError {
field?: string;
reason: string;
Expand Down Expand Up @@ -115,3 +117,11 @@ export interface RequestHeaders {
'User-Agent'?: string;
'Content-Type'?: RequestContentType;
}

export interface PriceType {
id: string;
label: string;
price: PriceObject;
region_prices: RegionPriceObject[];
transfer: number;
}
3 changes: 2 additions & 1 deletion packages/manager/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const config: StorybookConfig = {
name: '@storybook/react-vite',
options: {},
},
features: { storyStoreV7: true },
typescript: {
reactDocgenTypescriptOptions: {
// makes union prop types like variant and size appear as select controls
Expand All @@ -33,6 +32,8 @@ const config: StorybookConfig = {
? !/node_modules\/(?!@mui)/.test(prop.parent.fileName)
: true,
},

reactDocgen: 'react-docgen-typescript',
},
docs: {
autodocs: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { create } from '@storybook/theming';
import { addons } from '@storybook/addons';
import { addons } from '@storybook/manager-api';
import Logo from '../src/assets/logo/akamai-logo-color.svg';

const theme = create({
Expand Down
1 change: 0 additions & 1 deletion packages/manager/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const preview: Preview = {
}),
],
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
backgrounds: {
grid: {
disable: true,
Expand Down
6 changes: 6 additions & 0 deletions packages/manager/.storybook/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';

export default defineConfig({
plugins: [react()],
});
49 changes: 49 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [2024-04-15] - v1.117.0

### Added:

- Resource links to NodeBalancers empty state landing page ([#10345](https://github.com/linode/manager/pull/10345))
- New DescriptionList component ([#10325](https://github.com/linode/manager/pull/10325))
- Akamai's Japanese QI System ID to Japanese Invoices ([#10356](https://github.com/linode/manager/pull/10356))

### Changed:

- Improve tags experience ([#10122](https://github.com/linode/manager/pull/10122))
- Use Chip for notification badge ([#10333](https://github.com/linode/manager/pull/10333))

### Fixed:

- Direction of the Bucket Access ACL select field carat with `Autocomplete` ([#10286](https://github.com/linode/manager/pull/10286))
- Reset SSH key form state on cancel ([#10344](https://github.com/linode/manager/pull/10344))
- `usePersonAccessTokensQuery` running without option to be disabled ([#10358](https://github.com/linode/manager/pull/10358))
- Unable to update label of OBJ limited access key ([#10362](https://github.com/linode/manager/pull/10362))
- Tooltip displaying for current Dedicated plan when resizing Database Cluster ([#10364](https://github.com/linode/manager/pull/10364))

### Tech Stories:

- Price NodeBalancers dynamically with `nodebalancers/types` endpoint ([#10265](https://github.com/linode/manager/pull/10265))
- Update Storybook to 8.0.5 ([#10336](https://github.com/linode/manager/pull/10336))
- Update Notistack to 3.0.1 ([#10357](https://github.com/linode/manager/pull/10357))

### Tests:

- Add tests to check Parent and Child Close Account flows ([#10316](https://github.com/linode/manager/pull/10316), [#10296](https://github.com/linode/manager/pull/10296))
- Add UI test for account switch flow with expired Parent token ([#10341](https://github.com/linode/manager/pull/10341))
- Add Cypress tests for Account billing drawers ([#10349](https://github.com/linode/manager/pull/10349))

### Upcoming Features:

- Disable fetching buckets with clusters when ObjMultiClusterEnabled flag is enabled (#10282)
- Update error message in EditAccessKeyDrawer ([#10329](https://github.com/linode/manager/pull/10329))
- Support ticket severity ([#10317](https://github.com/linode/manager/pull/10317))
- Refactor account switching utils for reusability and automatic token refreshing ([#10323](https://github.com/linode/manager/pull/10323))
- Update Placement Groups detail and summaries ([#10325](https://github.com/linode/manager/pull/10325))
- Update and clean up Placement Group assign/unassign features (#10328)
- Update navigation and add new menu items for Placement Groups ([#10340](https://github.com/linode/manager/pull/10340))
- Update UI for Region Placement Groups Limits type changes ([#10343](https://github.com/linode/manager/pull/10343))
- Linode Create Refactor:
- User Data ([#10331](https://github.com/linode/manager/pull/10331))
- Summary ([#10334](https://github.com/linode/manager/pull/10334))
- VLANs ([#10342](https://github.com/linode/manager/pull/10342))
- Include powered-off status in Clone Linode event ([#10337](https://github.com/linode/manager/pull/10337))

## [2024-04-08] - v1.116.1

### Fixed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import {
mockCancelAccount,
mockCancelAccountError,
} from 'support/intercepts/account';
import {
cancellationDataLossWarning,
cancellationPaymentErrorMessage,
} from 'support/constants/account';
import {
CHILD_USER_CLOSE_ACCOUNT_TOOLTIP_TEXT,
PARENT_USER_CLOSE_ACCOUNT_TOOLTIP_TEXT,
PROXY_USER_CLOSE_ACCOUNT_TOOLTIP_TEXT,
} from 'src/features/Account/constants';
import { mockGetProfile } from 'support/intercepts/profile';
import { ui } from 'support/ui';
import {
Expand All @@ -24,29 +33,6 @@ import {
} from 'support/intercepts/feature-flags';
import { makeFeatureFlagData } from 'support/util/feature-flags';

// Data loss warning which is displayed in the account cancellation dialog.
const cancellationDataLossWarning =
'Please note this is an extremely destructive action. Closing your account \
means that all services Linodes, Volumes, DNS Records, etc will be lost and \
may not be able be restored.';

// Error message that appears when a payment failure occurs upon cancellation attempt.
const cancellationPaymentErrorMessage =
'We were unable to charge your credit card for services rendered. \
We cannot cancel this account until the balance has been paid.';

// Tooltip message that appears when a child account tries to close the account.
const contactParentUserTooltipsMessage =
'Contact your parent user to close your account.';

// Tooltip message that appears when a child account tries to close the account.
const contactCustomerSupportTooltipsMessage =
'Contact customer support to close this account.';

// Tooltip message that appears when a parent account with one and more child accounts tries to close the account.
const removeChildAccountTooltipsMessage =
'Remove child accounts before closing the account.';

describe('Account cancellation', () => {
/*
* - Confirms that a user can cancel their account from the Account Settings page.
Expand Down Expand Up @@ -246,15 +232,15 @@ describe('Parent/Child account cancellation', () => {
.trigger('mouseover');
// Click the button first, then confirm the tooltip is shown.
ui.tooltip
.findByText(contactParentUserTooltipsMessage)
.findByText(CHILD_USER_CLOSE_ACCOUNT_TOOLTIP_TEXT)
.should('be.visible');
});
});

/**
* Confirms that a proxy account cannot close the account
*/
it('disables a proxy account to close the account', () => {
it('disables "Close Account" button for proxy users', () => {
const mockAccount = accountFactory.build();
const mockProfile = profileFactory.build({
username: 'proxy-user',
Expand All @@ -280,15 +266,15 @@ describe('Parent/Child account cancellation', () => {
.trigger('mouseover');
// Click the button first, then confirm the tooltip is shown.
ui.tooltip
.findByText(contactCustomerSupportTooltipsMessage)
.findByText(PROXY_USER_CLOSE_ACCOUNT_TOOLTIP_TEXT)
.should('be.visible');
});
});

/**
* Confirms that a parent account with one or more active child accounts cannot close the account
*/
it('disables a parent account with one or more active child accounts to close the account', () => {
it('disables "Close Account" button for parent users', () => {
const mockAccount = accountFactory.build();
const mockProfile = profileFactory.build({
username: 'parent-user',
Expand All @@ -314,7 +300,7 @@ describe('Parent/Child account cancellation', () => {
.trigger('mouseover');
// Click the button first, then confirm the tooltip is shown.
ui.tooltip
.findByText(removeChildAccountTooltipsMessage)
.findByText(PARENT_USER_CLOSE_ACCOUNT_TOOLTIP_TEXT)
.should('be.visible');
});
});
Expand All @@ -326,7 +312,7 @@ describe('Parent/Child account cancellation', () => {
const mockAccount = accountFactory.build();
const mockProfile = profileFactory.build({
username: 'default-user',
restricted: true,
restricted: false,
user_type: 'default',
});
const mockCancellationResponse: CancelAccount = {
Expand Down
Loading

0 comments on commit 5825d01

Please sign in to comment.