Skip to content

Commit

Permalink
Merge pull request #1487 from usdoj/release-7.11.0
Browse files Browse the repository at this point in the history
Release 7.11.0
  • Loading branch information
ameshkin authored Dec 8, 2022
2 parents addc672 + 73c8ada commit be50785
Show file tree
Hide file tree
Showing 33 changed files with 22,979 additions and 814 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: airbnb
settings:
import/resolver: webpack
env:
browser: yes
browser: true
globals:
$: true
jQuery: true
Expand Down
7 changes: 5 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ GEM
nokogiri (1.13.9)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.9-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
Expand All @@ -80,6 +82,7 @@ GEM

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
html-proofer (= 3.19.4)
Expand All @@ -89,7 +92,7 @@ DEPENDENCIES
webrick (~> 1.7)

RUBY VERSION
ruby 2.7.1p83
ruby 3.0.1p64

BUNDLED WITH
2.2.3
2.3.24
4 changes: 4 additions & 0 deletions _config.ddev.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
app_env: ddev
navigation:
secondary:
- href: https://dev-admin.foia.gov/user/login
title: Agency login
4 changes: 4 additions & 0 deletions _config.development.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
app_env: development
navigation:
secondary:
- href: https://dev-admin.foia.gov/user/login
title: Agency login
4 changes: 4 additions & 0 deletions _config.production.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
app_env: production
navigation:
secondary:
- href: https://admin.foia.gov/user/login
title: Agency login
4 changes: 4 additions & 0 deletions _config.staging.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
app_env: staging
navigation:
secondary:
- href: https://stg-admin.foia.gov/user/login
title: Agency login
4 changes: 4 additions & 0 deletions _config.uat.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
app_env: uat
navigation:
secondary:
- href: https://uat-admin.foia.gov/user/login
title: Agency login
4 changes: 2 additions & 2 deletions js/components/cfoc_page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function CFOCPageComponent(props) {
<ul className="cfoc-page-upcoming-meetings-list usa-accordion">
{
meetingsUpcoming.reverse().map((meeting, index) => {
const key = meeting.meeting_title.length * index;
const key = index;
const id = `upcoming-${key.toString()}`;
const date = new Date(meeting.meeting_timestamp * 1000);

Expand Down Expand Up @@ -79,7 +79,7 @@ function CFOCPageComponent(props) {
<ul className="cfoc-page-past-meetings-list usa-accordion">
{
meetingsPast.map((meeting, index) => {
const key = meeting.meeting_title.length * index;
const key = index;
const id = `past-${key.toString()}`;
const date = new Date(meeting.meeting_timestamp * 1000);

Expand Down
2 changes: 1 addition & 1 deletion js/components/foia_tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FoiaTooltip extends Component {

render() {
return (
<button type="button" className="tooltip-trigger button-as-link" ref={(trigger) => { this.trigger = trigger; }} title={this.props.text}>
<button type="button" className="tooltip-trigger button-as-link" ref={(trigger) => { this.trigger = trigger; }} data-tooltip={this.props.text}>
<span className="visually-hidden">Tooltip</span>
</button>
);
Expand Down
15 changes: 15 additions & 0 deletions js/foia_contact_download.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Router } from 'react-router-dom';
import FoiaContactDownload from 'pages/foia_contact_download';
import { createBrowserHistory } from 'history';

const history = createBrowserHistory();

render(
<Router history={history}>
<FoiaContactDownload />
</Router>,
document.getElementById('contact-download-react-app'),
);
15 changes: 15 additions & 0 deletions js/foia_dataset_download.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Router } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import FoiaDatasetDownload from 'pages/foia_dataset_download';

const history = createBrowserHistory();

render(
<Router history={history}>
<FoiaDatasetDownload />
</Router>,
document.getElementById('dataset-download-react-app'),
);
2 changes: 1 addition & 1 deletion js/pages/agency_component_request.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class AgencyComponentRequestPage extends Component {
}

return (
<div className="usa-grid-full grid-flex grid-left" ref={(ref) => { this.element = ref; }}>
<div className="usa-grid-full grid-flex grid-left request-form" ref={(ref) => { this.element = ref; }}>
{
agencyComponent && requestForm
? (
Expand Down
2 changes: 1 addition & 1 deletion js/pages/annual_report_data.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class AnnualReportDataPage extends Component {
and agencies. For full data sets from agency Annual Reports, please
visit
{' '}
<a href="/developer/">the Developer page</a>
<a href="/foia-dataset-download.html">the dataset download page</a>
.
</p>
<form>
Expand Down
22 changes: 22 additions & 0 deletions js/pages/foia_contact_download.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { withRouter } from 'react-router-dom';
import ContactDownloadButton from './contact_download';

function FoiaContactDownload() {
return (
<div className="usa-grid">
<div className="usa-width-one-whole">

<h1>FOIA Contact Download</h1>

<p>The following file is the complete listing of all FOIA contacts across federal departments and agencies.</p>

<ContactDownloadButton />
<div id="contact-download-react-app" />

</div>
</div>
);
}

export default withRouter(FoiaContactDownload);
31 changes: 31 additions & 0 deletions js/pages/foia_dataset_download.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable react/jsx-one-expression-per-line */
import React from 'react';
import { withRouter } from 'react-router-dom';

function FoiaDatasetDownload() {
return (
<div className="usa-grid">
<div className="usa-width-one-whole">
<h1>FOIA Data Set Downloads</h1>
<p>The following compressed files are complete archives of the FOIA Data sets for the years 2008 through 2019.</p>
<ul>
<li><a href="/2020-FOIASetFull.zip">Download the full 2020 FOIA Data set</a> (.zip format)</li>
<li><a href="/2019-FOIASetFull.zip">Download the full 2019 FOIA Data set</a> (.zip format)</li>
<li><a href="/2018-FOIASetFull.zip">Download the full 2018 FOIA Data set</a> (.zip format)</li>
<li><a href="/2017-FOIASetFull.zip">Download the full 2017 FOIA Data set</a> (.zip format)</li>
<li><a href="/2016-FOIASetFull.zip">Download the full 2016 FOIA Data set</a> (.zip format)</li>
<li><a href="/2015-FOIASetFull.zip">Download the full 2015 FOIA Data set</a> (.zip format)</li>
<li><a href="/2014-FOIASetFull.zip">Download the full 2014 FOIA Data set</a> (.zip format)</li>
<li><a href="/2013-FOIASetFull.zip">Download the full 2013 FOIA Data set</a> (.zip format)</li>
<li><a href="/2012-FOIASetFull.zip">Download the full 2012 FOIA Data set</a> (.zip format)</li>
<li><a href="/2011-FOIASetFull.zip">Download the full 2011 FOIA Data set</a> (.zip format)</li>
<li><a href="/2010-FOIASetFull.zip">Download the full 2010 FOIA Data set</a> (.zip format)</li>
<li><a href="/2009-FOIASetFull.zip">Download the full 2009 FOIA Data set</a> (.zip format)</li>
<li><a href="/2008-FOIASetFull.zip">Download the full 2008 FOIA Data set</a> (.zip format)</li>
</ul>
</div>
</div>
);
}

export default withRouter(FoiaDatasetDownload);
41 changes: 41 additions & 0 deletions js/pages/swagger_page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import { withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import SwaggerUI from 'swagger-ui-react';
import SwaggerSpec from '../../swagger.json';

function handleResponse(response) {
if (response.status !== 200) {
if (response.body.error.code === 'API_KEY_MISSING') {
// eslint-disable-next-line no-alert
alert(`API Authorization Required\n${response.body.error.message}`);
}
}
return response;
}

function SwaggerPage(props) {
return (
<div className="usa-grid">
<div className="usa-width-one-whole">
<SwaggerUI
responseInterceptor={handleResponse}
spec={SwaggerSpec}
displayRequestDuration
syntaxHighlight
persistAuthorization
tryItOutEnabled
deepLinking
history={props.history}
supportedSubmitMethods={['get', 'options', 'head', 'patch', 'trace']}
/>
</div>
</div>
);
}

SwaggerPage.propTypes = {
history: PropTypes.object.isRequired,
};

export default withRouter(SwaggerPage);
15 changes: 15 additions & 0 deletions js/swagger.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Router } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import SwaggerPage from './pages/swagger_page';

const history = createBrowserHistory();
history.push('/swagger.html');
render(
<Router history={history}>
<SwaggerPage />
</Router>,
document.getElementById('swagger-api-react-app'),
);
Loading

0 comments on commit be50785

Please sign in to comment.