Skip to content

Commit 80f3ba8

Browse files
authored
change: [DPS-35650] Logs: minor UI fixes and improvements (#13166)
1 parent 35b8d8b commit 80f3ba8

35 files changed

+270
-107
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Changed
3+
---
4+
5+
Logs: Many minor UI fixes and improvements ([#13166](https://github.com/linode/manager/pull/13166))

packages/manager/cypress/e2e/core/delivery/create-stream.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ describe('Create Stream', () => {
166166
});
167167
});
168168

169-
describe('given Kubernetes Audit Logs Stream Type', () => {
169+
describe('given Kubernetes API Audit Logs Stream Type', () => {
170170
it('selects clusters and creates new stream', () => {
171171
// Mock API responses
172172
mockGetDestinations([mockDestination]);

packages/manager/cypress/e2e/core/delivery/edit-stream.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe('Edit Stream', () => {
143143
});
144144
});
145145

146-
describe('given Kubernetes Audit Logs Stream Type', () => {
146+
describe('given Kubernetes API Audit Logs Stream Type', () => {
147147
it('edits stream label and clusters and saves', () => {
148148
// Mock API responses
149149
mockGetDestinations([mockDestination]);
@@ -192,7 +192,7 @@ describe('Edit Stream', () => {
192192
cy.findByLabelText('Stream Type')
193193
.should('be.visible')
194194
.should('be.disabled')
195-
.should('have.attr', 'value', 'Kubernetes Audit Logs');
195+
.should('have.attr', 'value', 'Kubernetes API Audit Logs');
196196

197197
// Clusters table should be visible
198198
cy.findByText('Clusters').should('be.visible');

packages/manager/cypress/support/constants/delivery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const mockDestinationPayload: CreateDestinationPayload = {
1515
type: destinationType.AkamaiObjectStorage,
1616
details: {
1717
host: randomString(),
18-
bucket_name: randomString(),
18+
bucket_name: randomLabel(),
1919
access_key_id: randomString(),
2020
access_key_secret: randomString(),
2121
path: '/',

packages/manager/src/components/PrimaryNav/PrimaryNav.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,16 +248,16 @@ export const PrimaryNav = (props: PrimaryNavProps) => {
248248
to: '/alerts',
249249
isBeta: flags.aclpAlerting?.beta,
250250
},
251-
{
252-
display: 'Longview',
253-
to: '/longview',
254-
},
255251
{
256252
display: 'Logs',
257253
hide: !isACLPLogsEnabled,
258254
to: '/logs/delivery',
259255
isBeta: isACLPLogsBeta,
260256
},
257+
{
258+
display: 'Longview',
259+
to: '/longview',
260+
},
261261
],
262262
name: 'Monitor',
263263
},

packages/manager/src/factories/delivery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Destination } from '@linode/api-v4';
66
export const destinationFactory = Factory.Sync.makeFactory<Destination>({
77
details: {
88
access_key_id: 'Access Id',
9-
bucket_name: 'Bucket Name',
9+
bucket_name: 'destinations-bucket-name',
1010
host: '3000',
1111
path: 'file',
1212
},

packages/manager/src/features/Delivery/DeliveryLanding.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const DeliveryLanding = React.memo(() => {
3030
breadcrumbProps: {
3131
pathname: '/logs/delivery',
3232
},
33+
docsLink: 'https://techdocs.akamai.com/cloud-computing/docs/log-delivery',
3334
removeCrumbX: 1,
3435
entity: 'Delivery',
3536
title: 'Logs', // TODO: Change to "Delivery" all "Logs" occurrences after adding LogsLanding page

packages/manager/src/features/Delivery/Destinations/DestinationForm/DestinationCreate.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ describe('DestinationCreate', () => {
4747
const destinationNameInput = screen.getByLabelText('Destination Name');
4848
await userEvent.type(destinationNameInput, 'Test');
4949
const hostInput = screen.getByLabelText('Host');
50-
await userEvent.type(hostInput, 'Test');
50+
await userEvent.type(hostInput, 'test');
5151
const bucketInput = screen.getByLabelText('Bucket');
52-
await userEvent.type(bucketInput, 'Test');
52+
await userEvent.type(bucketInput, 'test');
5353
const accessKeyIDInput = screen.getByLabelText('Access Key ID');
5454
await userEvent.type(accessKeyIDInput, 'Test');
5555
const secretAccessKeyInput = screen.getByLabelText('Secret Access Key');
@@ -58,8 +58,8 @@ describe('DestinationCreate', () => {
5858
await userEvent.type(logPathPrefixInput, 'Test');
5959

6060
expect(destinationNameInput).toHaveValue('Test');
61-
expect(hostInput).toHaveValue('Test');
62-
expect(bucketInput).toHaveValue('Test');
61+
expect(hostInput).toHaveValue('test');
62+
expect(bucketInput).toHaveValue('test');
6363
expect(accessKeyIDInput).toHaveValue('Test');
6464
expect(secretAccessKeyInput).toHaveValue('Test');
6565
expect(logPathPrefixInput).toHaveValue('Test');
@@ -114,9 +114,9 @@ describe('DestinationCreate', () => {
114114
const destinationNameInput = screen.getByLabelText('Destination Name');
115115
await userEvent.type(destinationNameInput, 'Test');
116116
const hostInput = screen.getByLabelText('Host');
117-
await userEvent.type(hostInput, 'Test');
117+
await userEvent.type(hostInput, 'test');
118118
const bucketInput = screen.getByLabelText('Bucket');
119-
await userEvent.type(bucketInput, 'Test');
119+
await userEvent.type(bucketInput, 'test');
120120
const accessKeyIDInput = screen.getByLabelText('Access Key ID');
121121
await userEvent.type(accessKeyIDInput, 'Test');
122122
const secretAccessKeyInput = screen.getByLabelText('Secret Access Key');

packages/manager/src/features/Delivery/Destinations/DestinationForm/DestinationCreate.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const DestinationCreate = () => {
3232
},
3333
],
3434
},
35+
docsLink: 'https://techdocs.akamai.com/cloud-computing/docs/log-delivery',
3536
removeCrumbX: [1, 2],
3637
title: 'Create Destination',
3738
};

packages/manager/src/features/Delivery/Destinations/DestinationForm/DestinationEdit.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('DestinationEdit', () => {
5252
assertInputHasValue('Destination Name', 'Destination 123');
5353
});
5454
assertInputHasValue('Host', '3000');
55-
assertInputHasValue('Bucket', 'Bucket Name');
55+
assertInputHasValue('Bucket', 'destinations-bucket-name');
5656
assertInputHasValue('Access Key ID', 'Access Id');
5757
assertInputHasValue('Secret Access Key', '');
5858
assertInputHasValue('Log Path Prefix', 'file');

0 commit comments

Comments
 (0)