From 2f283272a7e627407df5b2b9e218192bc44a65cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:01:55 +0000 Subject: [PATCH 1/5] Bump cypress-fail-fast from 7.0.3 to 7.1.0 Bumps [cypress-fail-fast](https://github.com/javierbrea/cypress-fail-fast) from 7.0.3 to 7.1.0. - [Release notes](https://github.com/javierbrea/cypress-fail-fast/releases) - [Changelog](https://github.com/javierbrea/cypress-fail-fast/blob/main/CHANGELOG.md) - [Commits](https://github.com/javierbrea/cypress-fail-fast/compare/v7.0.3...v7.1.0) --- updated-dependencies: - dependency-name: cypress-fail-fast dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68026ef8..feac1d46 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@welldone-software/why-did-you-render": "^7.0.1", "babel-jest": "^29.6.3", "cypress": "^13.5.1", - "cypress-fail-fast": "^7.0.3", + "cypress-fail-fast": "^7.1.0", "cypress-real-events": "^1.11.0", "dotenv": "^16.4.4", "eslint": "^8.43.0", diff --git a/yarn.lock b/yarn.lock index 341cbd74..f7760c44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5278,10 +5278,10 @@ csstype@^3.0.11, csstype@^3.0.2, csstype@^3.1.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -cypress-fail-fast@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cypress-fail-fast/-/cypress-fail-fast-7.0.3.tgz#85ac2861c155611939f0bad03a09e561891f9ddf" - integrity sha512-IYVDZ+ykfTd2DFBK3N6NnWXc2gix7VwSi9Vg4zv40jm6PLknZTD4cZoRmh7uvpoQAIKNIFbx5V81qQD5pLHLSQ== +cypress-fail-fast@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/cypress-fail-fast/-/cypress-fail-fast-7.1.0.tgz#36e28e39fffaacf852b4866c8459e5274eb8326d" + integrity sha512-OnN5WqSP49yHKoitq+FmMG/+nUvat6NdFLNUQgVJYbmDdgyiiS1aI33S8+AuRb4zRZR5+5/eq53p/oL+a/m2Tw== dependencies: chalk "4.1.2" From 981c64356c1a5cde4db767bcc026b0a2d6c4fb75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:02:32 +0000 Subject: [PATCH 2/5] Bump web-vitals from 3.4.0 to 3.5.2 Bumps [web-vitals](https://github.com/GoogleChrome/web-vitals) from 3.4.0 to 3.5.2. - [Changelog](https://github.com/GoogleChrome/web-vitals/blob/main/CHANGELOG.md) - [Commits](https://github.com/GoogleChrome/web-vitals/compare/v3.4.0...v3.5.2) --- updated-dependencies: - dependency-name: web-vitals dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68026ef8..afe220b7 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "styled-components": "^6.0.4", "use-debounce": "^9.0.3", "validator": "^13.11.0", - "web-vitals": "^3.4.0" + "web-vitals": "^3.5.2" }, "scripts": { "start": "vite", diff --git a/yarn.lock b/yarn.lock index 341cbd74..18ef72b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10961,10 +10961,10 @@ warning@^4.0.0, warning@^4.0.2, warning@^4.0.3: dependencies: loose-envify "^1.0.0" -web-vitals@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.4.0.tgz#45ed33a3a2e029dc38d36547eb5d71d1c7e2552d" - integrity sha512-n9fZ5/bG1oeDkyxLWyep0eahrNcPDF6bFqoyispt7xkW0xhDzpUBTgyDKqWDi1twT0MgH4HvvqzpUyh0ZxZV4A== +web-vitals@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.5.2.tgz#5bb58461bbc173c3f00c2ddff8bfe6e680999ca9" + integrity sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg== webidl-conversions@^3.0.0: version "3.0.1" From aa4dc690da10934048b4a77ad61e72d1d54d8a90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Mar 2024 01:00:46 +0000 Subject: [PATCH 3/5] Bump follow-redirects from 1.15.5 to 1.15.6 Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 341cbd74..08791a39 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6614,9 +6614,9 @@ focus-lock@^0.11.6: tslib "^2.0.3" follow-redirects@^1.15.4: - version "1.15.5" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" - integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== font-awesome@^4.7.0: version "4.7.0" From 5d84e0853e566b0774cd4694057464b5f6fe7d9d Mon Sep 17 00:00:00 2001 From: Gavin Reynolds Date: Thu, 21 Mar 2024 10:55:04 +0000 Subject: [PATCH 4/5] custom details are in both body.cef_details.details and body.details for events... however body.cef_details.details can be null if the alert is from an email Signed-off-by: Gavin Reynolds --- src/config/column-generator.jsx | 6 +++++- src/mocks/incidents.test.js | 21 +++++++++++++-------- src/redux/incidents/sagas.js | 12 +++++++++--- src/redux/incidents/sagas.test.js | 2 +- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/config/column-generator.jsx b/src/config/column-generator.jsx index 26110e95..00d4167b 100644 --- a/src/config/column-generator.jsx +++ b/src/config/column-generator.jsx @@ -773,7 +773,11 @@ export const customAlertColumnForSavedColumn = (savedColumn) => { return null; } const accessor = (incident) => { - const path = `alerts[*].body.cef_details.${accessorPath}`; + // custom details are in both body.cef_details.details and body.details for events + // but only body.details is guaranteed to exist, and won't be null + // body.cef_details.details can be null if the alert is from an email + // const path = `alerts[*].body.cef_details.${accessorPath}`; + const path = `alerts[*].body.${accessorPath}`; let result = null; try { result = JSONPath({ diff --git a/src/mocks/incidents.test.js b/src/mocks/incidents.test.js index 6e7f7430..3182c045 100644 --- a/src/mocks/incidents.test.js +++ b/src/mocks/incidents.test.js @@ -22,6 +22,14 @@ const generateMockAlert = () => { const message = faker.commerce.productDescription(); const uuid = faker.string.uuid(); const link = faker.internet.url(); + const customDetails = { + quote, + 'some obsecure field': uuid, + link, + object_details: { + key1: 'value1', + }, + }; return { type: 'alert', id: alertId, @@ -30,18 +38,15 @@ const generateMockAlert = () => { created_at: createdAt, body: { contexts: [], + // custom details are in both body.cef_details.details and body.details for events + // but only body.details is guaranteed to exist, and won't be null + // body.cef_details.details can be null if the alert is from an email + details: customDetails, cef_details: { contexts: [], dedup_key: alertId, description: title, - details: { - quote, - 'some obsecure field': uuid, - link, - object_details: { - key1: 'value1', - }, - }, + details: customDetails, event_class: jobType, message, mutations: [ diff --git a/src/redux/incidents/sagas.js b/src/redux/incidents/sagas.js index d3cd0b76..0a517596 100644 --- a/src/redux/incidents/sagas.js +++ b/src/redux/incidents/sagas.js @@ -498,7 +498,10 @@ export function* filterIncidentsImpl() { // Handle case when '[*]' accessors are used const strippedAccessor = col.accessorPath.replace(/([[*\]])/g, '.'); return ( - `alerts.body.cef_details.${strippedAccessor}` + // custom details are in both body.cef_details.details and body.details for events + // but only body.details is guaranteed to exist, and won't be null + // body.cef_details.details can be null if the alert is from an email + `alerts.body.${strippedAccessor}` .split('.') // Handle case when special character is wrapped in quotation marks .map((a) => (a.includes("'") ? a.replaceAll("'", '') : a)) @@ -523,8 +526,11 @@ export function* filterIncidentsImpl() { const incidentAlertsForSearch = incidentAlerts[incident.id] instanceof Array ? incidentAlerts[incident.id] : []; const incidentAlertsForSearchWithFlattedCustomDetails = incidentAlertsForSearch.map( (alert) => { - const flattedCustomDetails = alert.body?.cef_details - ? Object.values(flattenObject(alert.body.cef_details)).join(' ') + // custom details are in both body.cef_details.details and body.details for events + // but only body.details is guaranteed to exist, and won't be null + // body.cef_details.details can be null if the alert is from an email + const flattedCustomDetails = alert.body?.details + ? Object.values(flattenObject(alert.body.details)).join(' ') : ''; return { ...alert, diff --git a/src/redux/incidents/sagas.test.js b/src/redux/incidents/sagas.test.js index d3b7c3c1..b0202b57 100644 --- a/src/redux/incidents/sagas.test.js +++ b/src/redux/incidents/sagas.test.js @@ -154,7 +154,7 @@ describe('Sagas: Incidents', () => { it('filterIncidents: Search by Alert Custom Detail Field', () => { const mockIncident = mockIncidents[0]; const customField = 'some obsecure field'; - const customFieldValue = mockIncident.alerts[0].body.cef_details.details[customField]; + const customFieldValue = mockIncident.alerts[0].body.details[customField]; const expectedIncidentResult = [mockIncident]; return expectSaga(filterIncidents) .withReducer(incidents) From f49704222fcdc928eede856ef6c9dd2f0d8c49c8 Mon Sep 17 00:00:00 2001 From: Gavin Reynolds Date: Thu, 28 Mar 2024 09:05:19 +0000 Subject: [PATCH 5/5] Publishing release v0.12.2-beta.0 Signed-off-by: Gavin Reynolds --- package.json | 2 +- src/config/version.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3d70eb2c..dbdbee68 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pd-live-react", "homepage": "https://pagerduty.github.io/pd-live-react", - "version": "0.12.1-beta.0", + "version": "0.12.2-beta.0", "private": true, "dependencies": { "@chakra-ui/icons": "^2.1.1", diff --git a/src/config/version.js b/src/config/version.js index 19bf0a60..f885508f 100644 --- a/src/config/version.js +++ b/src/config/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '0.12.1-beta.0'; +export const version = '0.12.2-beta.0';