Skip to content

Commit

Permalink
Merge branch 'main' into 66061-isolate-rated-disabilities-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jerekshoe committed Oct 25, 2023
2 parents 5402c37 + 31525e9 commit ed95db8
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 65 deletions.
73 changes: 45 additions & 28 deletions .github/workflows/content-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,34 +553,6 @@ jobs:
url: ${{ env.DRUPAL_ADDRESS }}/api/content_release/error
method: GET

- name: Get Datadog token from Parameter Store
uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest
with:
ssm_parameter: /dsva-vagov/content-build/GHA_CONTENT_BUILD_DATADOG_API_KEY
env_variable_name: GHA_CONTENT_BUILD_DATADOG_API_KEY

- name: Build JSON object
run: |
jq --null-input '{}' | \
jq '.title = "VA.gov CMS content release has failed"' | \
jq '.text = "VA.gov Content release ${{github.run_id}} failed at \(now|strftime("%Y-%m-%d %H:%M:%S"))! https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"' | \
jq '.date_happened = now' | \
jq '.aggregation_key = "content release ${{github.run_id}}"' | \
jq '.tags[0] = "project:vagov"' | \
jq '.tags[1] = "repo:content-build"' | \
jq '.tags[2] = "workflow:content-release"' | \
jq '.tags[3] = "env:${{env.DEPLOY_ENV}}"' | \
jq '.tags[5] = "status:${{needs.deploy.result}}"' | \
jq '.tags[6] = "trigger:${{env.BUILD_TRIGGER}}"' | \
jq '.alert_type = "error"' > event.json
- name: Send event to Datadog
run: |
curl -X POST "https://api.ddog-gov.com/api/v1/events" \
-H "Content-Type: text/json" \
-H "DD-API-KEY: ${{ env.GHA_CONTENT_BUILD_DATADOG_API_KEY }}" \
-d @- < event.json
notify-failure-slack:
name: Notify Failure (Slack)
runs-on: [self-hosted, asg]
Expand Down Expand Up @@ -613,6 +585,51 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

notify-failure-datadog:
name: Notify Failure (Datadog)
runs-on: [self-hosted, asg]
if: |
(failure() && needs.deploy.result != 'success')
needs: deploy
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1

- name: Get Datadog token from Parameter Store
uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest
with:
ssm_parameter: /dsva-vagov/content-build/GHA_CONTENT_BUILD_DATADOG_API_KEY
env_variable_name: GHA_CONTENT_BUILD_DATADOG_API_KEY

- name: Build JSON object
run: |
jq --null-input '{}' | \
jq '.title = "VA.gov CMS content release has failed"' | \
jq '.text = "VA.gov Content release ${{github.run_id}} failed at \(now|strftime("%Y-%m-%d %H:%M:%S"))! https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"' | \
jq '.date_happened = now' | \
jq '.aggregation_key = "content release ${{github.run_id}}"' | \
jq '.tags[0] = "project:vagov"' | \
jq '.tags[1] = "repo:content-build"' | \
jq '.tags[2] = "workflow:content-release"' | \
jq '.tags[3] = "env:${{env.DEPLOY_ENV}}"' | \
jq '.tags[5] = "status:${{needs.deploy.result}}"' | \
jq '.tags[6] = "trigger:${{env.BUILD_TRIGGER}}"' | \
jq '.alert_type = "error"' > event.json
- name: Send event to Datadog
run: |
curl -X POST "https://api.ddog-gov.com/api/v1/events" \
-H "Content-Type: text/json" \
-H "DD-API-KEY: ${{ env.GHA_CONTENT_BUILD_DATADOG_API_KEY }}" \
-d @- < event.json
record-metrics:
name: Record metrics in Datadog
runs-on: [self-hosted, asg]
Expand Down
10 changes: 10 additions & 0 deletions src/applications/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -1656,5 +1656,15 @@
"vagovprod": false,
"layout": "page-react.html"
}
},
{
"appName": "Verify Your Enrollment",
"entryName": "verify-your-enrollment",
"rootUrl": "/education/verify-your-enrollment",
"productId": "90b61c25-80ce-444f-89fb-eb186b52bfe6",
"template": {
"vagovprod": false,
"layout": "page-react.html"
}
}
]
5 changes: 1 addition & 4 deletions src/site/filters/liquid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1660,9 +1660,6 @@ module.exports = function registerFilters() {
'/change-direct-deposit',
];

return (
cmsFeatureFlags.FEATURE_MOBILE_APP_PROMO &&
urlsForBanner.includes(currentPath)
);
return urlsForBanner.includes(currentPath);
};
};
4 changes: 2 additions & 2 deletions src/site/includes/tests/homepage.cypress.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ describe('home page', () => {
.scrollIntoView()
.should('exist')
.should('be.visible')
.contains(linkText)
// Commenting out the text check until we can discuss with PW - TFC.
// .contains(linkText)
.should('have.attr', 'href')
.and('include', href);
};
Expand Down Expand Up @@ -84,7 +85,6 @@ describe('home page', () => {
verifyElement('[data-e2e-id="va-benefits-and-health-care-0"]');
verifyElement('[data-e2e-id="about-va-1"]');
verifyElement('[data-e2e-id="find-a-va-location-2"]');
verifyElement('[data-e2e-id="my-va-3"]');
});

// Hero =======================================================
Expand Down
27 changes: 13 additions & 14 deletions src/site/layouts/event.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@
{% endif %}

<!-- See more events. -->
{% assign index = entityUrl.breadcrumb.length | minus: 2 %}
<a
class="vads-u-padding-bottom--3 vads-u-margin-top--1 vads-u-font-weight--bold"
href="{{ entityUrl.breadcrumb | getValueFromArrayObjPath: index, 'url.path' }}"
href="{{ fieldListing.entity.entityUrl.path }}"
onclick="recordEvent({ event: 'nav-secondary-button-click' });">
See more events
<i
Expand All @@ -283,12 +282,12 @@
var expandRecurringEventsButton = document.getElementById('expand-recurring-events');
var expandRecurringEventsIcon = document.getElementById('expand-recurring-events-icon');
var recurringEvents = document.getElementById('recurring-events');
// Escape early if we are not able to find the elements.
if (!expandRecurringEventsButton || !expandRecurringEventsIcon || !recurringEvents) {
return;
}
// Toggle the bottom borders of the button.
if (expandRecurringEventsButton.style.borderBottomLeftRadius === '0px') {
expandRecurringEventsButton.style.borderBottomLeftRadius = '5px';
Expand All @@ -297,46 +296,46 @@
expandRecurringEventsButton.style.borderBottomLeftRadius = '0px';
expandRecurringEventsButton.style.borderBottomRightRadius = '0px';
}
// Toggle the visibility of the recurring events.
recurringEvents.classList.toggle('vads-u-display--none');
recurringEvents.classList.toggle('vads-u-display--flex');
// Toggle the icon.
expandRecurringEventsIcon.classList.toggle('fa-plus');
expandRecurringEventsIcon.classList.toggle('fa-minus');
}
function onShowAllRecurringEventsClick() {
// Derive recurring event items.
var recurringEventItems = document.querySelectorAll('.recurring-event');
// Show all recurring events.
for (var index = 0; index < recurringEventItems.length; index++) {
if (recurringEventItems[index]) {
recurringEventItems[index].classList.remove('vads-u-display--none');
}
}
// Hide the show all recurring events button.
var showAllRecurringEventsButton = document.getElementById('show-all-recurring-events');
// Hide the button if we find it.
if (showAllRecurringEventsButton) {
showAllRecurringEventsButton.classList.add('vads-u-display--none');
}
}
var expandRecurringEventsButton = document.getElementById('expand-recurring-events');
if (expandRecurringEventsButton) {
expandRecurringEventsButton.addEventListener('click', onExpandRecurringEventsClick);
}
var showAllRecurringEventsButton = document.getElementById('show-all-recurring-events');
if (showAllRecurringEventsButton) {
showAllRecurringEventsButton.addEventListener('click', onShowAllRecurringEventsClick);
}</script>

{% include "src/site/includes/footer.html" %}
{% include "src/site/includes/debug.drupal.liquid" %}
{% include "src/site/includes/debug.drupal.liquid" %}
2 changes: 1 addition & 1 deletion src/site/layouts/faq_multiple_q_a.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with constructLcBreadcrumbs = true titleInclude = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with titleInclude = true %}
<div id="content" class="interior" data-template="node-faq_multiple_q_a">
<main class="va-l-detail-page">
Expand Down
2 changes: 1 addition & 1 deletion src/site/layouts/health_care_local_facility.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true deriveBreadcrumbsFromUrl = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true %}

<div class="interior" id="content">
<main class="va-l-detail-page va-facility-page">
Expand Down
2 changes: 1 addition & 1 deletion src/site/layouts/news_story.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% endif %}
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true deriveBreadcrumbsFromUrl = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true %}

<div id="content" class="interior">
<main class="va-l-detail-page va-facility-page">
Expand Down
2 changes: 1 addition & 1 deletion src/site/layouts/person_profile.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true deriveBreadcrumbsFromUrl = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true %}

<div id="content" class="interior">
<main class="va-l-detail-page va-facility-page">
Expand Down
5 changes: 2 additions & 3 deletions src/site/layouts/press_release.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true deriveBreadcrumbsFromUrl = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true %}

<div id="content" class="interior">
<main class="va-l-detail-page va-facility-page">
Expand Down Expand Up @@ -82,9 +82,8 @@
<section class="vads-u-margin-bottom--3">
{{ fieldOffice.entity.fieldPressReleaseBlurb.processed }}
</section>
{% assign index = entityUrl.breadcrumb.length | minus: 2 %}
<a onClick="recordEvent({ event: 'nav-secondary-button-click' });"
href="{{ entityUrl.breadcrumb | getValueFromArrayObjPath: index, 'url.path' }}">See all news releases</a>
href="{{ fieldListing.entity.entityUrl.path }}">See all news releases</a>
</article>
<!-- Last updated & feedback button-->
{% include "src/site/includes/above-footer-elements.drupal.liquid" %}
Expand Down
2 changes: 1 addition & 1 deletion src/site/layouts/q_a.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with constructLcBreadcrumbs = true titleInclude = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with titleInclude = true %}

<div id="content" class="interior" data-template="node-q_a">
<main class="va-l-detail-page">
Expand Down
4 changes: 2 additions & 2 deletions src/site/layouts/step_by_step.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with constructLcBreadcrumbs = true titleInclude = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with titleInclude = true %}

<div id="content" class="interior" data-template="node-step_by_step">
<main class="va-l-detail-page">
Expand Down Expand Up @@ -121,7 +121,7 @@
<div class="usa-content">
<va-back-to-top></va-back-to-top>
<!-- Last updated & feedback button-->
{% include "src/site/includes/above-footer-elements.drupal.liquid" %}
{% include "src/site/includes/above-footer-elements.drupal.liquid" %}
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/site/layouts/support_resources_detail_page.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with constructLcBreadcrumbs = true titleInclude = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with titleInclude = true %}

<div
id="content"
Expand Down Expand Up @@ -103,4 +103,4 @@
</div>

{% include "src/site/includes/footer.html" %}
{% include "src/site/includes/debug.drupal.liquid" %}
{% include "src/site/includes/debug.drupal.liquid" %}
8 changes: 4 additions & 4 deletions src/site/layouts/va_form.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "src/site/includes/header.html" %}
{% include "src/site/includes/preview-edit.drupal.liquid" %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" with deriveBreadcrumbsFromUrl = true %}
{% include "src/site/includes/breadcrumbs.drupal.liquid" %}

<div id="content" class="interior">
<main class="va-l-detail-page">
Expand Down Expand Up @@ -115,9 +115,9 @@
{% if fieldVaFormToolUrl %}
<h3 data-testid="va_form--online-tool">Online tool</h3>
<p>{{ fieldVaFormToolIntro }}</p>
<a
class="vads-c-action-link--blue"
href="{{ fieldVaFormToolUrl.uri }}"
<a
class="vads-c-action-link--blue"
href="{{ fieldVaFormToolUrl.uri }}"
onclick="recordEvent({ event: 'cta-primary-button-click' });"
>
Go to the online tool
Expand Down
3 changes: 3 additions & 0 deletions src/site/stages/build/drupal/graphql/nodeEvent.graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ const nodeEvent = `
entityBundle
entityId
entityType
entityUrl {
path
}
... on NodeEventListing {
fieldDescription
fieldIntroText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ const pressReleaseFragment = `
}
}
fieldListing {
entity {
entityUrl {
path
}
}
}
fieldAdministration {
entity{
... on TaxonomyTermAdministration {
Expand All @@ -83,7 +90,7 @@ const getPressReleaseSlice = (operationName, offset, limit) => {
return `
${pressReleaseFragment}
query GetNodePressRelease($onlyPublishedContent: Boolean!) {
nodeQuery(
limit: ${limit}
Expand Down

0 comments on commit ed95db8

Please sign in to comment.