Skip to content

Commit 36a3a6b

Browse files
authored
Merge pull request #11690 from linode/release-v1.137.0
Release v1.137.0 - release → staging
2 parents f610cb9 + 7c3f2a6 commit 36a3a6b

File tree

714 files changed

+13391
-7653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

714 files changed

+13391
-7653
lines changed

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
version: '3.4'
32

43
# Environment variables that will be exposed to every Cypress runner.
54
x-e2e-env:

docs/GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
1. Fork this repository.
44
2. Clone your fork to your local machine.
55
3. Go to [cloud.linode.com/profile/clients](https://cloud.linode.com/profile/clients) and click "Add an OAuth App".
6-
4. Enter a label and set the callback URL to `http://localhost:3000/oauth/callback`.
6+
4. Enter a label, set the callback URL to `http://localhost:3000/oauth/callback`, and check the "Public" checkbox.
77
5. After your OAuth App has been created, copy the ID (not the secret).
88
6. In `packages/manager`, copy the contents of `.env.example` and paste them into a new file called `.env`.
99
7. In `.env` set `REACT_APP_CLIENT_ID` to the ID from step 5.

packages/api-v4/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## [2025-02-25] - v0.135.0
2+
3+
4+
### Upcoming Features:
5+
6+
- Add `DateTimeWithPreset` type in CloudPulse types ([#11573](https://github.com/linode/manager/pull/11573))
7+
- Add `update_firewall` RoleType for IAM ([#11588](https://github.com/linode/manager/pull/11588))
8+
- Change attribute names in NotificationChannel and MetricCriteria types to reflect the latest API specification ([#11610](https://github.com/linode/manager/pull/11610))
9+
- Change type of the alertId in `editAlertDefinition` and `getAlertDefinitionByServiceTypeAndId` endpoints in CloudPulse alerts to string ([#11613](https://github.com/linode/manager/pull/11613))
10+
- Add new `class` type in alerts object ([#11642](https://github.com/linode/manager/pull/11642))
11+
112
## [2025-02-11] - v0.134.0
213

314

packages/api-v4/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linode/api-v4",
3-
"version": "0.134.0",
3+
"version": "0.135.0",
44
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
55
"bugs": {
66
"url": "https://github.com/linode/manager/issues"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const linodeInterfaceAccountSettings = [
9999
'legacy_config_default_but_linode_allowed',
100100
'linode_default_but_legacy_config_allowed',
101101
'linode_only',
102-
];
102+
] as const;
103103

104104
export type LinodeInterfaceAccountSetting = typeof linodeInterfaceAccountSettings[number];
105105

packages/api-v4/src/cloudpulse/alerts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const getAlertDefinitions = (params?: Params, filters?: Filter) =>
4040

4141
export const getAlertDefinitionByServiceTypeAndId = (
4242
serviceType: string,
43-
alertId: number
43+
alertId: string
4444
) =>
4545
Request<Alert>(
4646
setURL(
@@ -54,7 +54,7 @@ export const getAlertDefinitionByServiceTypeAndId = (
5454
export const editAlertDefinition = (
5555
data: EditAlertDefinitionPayload,
5656
serviceType: string,
57-
alertId: number
57+
alertId: string
5858
) =>
5959
Request<Alert>(
6060
setURL(

packages/api-v4/src/cloudpulse/services.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
import { BETA_API_ROOT as API_ROOT } from 'src/constants';
2-
import Request, { setData, setMethod, setURL } from '../request';
2+
import Request, {
3+
setData,
4+
setMethod,
5+
setParams,
6+
setURL,
7+
setXFilter,
8+
} from '../request';
39
import {
410
JWEToken,
511
JWETokenPayLoad,
612
MetricDefinition,
713
ServiceTypesList,
814
} from './types';
9-
import { ResourcePage } from 'src/types';
15+
import { Filter, Params, ResourcePage } from 'src/types';
1016

11-
export const getMetricDefinitionsByServiceType = (serviceType: string) => {
17+
export const getMetricDefinitionsByServiceType = (
18+
serviceType: string,
19+
params?: Params,
20+
filters?: Filter
21+
) => {
1222
return Request<ResourcePage<MetricDefinition>>(
1323
setURL(
1424
`${API_ROOT}/monitor/services/${encodeURIComponent(
1525
serviceType
1626
)}/metric-definitions`
1727
),
18-
setMethod('GET')
28+
setMethod('GET'),
29+
setParams(params),
30+
setXFilter(filters)
1931
);
2032
};
2133

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

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export type AlertSeverityType = 0 | 1 | 2 | 3;
22
export type MetricAggregationType = 'avg' | 'sum' | 'min' | 'max' | 'count';
33
export type MetricOperatorType = 'eq' | 'gt' | 'lt' | 'gte' | 'lte';
44
export type AlertServiceType = 'linode' | 'dbaas';
5+
export type AlertClass = 'dedicated' | 'shared';
56
export type DimensionFilterOperatorType =
67
| 'eq'
78
| 'neq'
@@ -48,6 +49,12 @@ export interface TimeDuration {
4849
value: number;
4950
}
5051

52+
export interface DateTimeWithPreset {
53+
end: string;
54+
start: string;
55+
preset?: string;
56+
}
57+
5158
export interface Widgets {
5259
label: string;
5360
metric: string;
@@ -80,6 +87,7 @@ export type FilterValue =
8087
| string[]
8188
| number[]
8289
| WidgetFilterValue
90+
| DateTimeWithPreset
8391
| undefined;
8492

8593
type WidgetFilterValue = { [key: string]: AclpWidget };
@@ -104,6 +112,7 @@ export interface MetricDefinition {
104112
scrape_interval: string;
105113
available_aggregate_functions: string[];
106114
dimensions: Dimension[];
115+
is_alertable: boolean;
107116
}
108117

109118
export interface Dimension {
@@ -125,7 +134,8 @@ export interface CloudPulseMetricsRequest {
125134
filters?: Filters[];
126135
aggregate_function: string;
127136
group_by: string;
128-
relative_time_duration: TimeDuration;
137+
relative_time_duration: TimeDuration | undefined;
138+
absolute_time_duration: DateTimeWithPreset | undefined;
129139
time_granularity: TimeGranularity | undefined;
130140
entity_ids: number[];
131141
}
@@ -170,9 +180,10 @@ export interface CreateAlertDefinitionPayload {
170180
trigger_conditions: TriggerCondition;
171181
channel_ids: number[];
172182
}
183+
173184
export interface MetricCriteria {
174185
metric: string;
175-
aggregation_type: MetricAggregationType;
186+
aggregate_function: MetricAggregationType;
176187
operator: MetricOperatorType;
177188
threshold: number;
178189
dimension_filters?: DimensionFilter[];
@@ -204,6 +215,7 @@ export interface Alert {
204215
label: string;
205216
tags: string[];
206217
description: string;
218+
class?: AlertClass;
207219
has_more_resources: boolean;
208220
status: AlertStatusType;
209221
type: AlertDefinitionType;
@@ -214,11 +226,11 @@ export interface Alert {
214226
rules: AlertDefinitionMetricCriteria[];
215227
};
216228
trigger_conditions: TriggerCondition;
217-
channels: {
218-
id: string;
229+
alert_channels: {
230+
id: number;
219231
label: string;
220232
url: string;
221-
type: 'channel';
233+
type: 'alert-channel';
222234
}[];
223235
created_by: string;
224236
updated_by: string;
@@ -296,5 +308,14 @@ export type NotificationChannel =
296308
| NotificationChannelPagerDuty;
297309

298310
export interface EditAlertDefinitionPayload {
299-
entity_ids: string[];
311+
entity_ids?: string[];
312+
status?: AlertStatusType;
300313
}
314+
315+
export interface EditAlertPayloadWithService
316+
extends EditAlertDefinitionPayload {
317+
serviceType: string;
318+
alertId: string;
319+
}
320+
321+
export type AlertStatusUpdateType = 'Enable' | 'Disable';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type RoleType =
2323
| 'linode_viewer'
2424
| 'firewall_admin'
2525
| 'linode_creator'
26+
| 'update_firewall'
2627
| 'firewall_creator';
2728

2829
export interface IamUserPermissions {

packages/manager/.eslintrc.cjs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
'build',
2323
'storybook-static',
2424
'.storybook',
25-
'e2e',
25+
'e2e/core',
2626
'public',
2727
'!.eslintrc.js',
2828
],
@@ -218,6 +218,7 @@ module.exports = {
218218
'comma-dangle': 'off', // Prettier and TS both handle and check for this one
219219
// radix: Codacy considers it as an error, i put it here to fix it before push
220220
curly: 'warn',
221+
eqeqeq: 'warn',
221222
// See: https://www.w3.org/TR/graphics-aria-1.0/
222223
'jsx-a11y/aria-role': [
223224
'error',
@@ -249,6 +250,20 @@ module.exports = {
249250
'@mui/core',
250251
'@mui/system',
251252
'@mui/icons-material',
253+
{
254+
importNames: ['Typography'],
255+
message:
256+
'Please use Typography component from @linode/ui instead of @mui/material',
257+
name: '@mui/material',
258+
},
259+
],
260+
'no-restricted-syntax': [
261+
'error',
262+
{
263+
message:
264+
"The 'data-test-id' attribute is not allowed; use 'data-testid' instead.",
265+
selector: "JSXAttribute[name.name='data-test-id']",
266+
},
252267
],
253268
'no-throw-literal': 'warn',
254269
'no-trailing-spaces': 'warn',

0 commit comments

Comments
 (0)