...
The remainder of this document will walk through the process of creating and configuring a portal.
Table of Contents | ||
---|---|---|
|
We're here to help, and we want to understand community needs so we can refine our features. Email Chris Lynnes Valerie Dixon (christophervalerie.sdixon@nasa.lynnes@nasa.gov) to to get started with your portal and get in touch with developers.
...
Important: The workflow for configuring portals is geared toward teams who have familiarity with basic development tools such as git. If this is not the case for you, please reach out to us and let us know; we may be able to assist you with basic configuration.
...
To provide us configuration most efficiently, you will need to fork our GitHub repository.
Clone the code from your fork and follow the README to get a local instance of Earthdata Search set up.
...
To create your portal you will need to create a new directory in "/portals" with a unique name you want as your portal identifier, for this example we will use "example". You then will create the config.json file ("/portals/example/config.json").
A significant amount of configuration can be done through the /config/portals.yml file which also contains examples of existing portalsthis config.json file. You can view an example configuration at https://github.com/nasa/earthdata-search/blob/main/portals/default/config.json or browse https://github.com/nasa/earthdata-search/tree/main/portals to see all portal configurations. Here is an explanation of the configuration:
Key | Data Type |
---|
Explanation |
---|
portals: &portals
example:
The unique identifier for your portal. The main place this gets used is the URL. In this case, the portal would be reached at https://search.earthdata.nasa.gov/portal/example
. This key cannot change over the lifetime of the portal without impacting users, their bookmarks, their saved projects, etc.
org: My DAAC
title: Config Example
params:
tag-key:
- org.example.portal
features | Object | Feature configuration |
advancedSearch | Boolean | Enable/disable the advanced search feature |
authentication | Boolean | Enable/disable all features that rely on authentication (logging in/projects). NOTE: Setting to false will disable all features that rely on authentication. By default this is set to true so if you want authentication behind your portal enabled just do not include this key in your config.json |
featureFacets | Object | Feature Facet configuration |
showAvailableFromAwsCloud | Boolean | Show/hide the Available from AWS Cloud feature facet |
showCustomizable | Boolean | Show/hide the Customizable feature facet |
showMapImagery | Boolean | Show/hide the Map Imagery feature facet |
footer | Object | Footer configuration |
attributionText | String | Text to display in the footer, example "NASA Official: ..." |
displayVersion | Boolean | Display the current application version in the footer |
primaryLinks | Array | Array of links to display on the left side of the footer This array is made up of objects with two values: { |
secondaryLinks | Array | Array of links to display on the right side of the footer. This uses the same objects as `primaryLinks` |
moreInfoUrl | String (Optional) | This is the URL that users will be sent to when clicking on the logo image. If no value is provided clicking on the logo image will return the user to the EDSC portal home (/portal/example/search). |
pageTitle | String | This will appear after the default portal's `pageTitle` in the HTML page title (see in the tab of the browser). For example if EDSC is the default portal then the page title will be "Earthdata Search :: <pageTitle> | Earthdata Search" |
parentConfig | String | The parent config file for this portal. If your portal will be deployed to EOSDIS Earthdata Search this value should be "edsc". If not, set this to "default". |
portalBrowser | Boolean | Toggle to set whether the portal will appear as a listed portal in the portal browser modal |
query | Object (Optional) | These parameters are used to filter the list of collections exposed in the portal. Current supported values:
One common pattern is to show all the datasets in a dataCenter. This example shows the ORNL DAAC portal configuration: "query": { Likewise, for Science Project-focused portals, here is the AIRMOSS project portal: "query": { A more nuanced approach can be applied using tags in CMR. Here is an example from the Suborbital portal using the tagKey parameter (note that the tagKey can contain simple wildcards): "query": { If you need support of another CMR query parameter, please contact us. Refer to the CMR documentation for information on |
parameters: |
logos:
- image: https://example.org/logo.png
link: https://example.org
title: Example Home
Optional. A list of logos to appear to the right of the NASA logo in the upper left of the page. If omitted, no logos will be added.
The "image" and "link" attributes are required for each provided logo. The image attribute is the URL to the logo image, which will appear 50px tall within the portal. The link attribute provides the page to be loaded when the logo is clicked. Other attributes (optional) get placed as attributes on the HTML link, in this case the "title" attribute determines the tooltip provided when users hover over the image.
scripts:
- edsc-portal.example.min.js
Portals allow authors to provide scripts to run on each page within the portal. These scripts can be useful for altering the page style, hiding unnecessary features, or adding new features that do not make sense for inclusion in Earthdata Search. You can do essentially anything that can be done with Javascript, including loading stylesheets. The scripts are placed at the bottom of the <head> element, after all other site scripts, so all site APIs are available at the time of script execution, but the DOM will not yet have been loaded.
Two examples of these scripts may be helpful to authors:
If you are authoring something complex or if you have needs that you feel would be better addressed at the basic configuration level, please reach out to our developers, who Chris Lynnes (christopher.s.lynnes@nasa.gov) can put you in touch with.
Scripts must output a file called edsc-portal.*.js to the project's edsc/dist directory when the EDSC build process runs `rake assets:precompile`. Though there are many ways to accomplish this, the most straightforward / well-integrated is as follows:
cp -R edsc/portals/example edsc/portals/your-portal-name
"edsc-portal.your-portal-name": "./edsc/portals/ornl/src/js/edsc-portal.your-portal-name.jsx"
title | Object | Object containing the primary and secondary title for the portal. |
primary | String | The primary field in the title object will be displayed on the portal browser modal as the top identifier. It will also be displayed on the top left portal browser context sidebar header and on the leave portal button on the bottom of the collection search results while inside of a portal. |
secondary | String | The secondary field in the title object will be displayed below the primary on the portal browser modal and in parentheses on the top left portal browser context sidebar header. It is meant to be the fullname of the project, endeavor, organization behind the creation of the portal. |
ui | Object | UI configurations |
showNonEosdisCheckbox | Boolean | |
showOnlyGranulesCheckbox | Boolean | Show/hide the " |
showTophat | Boolean | Show/hide Tophat (Note: This field is used only for the defaultPortal in the deployed environment for EDSC, as such new portals cannot hide this UI field in the deployed env. It can however, be changed locally if you set the defaultPortal to the created portal in overrideStatic.config.json) |
`
Portals inherit configuration values from a parent configuration. See the "parentConfig" value above. This allows you to use all of a parent's config values and keep your portal configuration minimal if your portal needs most of the same features as the parent configuration.
To add a new logo image, which are displayed in the left toolbar to establish the search context or on the the portal browser modal (optionally. see portalBrowser boolean config field).
Save your image into the ./portals/myportal/images/ directory and name this file logo.png
In the /portals directories you will need to add the name of your portal to the portals list in the index.js file. The string you enter should be the same as the name of the directory for your portal. Portals should be added in alphabetical order.
portals [
'above',
...
'your-portal-example'
]
When you have made and tested your changes, push them to your forked copy of the Earthdata Search repository and issue a pull request into the main repository using the pull request template. Our developers will review and incorporate the changes as soon as possible.
...
...