Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

prevent MODIS CR smart handoffs; feedback modals

Jason Kent11a221faedac
diff --git a/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_Bands721.json b/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_Bands721.json
index fad6f0d97..0a9baf360 100644
--- a/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_Bands721.json
+++ b/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_Bands721.json
@@ -14,7 +14,8 @@
],
"daynight": [
"day"
- ]
+ ],
+ "disableSmartHandoff": true
}
}
}
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_TrueColor.json b/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_TrueColor.json
index f02196fb7..26c2b4c69 100644
--- a/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_TrueColor.json
+++ b/config/default/common/config/wv.json/layers/modis/aqua/MODIS_Aqua_CorrectedReflectance_TrueColor.json
@@ -19,7 +19,8 @@
},
"daynight": [
"day"
- ]
+ ],
+ "disableSmartHandoff": true
}
}
}
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands367.json b/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands367.json
index b9b9feaea..8e5df87b5 100644
--- a/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands367.json
+++ b/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands367.json
@@ -14,7 +14,8 @@
"daynight": [
"day"
],
- "layergroup": "Corrected Reflectance"
+ "layergroup": "Corrected Reflectance",
+ "disableSmartHandoff": true
}
}
}
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands721.json b/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands721.json
index 679ec08d9..6f9222c0e 100644
--- a/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands721.json
+++ b/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_Bands721.json
@@ -14,7 +14,8 @@
"daynight": [
"day"
],
- "layergroup": "Corrected Reflectance"
+ "layergroup": "Corrected Reflectance",
+ "disableSmartHandoff": true
}
}
}
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_TrueColor.json b/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_TrueColor.json
index fb24d5906..6deb35530 100644
--- a/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_TrueColor.json
+++ b/config/default/common/config/wv.json/layers/modis/terra/MODIS_Terra_CorrectedReflectance_TrueColor.json
@@ -19,7 +19,8 @@
"daynight": [
"day"
],
- "layergroup": "Corrected Reflectance"
+ "layergroup": "Corrected Reflectance",
+ "disableSmartHandoff": true
}
}
}
\ No newline at end of file
diff --git a/web/css/smart-handoff.css b/web/css/smart-handoff.css
index 856dbbb2e..96f5763c2 100644
--- a/web/css/smart-handoff.css
+++ b/web/css/smart-handoff.css
@@ -42,8 +42,9 @@
}
.esd-notification {
display: block;
- margin: 15px 20px;
- font-size: 11px;
+ margin: 15px 5px;
+ font-size: 12px;
+ line-height: 14px;
text-align: center;
color: #fff;
}
@@ -97,13 +98,14 @@ label[for='chk-crop-toggle'] span {
margin: 15px auto;
margin-bottom: 0;
}
-.granule-help-link {
- color: #7bf !important;
-}
-.granule-help-link:hover {
- color: #9df !important;
- cursor: pointer;
+.help-link, a.help-link {
+ color: #007bff !important;
+ &:hover {
+ color: #7bf !important;
+ cursor: pointer;
+ }
}
+
.granule-count span {
color: #fff;
font-size: 16px;
diff --git a/web/js/components/smart-handoffs/smart-handoff-not-available-modal.js b/web/js/components/smart-handoffs/smart-handoff-not-available-modal.js
new file mode 100644
index 000000000..7c67380b4
--- /dev/null
+++ b/web/js/components/smart-handoffs/smart-handoff-not-available-modal.js
@@ -0,0 +1,24 @@
+import React from 'react';
+
+export default function SmartHandoffNotAvailableModal() {
+ return (
+ <div className="basic-modal">
+ <h1>Why are some layers not available for download?</h1>
+ <p>
+ Some layers in Worldview do not have corresponding source data products available for download.
+ These include National Boundaries, Orbit Tracks, Earth at Night, and MODIS Corrected Reflectance products.
+ </p>
+ <p>
+ For a downloadable product similar to MODIS Corrected Reflectance,
+ please try the MODIS Land Surface Reflectance layers available in Worldview.
+ If you would like to generate MODIS Corrected Reflectance imagery yourself, please &nbsp;
+ <a href="https://earthdata.nasa.gov/sites/default/files/field/document/MODIS_True_Color.pdf" target="_blank" rel="noreferrer">
+ see this document
+ </a>
+ </p>
+ <p>
+ If you would like to download only an image, please use the “camera” icon in the upper right.
+ </p>
+ </div>
+ );
+}
diff --git a/web/js/containers/sidebar/smart-handoff.js b/web/js/containers/sidebar/smart-handoff.js
index 4e1a44bb0..003b84c20 100644
--- a/web/js/containers/sidebar/smart-handoff.js
+++ b/web/js/containers/sidebar/smart-handoff.js
@@ -7,11 +7,12 @@ import googleTagManager from 'googleTagManager';
import moment from 'moment';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { UncontrolledTooltip } from 'reactstrap';
-import SmartHandoffModal from '../../components/smart-handoffs/smart-handoff-modal';
import Button from '../../components/util/button';
import Checkbox from '../../components/util/checkbox';
import Crop from '../../components/util/image-crop';
import util from '../../util/util';
+import SmartHandoffModal from '../../components/smart-handoffs/smart-handoff-modal';
+import SmartHandoffNotAvailableModal from '../../components/smart-handoffs/smart-handoff-not-available-modal';
import GranuleAlertModalBody from '../../components/smart-handoffs/smart-handoff-granule-alert';
import { imageUtilGetCoordsFromPixelValues } from '../../modules/image-download/util';
import { onClose, openCustomContent } from '../../modules/modal/actions';
@@ -465,7 +466,7 @@ class SmartHandoff extends Component {
{ isSearchingForGranules && (
<span className="loading-granule-count fade-in constant-width" />
)}
- <span className="granule-help-link" onClick={() => showGranuleHelpModal()}>
+ <span className="help-link" onClick={showGranuleHelpModal}>
<FontAwesomeIcon icon="question-circle" />
</span>
</h1>
@@ -476,24 +477,22 @@ class SmartHandoff extends Component {
/**
* Render "no layers to download" message
*/
- renderNoLayersToDownload = () => (
- <div className="smart-handoff-side-panel">
- <h1>
- None of your currently listed layers are available for downloading.
- </h1>
- <hr />
- <h2>Why are my current layers not available?</h2>
- <p>
- Some layers in Worldview do not have corresponding source data products available for download.
- </p>
- <p>
- These include National Boundaries, Orbit Tracks, Earth at Night, and MODIS Corrected Reflectance products.
- </p>
- <p>
- If you would like to download only an image, please use the “camera” icon in the upper right.
- </p>
- </div>
- )
+ renderNoLayersToDownload = () => {
+ const { showNotAvailableModal } = this.props;
+ return (
+ <div className="smart-handoff-side-panel">
+ <h1>
+ None of your current layers are available for download.
+ </h1>
+ <hr />
+ <h2>
+ <a href className="help-link" onClick={showNotAvailableModal}>
+ Why are my layers not available?
+ </a>
+ </h2>
+ </div>
+ );
+ }
/**
* Default render which displays the download panel
@@ -502,6 +501,7 @@ class SmartHandoff extends Component {
const {
activeLayers,
isActive,
+ showNotAvailableModal,
} = this.props;
const {
selectedLayer,
@@ -520,12 +520,14 @@ class SmartHandoff extends Component {
return (
<div className="smart-handoff-side-panel">
- <h1>Select an available layer to download:</h1>
<div className="esd-notification">
Downloading data will be performed using
<a href="https://search.earthdata.nasa.gov" target="_blank" rel="noopener noreferrer"> NASA&apos;s Earthdata Search </a>
application.
</div>
+ <a href className="help-link" onClick={showNotAvailableModal}>
+ Why are some layers not available?
+ </a>
<hr />
{this.renderLayerChoices()}
<hr />
@@ -556,6 +558,7 @@ SmartHandoff.propTypes = {
selectedDate: PropTypes.string,
showWarningModal: PropTypes.func,
showGranuleHelpModal: PropTypes.func,
+ showNotAvailableModal: PropTypes.func,
};
/**
@@ -579,9 +582,10 @@ const mapStateToProps = (state) => {
const selectedDate = getSelectedDate(state);
const selectedDateFormatted = moment.utc(selectedDate).format('YYYY-MM-DD'); // 2020-01-01
const displayDate = moment.utc(selectedDate).format('YYYY MMM DD'); // 2020 JAN 01
+ const filterForSmartHandoff = ({ projections, disableSmartHandoff }) => projections[proj.id] && !disableSmartHandoff;
return {
- activeLayers: getActiveLayers(state).filter((layer) => layer.projections[proj.id]),
+ activeLayers: getActiveLayers(state).filter(filterForSmartHandoff),
displayDate,
map,
proj: proj.selected,
@@ -611,7 +615,17 @@ const mapDispatchToProps = (dispatch) => ({
selectedCollection,
continueToEDS,
},
- size: 'lg',
+ size: 'md',
+ }),
+ );
+ },
+ showNotAvailableModal: () => {
+ dispatch(
+ openCustomContent('layers-not-available', {
+ desktopOnly: true,
+ headerText: 'Layer Download Availability',
+ bodyComponent: SmartHandoffNotAvailableModal,
+ size: 'md',
}),
);
},
@@ -624,7 +638,7 @@ const mapDispatchToProps = (dispatch) => ({
desktopOnly: true,
headerText: 'Granule Availablilty',
bodyComponent: GranuleAlertModalBody,
- size: 'lg',
+ size: 'md',
}),
);
},