Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing #1159 #1235

14 changes: 9 additions & 5 deletions dev.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Content-Security-Policy connect-src:
- https://*.mapbox.com for COVID-19 Dashboard maps
- https://opendata.datacommons.io (Prod) and https://static.planx-pla.net (QA) to fetch COVID-19 Dashboard data
frame-src:
- https://auspice.planx-pla.net and https://auspice.pandemicresponsecommons.org for COVID-19 Auspice app in iframe
- https://atlas-qa-mickey.planx-pla.net for Atlas iframe in VHDC qa-mickey
- https://*.quicksight.aws.amazon.com for loading AWS Quicksight dashboards into COVID-19 Home page
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://login.bionimbus.org https://wayf.incommonfederation.org; child-src blob:; connect-src 'self' blob: localhost https://localhost:9443 wss://localhost:9443 https://*.s3.amazonaws.com https://*.mapbox.com https://opendata.datacommons.io https://static.planx-pla.net https://*.logs.datadoghq.com https://clinicaltrials.gov https://*.google-analytics.com https://*.analytics.google.com; img-src 'self' https://opendata.datacommons.io https://static.planx-pla.net https://www.google-analytics.com data: https://*.s3.amazonaws.com https://www.google-analytics.com; script-src 'self' 'unsafe-eval' https://*.google-analytics.com https://www.googletagmanager.com localhost https://localhost:9443; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com localhost https://localhost:9443; object-src 'none'; font-src 'self' data: https://fonts.googleapis.com https://fonts.gstatic.com; frame-src 'self' https://auspice.planx-pla.net https://auspice.pandemicresponsecommons.org https://atlas-qa-mickey.planx-pla.net;">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://login.bionimbus.org https://wayf.incommonfederation.org; child-src blob:; connect-src 'self' blob: localhost https://localhost:9443 wss://localhost:9443 https://*.s3.amazonaws.com https://*.mapbox.com https://opendata.datacommons.io https://static.planx-pla.net https://*.logs.datadoghq.com https://clinicaltrials.gov https://*.google-analytics.com https://*.analytics.google.com; img-src 'self' https://opendata.datacommons.io https://static.planx-pla.net https://www.google-analytics.com data: https://*.s3.amazonaws.com https://www.google-analytics.com; script-src 'self' 'unsafe-eval' https://*.google-analytics.com https://www.googletagmanager.com localhost https://localhost:9443; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com localhost https://localhost:9443; object-src 'none'; font-src 'self' data: https://fonts.googleapis.com https://fonts.gstatic.com; frame-src 'self' https://auspice.planx-pla.net https://auspice.pandemicresponsecommons.org https://atlas-qa-mickey.planx-pla.net https://*.quicksight.aws.amazon.com; ">
<meta name="viewport" content="width=device-width" />
<link href="https://fonts.googleapis.com/icon?family=Source+Sans+Pro" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Martel:wght@400;700&display=swap" rel="stylesheet">
<title>Generic Data Commons</title>

</head>
<body>
</head>

<body>
<div id="root"></div>
<div id="append-root" class="spacer"></div>
<script type="text/javascript" src="/boot.js" basename=""></script>
</body>
</body>

</html>
44 changes: 43 additions & 1 deletion src/Covid19Dashboard/Covid19Dashboard.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
color: var(--primary-color);
}

.covid19-dashboard_panel {
.covid19-dashboard_panel, .gen3-dashboard_panel{
background-color: #fff;
}

Expand Down Expand Up @@ -152,3 +152,45 @@
.overlays .spinner__svg {
fill: #fff;
}


//Styling for Gen3 Dashboard

.gen3-dashboard_container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}


.gen3-dashboard_row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}

.gen3-dashboard_col {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
float: left;
width: 50%;
height: 50vh;
}

.gen3-dashboard_frame {
min-height: 100%;
max-height: 100%;
min-width: 100%;
max-width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
29 changes: 29 additions & 0 deletions src/Covid19Dashboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class Covid19Dashboard extends React.Component {
<Tabs>
<TabList className='covid19-dashboard_tablist'>
<Tab>COVID-19 in Illinois</Tab>
<Tab>COVID-19 Community Analysis</Tab>
<Tab>IL SARS-CoV2 Genomics</Tab>
</TabList>

Expand Down Expand Up @@ -272,6 +273,33 @@ class Covid19Dashboard extends React.Component {
)}
</div>
</TabPanel>
<TabPanel className='gen3-dashboard_panel'>
<div className='gen3-dashboard_quicksight'>
{/* this component doesn't need the mapboxAPIToken but it's a way to make
sure this is the COVID19 Commons and the iframe contents will load */}
{ mapboxAPIToken
&& (
<div className="gen3-dashboard_container">
<div className="gen3-dashboard_row">
<div className="gen3-dashboard_col">
<iframe className="gen3-dashboard_frame" src="https://us-east-1.quicksight.aws.amazon.com/sn/embed/share/accounts/043745044068/dashboards/6652754a-1e60-4aaf-b160-1346cbc5fc66?directory_alias=gen3-dashboards">
</iframe>
</div>
</div>
<div className="gen3-dashboard_row">
<div className="gen3-dashboard_col">
<iframe className="gen3-dashboard_frame" src="https://us-east-1.quicksight.aws.amazon.com/sn/embed/share/accounts/043745044068/dashboards/00227203-5da5-428f-b687-7bb27acd2a99?directory_alias=gen3-dashboards">
</iframe>
</div>
<div className="gen3-dashboard_col">
<iframe className="gen3-dashboard_frame" src="https://us-east-1.quicksight.aws.amazon.com/sn/embed/share/accounts/043745044068/dashboards/3e6cb492-9541-4fec-b440-913135971b4d?directory_alias=gen3-dashboards">
</iframe>
</div>
</div>
</div>
)}
</div>
</TabPanel>
<TabPanel className='covid19-dashboard_panel'>
<div className='covid19-dashboard_auspice'>
{/* this component doesn't need the mapboxAPIToken but it's a way to make
Expand All @@ -287,6 +315,7 @@ class Covid19Dashboard extends React.Component {
)}
</div>
</TabPanel>

</Tabs>
</div>

Expand Down
37 changes: 21 additions & 16 deletions src/index.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Content-Security-Policy connect-src:
- https://*.mapbox.com for COVID-19 Dashboard maps
Expand All @@ -9,30 +10,34 @@
- https://auspice.planx-pla.net and https://auspice.pandemicresponsecommons.org for COVID-19 Auspice app in iframe
script-src:
- https://dap.digitalgov.gov will be inserted by htmlWebpackPlugin if env is configured with DAPTrackingURL. This hostname is needed for fetching and executing the DAP tracking script
- https://*.quicksight.aws.amazon.com for loading AWS Quicksight dashboards into COVID-19 Home page
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://login.bionimbus.org https://wayf.incommonfederation.org; child-src blob:; img-src 'self' <%= htmlWebpackPlugin.options.imgSrc %> https://opendata.datacommons.io https://static.planx-pla.net data: https://*.s3.amazonaws.com blob:; script-src 'self' 'unsafe-eval' <%= htmlWebpackPlugin.options.scriptSrc %>; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; object-src 'none'; font-src 'self' data: https://fonts.googleapis.com https://fonts.gstatic.com; connect-src 'self' https://login.bionimbus.org https://wayf.incommonfederation.org https://opendata.datacommons.io https://static.planx-pla.net <%= htmlWebpackPlugin.options.connectSrc %>; frame-src <%= htmlWebpackPlugin.options.connectSrc %> 'self' https://auspice.planx-pla.net https://auspice.pandemicresponsecommons.org;;">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://login.bionimbus.org https://wayf.incommonfederation.org; child-src blob:; img-src 'self' <%= htmlWebpackPlugin.options.imgSrc %> https://opendata.datacommons.io https://static.planx-pla.net data: https://*.s3.amazonaws.com blob:; script-src 'self' 'unsafe-eval' <%= htmlWebpackPlugin.options.scriptSrc %>; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; object-src 'none'; font-src 'self' data: https://fonts.googleapis.com https://fonts.gstatic.com; connect-src 'self' https://login.bionimbus.org https://wayf.incommonfederation.org https://opendata.datacommons.io https://static.planx-pla.net <%= htmlWebpackPlugin.options.connectSrc %>; frame-src <%= htmlWebpackPlugin.options.connectSrc %> 'self' https://auspice.planx-pla.net https://auspice.pandemicresponsecommons.org https://*.quicksight.aws.amazon.com;">
<meta name="viewport" content="width=device-width" />
<link href="https://fonts.googleapis.com/icon?family=Source+Sans+Pro" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Martel:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet/less" type="text/css" media="all" href="<%= htmlWebpackPlugin.options.basename %>/node_modules/@gen3/ui-component/dist/css/base.less">
<link rel="stylesheet" type="text/css" media="all" href="<%= htmlWebpackPlugin.options.basename %>/src/css/graphiql.css" />
<link rel="icon"
type="image/png" href="<%= htmlWebpackPlugin.options.basename %>/src/img/favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="icon" type="image/png" href="<%= htmlWebpackPlugin.options.basename %>/src/img/favicon.ico">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<% if(htmlWebpackPlugin.options.metaDescription) { %>
<meta name="description" content="<%= htmlWebpackPlugin.options.metaDescription %>" />
<% } %>
<% if(htmlWebpackPlugin.options.dapURL) { %>
<!-- We participate in the US government's analytics program. See the data at analytics.usa.gov. -->
<script async type="text/javascript" src="<%= htmlWebpackPlugin.options.dapURL %>" id="_fed_an_ua_tag"></script>
<% } %>
</script>
</head>
<body>
<meta name="description" content="<%= htmlWebpackPlugin.options.metaDescription %>" />
<% } %>
<% if(htmlWebpackPlugin.options.dapURL) { %>
<!-- We participate in the US government's analytics program. See the data at analytics.usa.gov. -->
<script async type="text/javascript" src="<%= htmlWebpackPlugin.options.dapURL %>" id="_fed_an_ua_tag"></script>
<% } %>
</script>
</head>

<body>
<div id="root"></div>
<link id="gen3-theme-overrides" rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basename %>/src/css/themeoverrides.css"/>
<link id="gen3-theme-overrides" rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basename %>/src/css/themeoverrides.css" />

</body>

</body>
</html>