From 2f9e65f67583ca418856af07e66f935a6f9852ca Mon Sep 17 00:00:00 2001 From: Katherine Kelly Date: Mon, 15 Mar 2021 16:29:42 -0400 Subject: [PATCH 01/83] Cumulus-2425 Changing color of failed node on execution graph --- .../js/components/Executions/execution-graph-utils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/js/components/Executions/execution-graph-utils.js b/app/src/js/components/Executions/execution-graph-utils.js index cfdcdc9fb..570eb76e5 100644 --- a/app/src/js/components/Executions/execution-graph-utils.js +++ b/app/src/js/components/Executions/execution-graph-utils.js @@ -231,8 +231,13 @@ export const addEventsToGraph = (events, graph) => { node.status = 'InProgress'; node.input = event.input; } else if (event.type.endsWith('StateExited')) { - node = graph[event.name]; - node.status = 'Succeeded'; + if (events[i-1].type.endsWith('Failed')) { + node = graph[event.name]; + node.status = 'Failed'; + } else { + node = graph[event.name]; + node.status = 'Succeeded'; + } node.output = event.output; } else if (event.type === 'ExecutionFailed') { const name = findFailure(events, event); From da029719d2ad40f12e3c567b9978769bc756d6f0 Mon Sep 17 00:00:00 2001 From: Katherine Kelly Date: Mon, 15 Mar 2021 16:36:38 -0400 Subject: [PATCH 02/83] Cumulus-2425 CSS update --- app/src/css/_chart.scss | 4 ++++ app/src/js/components/Executions/execution-graph-utils.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/css/_chart.scss b/app/src/css/_chart.scss index 3ff0f3e7a..ccd4f925d 100644 --- a/app/src/css/_chart.scss +++ b/app/src/css/_chart.scss @@ -141,6 +141,10 @@ rect { fill: #de322f; } +.Stopped rect { + fill: orange; +} + svg:not(:root):not(.svg-inline--fa) { display: block; margin: 0 auto; diff --git a/app/src/js/components/Executions/execution-graph-utils.js b/app/src/js/components/Executions/execution-graph-utils.js index 570eb76e5..18fc209a7 100644 --- a/app/src/js/components/Executions/execution-graph-utils.js +++ b/app/src/js/components/Executions/execution-graph-utils.js @@ -233,7 +233,7 @@ export const addEventsToGraph = (events, graph) => { } else if (event.type.endsWith('StateExited')) { if (events[i-1].type.endsWith('Failed')) { node = graph[event.name]; - node.status = 'Failed'; + node.status = 'Stopped'; } else { node = graph[event.name]; node.status = 'Succeeded'; From 0c9c75e5305ddc9bc8afa98739aa0d85e0efc36b Mon Sep 17 00:00:00 2001 From: Katherine Kelly Date: Thu, 18 Mar 2021 14:21:20 -0400 Subject: [PATCH 03/83] Updated Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6205a01f..469f9f52f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ This version of the dashboard requires Cumulus API v5.0.2-alpha.0 - **CUMULUS-2415** - Fixes issue with executions not always displaying the graph corresponding to the current execution +_ **CUMULUS-2425** + - Fixes graph display for failed execution steps + ### Changed - **CUMULUS-bugfix** From ee12ebff434fc5cdaa329524653ed0de45637f52 Mon Sep 17 00:00:00 2001 From: Katherine Kelly Date: Tue, 4 May 2021 08:39:15 -0400 Subject: [PATCH 04/83] Cumulus-2425 Fix lint error --- app/src/js/components/Executions/execution-graph-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/js/components/Executions/execution-graph-utils.js b/app/src/js/components/Executions/execution-graph-utils.js index 18fc209a7..f61f0bcfa 100644 --- a/app/src/js/components/Executions/execution-graph-utils.js +++ b/app/src/js/components/Executions/execution-graph-utils.js @@ -231,7 +231,7 @@ export const addEventsToGraph = (events, graph) => { node.status = 'InProgress'; node.input = event.input; } else if (event.type.endsWith('StateExited')) { - if (events[i-1].type.endsWith('Failed')) { + if (events[i - 1].type.endsWith('Failed')) { node = graph[event.name]; node.status = 'Stopped'; } else { From c10c3e71718c70ceac605f4b83d0081f47a0b7ca Mon Sep 17 00:00:00 2001 From: Anthony Ortega <33133876+jaortega527@users.noreply.github.com> Date: Fri, 7 May 2021 09:36:25 -0500 Subject: [PATCH 05/83] Cumulus 2467 (#959) * CUMULUS-2467 Modified header to contain FOIA, Privacy and Feedback links on the left side of the footer, API, and Dashboard versions in the center and Cumulus GitHub Docs link on the right side of the footer. * CUMULUS-2467 Added 2 additional footer unit tests to validate left side, and right side links * CUMULUS-2467 Added one additional cert to cover the "NASA" text in the footer * CUMULUS-2467 Added changelog entry * CUMULUS-2467 updated main_page_spec.js to ensure test validating Cumulus Dashboard displays a valid Cumulus API version in the footer still runs now that the version has been moved into a div from an h5 tag * CUMULUS-2467 Added underscore and url-parse to the audit-ci allowlist. Co-authored-by: Anthony Ortega --- CHANGELOG.md | 3 ++ app/src/css/_base.scss | 53 ++++++++++++++++++++++--- app/src/js/components/Footer/footer.js | 34 +++++++++++++--- audit-ci.json | 2 +- cypress/integration/main_page_spec.js | 2 +- test/components/footer/version.js | 55 ++++++++++++++++++++++++-- 6 files changed, 133 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de947204a..1c11186de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,9 @@ _ **CUMULUS-2425** - Upgrades Cypress testing software to 7.0.1 - Refactors home page and adds a new section header +- **CUMULUS-2467** + - Update to footer layout to include NASA privacy links to help move Cumulus into compliance with other EED products + ## [v5.0.0] - 2021-03-23 ## Breaking Changes diff --git a/app/src/css/_base.scss b/app/src/css/_base.scss index 3ecaa2852..4b34e15cb 100644 --- a/app/src/css/_base.scss +++ b/app/src/css/_base.scss @@ -833,12 +833,6 @@ a:active { text-align: center; } -.api__version,.dashboard__version{ - font-weight: 400; - color: $white; - padding: 10px 0 2px 0; -} - .api__warning { /*color: $error-red;*/ color: $white; @@ -863,3 +857,50 @@ a:active { top: 0em; } } + +.footer__container { + display: flex; + flex-direction: row; + justify-content: space-evenly; + color: $white; +} + +.footer__links, .footer__version, .footer__opensource { + display: flex; + flex-direction: row; + justify-content: flex-start; + width: 100%; + div { + display: flex; + padding: 0.5em; + margin-right: 1em; + a { + color: $white; + } + } +} + +.footer__links { + div { + a { + text-decoration: underline; + } + } +} + +.footer__version { + justify-content: center; + div { + justify-content: space-evenly; + } +} + +.footer__opensource { + justify-content: flex-end; +} + +.dashboard__version, .api__version { + background-color: darken($ocean-blue, 10%); + border: 1px solid darken($ocean-blue, 13%); + border-radius: .5em; +} diff --git a/app/src/js/components/Footer/footer.js b/app/src/js/components/Footer/footer.js index 082add2d3..776a4c67a 100644 --- a/app/src/js/components/Footer/footer.js +++ b/app/src/js/components/Footer/footer.js @@ -10,17 +10,41 @@ const Footer = ({ const { authenticated } = api; const { warning, versionNumber } = apiVersion; + const leftSideLinks = [ + { text: 'FOIA', url: 'https://www.nasa.gov/FOIA/index.html' }, + { text: 'Privacy', url: 'https://www.nasa.gov/about/highlights/HP_Privacy.html' }, + { text: 'Feedback', url: 'https://github.com/nasa/cumulus-dashboard/issues' } + ]; + + const rightSideLinks = [ + { text: 'Open Cumulus GitHub Docs', url: 'https://nasa.github.io/cumulus/docs/cumulus-docs-readme', iconClassName: 'fab fa-github fa-lg' } + ]; + let versionWarning; if (warning) { versionWarning =
Warning: { warning }
; } return (
- { authenticated && -
-
Cumulus Dashboard Version: { DASH_VERSION }
-
Cumulus API Version: { versionNumber }
-
+ {authenticated && +
    +
  • +
    NASA
    + {leftSideLinks.map((linkInfo) => ( + + ))} +
  • +
  • +
    Version
    +
    Dashboard v{DASH_VERSION}
    +
    API v{versionNumber}
    +
  • +
  • + {rightSideLinks.map((linkInfo) => ( + + ))} +
  • +
} { versionWarning }
diff --git a/audit-ci.json b/audit-ci.json index bfa3360b9..5dc23e3e1 100644 --- a/audit-ci.json +++ b/audit-ci.json @@ -2,5 +2,5 @@ "high": true, "pass-enoaudit": true, "retry-count": 20, - "allowlist": ["xml-crypto"] + "allowlist": ["xml-crypto", "underscore", "url-parse"] } diff --git a/cypress/integration/main_page_spec.js b/cypress/integration/main_page_spec.js index 0317ce174..087620742 100644 --- a/cypress/integration/main_page_spec.js +++ b/cypress/integration/main_page_spec.js @@ -65,7 +65,7 @@ describe('Dashboard Home Page', () => { payload: { versionNumber: apiVersionNumber } }); - cy.get('h5[class=api__version]').should((apiVersionWrapper) => { + cy.get('div[class=api__version]').should((apiVersionWrapper) => { expect(apiVersionWrapper.first()).to.contain(apiVersionNumber); }); }); diff --git a/test/components/footer/version.js b/test/components/footer/version.js index 85f067499..8bc8cda46 100644 --- a/test/components/footer/version.js +++ b/test/components/footer/version.js @@ -26,7 +26,7 @@ test('Cumulus API Version is not shown on the dashboard when not logged in', fun /> ); - t.false(footerWrapper.exists('.api__version')); + t.false(footerWrapper.exists('.version__info')); }); test('Cumulus API Version is shown on the dashboard', function (t) { @@ -45,7 +45,7 @@ test('Cumulus API Version is shown on the dashboard', function (t) { ); const apiVersionNumber = footerWrapper.find('[className="api__version"]'); - t.is(`Cumulus API Version: ${apiVersion.versionNumber}`, apiVersionNumber.text()); + t.is(`API v${apiVersion.versionNumber}`, apiVersionNumber.text()); const hasApiWarning = footerWrapper.hasClass('api__warning'); t.false(hasApiWarning); }); @@ -86,5 +86,54 @@ test('Dashboard Version is shown in the footer', function (t) { ); const dashboardVersionNumber = footerWrapper.find('[className="dashboard__version"]'); - t.is(`Cumulus Dashboard Version: ${dashboardVersion}`, dashboardVersionNumber.text()); + t.is(`Dashboard v${dashboardVersion}`, dashboardVersionNumber.text()); +}); + +test('FOIA, Privacy, and Feedback links shown in the footer', function (t) { + const api = { authenticated: true }; + const apiVersion = { + versionNumber: '1.11.0', + }; + const dashboardVersion = pckg.version; + + const footerWrapper = shallow( +