Purpose

This document describes the following:

  • Rationale for modifying the ECHO forms.
  • Instructions for rendering spatial subset fields read-only.

Table of Contents

Premise

These changes were requested by NSIDC and LPDAAC to reduce the number of failed requests that enter the system. On the front page of Earthdata Search Client, if an end user searches for granules using a bounding rectangle, the coordinates of that rectangle will be pre-populated into any ECHO form loaded in that user's same session. Applying a read-only attribute to the spatial subset fields prevents the user from modifying the pre-populated values, thus guaranteeing that a valid spatial subset will be submitted with the request. For any collection to which the following fixes have been applied, the resulting behavior will force users to specify a spatial subset by searching for granules using the bounding search rectangle; they will not be able to edit the bounding box in the form itself.

Tickets

Key Summary Created Updated Due Status
Loading...
Refresh

Instructions

Locate ECHO Form XML in MMT

To locate the ECHO form XML document in the Metadata Management Tool (MMT):

  1. Visit mmt.uat.earthdata.nasa.gov or mmt.earthdata.nasa.gov for the UAT or production environments, respectively.
  2. In MMT, choose your provider (probably <DAAC_NAME> or <DAAC_NAME>_<MODE>, ex. NSIDC_TS1).
  3. Choose Manage CMR.
  4. Under the Service Management panel, choose View Service Options.
  5. The target form XML document will most likely be named <SHORTNAME.VERSIONID> ESI Service.
  6. Once located, choose Edit, under the Actions column.
Expected Results


Edit the ECHO form XML document

Add Explanation Text

  1. In the form editing panel, navigate to the following element of the XML document:

    /form/model/instance/ecs:request

  2. On the line below <ecs:REQUEST_MODE>, insert this element:

    <ecs:BBOX_EDIT_DISABLED_MSG>Bounding coordinates for spatial subsetting must match the rectangle entered to filter granules on the previous map page. If you wish to modify these coordinates, please go back to the previous page and select the rectangle option under the spatial filter icon.</ecs:BBOX_EDIT_DISABLED_MSG>

    (You may modify the text inside this new element as desired.)

  3. For each processing service configured for the target collection, there is an element in the data model, <ecs:<SERVICE_NAME>-request> and multiple corresponding <group> elements in the user interface section of the form. For example, the interface for spatial subsetting is configured by the section:

    /form/ui/group[id="<SERVICE_NAME>-spatial"]/group[id="<SERVICE_NAME>-NWESBoundingBox"]

    1. Inside the group, add the following XML snippet as the last item in the group, substituting <SERVICE_NAME> appropriately:

      <output ref="../../../ecs:BBOX_EDIT_DISABLED_MSG" type="xsd:string" relevant="../../../ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and ../../ecs:spatial_subset_flag='true'"/>

Expected Results

.

.

.

<model> <instance> <ecs:request xmlns:ecs="http://ecs.nasa.gov/options"> <!--NOTE: elements in caps losely match the ESI API, those in lowercase are helper elements --> <ecs:requestInfo> <ecs:email /> </ecs:requestInfo> <!--Dataset ID will be injected by Reverb--> <ecs:CLIENT>ESI</ecs:CLIENT> <!--First SubsetAgent in the input capabilities XML is used as the default.--> <ecs:SUBAGENT_ID> <ecs:value>HEG</ecs:value> </ecs:SUBAGENT_ID> <!-- hardcode to async for Reverb services --> <ecs:REQUEST_MODE>async</ecs:REQUEST_MODE>
<ecs:BBOX_EDIT_DISABLED>Bounding coordinates for spatial subsetting must match the rectangle entered to filter granules on the previous map page. If you wish to modify these coordinates, please go back to the previous page and select the rectangle option under the spatial filter icon.</ecs:BBOX_EDIT_DISABLED>
<ecs:SPATIAL_MSG>Click the checkbox to enable spatial subsetting.</ecs:SPATIAL_MSG>
<ecs:NO_PROJ_MSG>No projection options available with current selection.</ecs:NO_PROJ_MSG>

.

.

.

Mark Spatial Subset Fields Read-Only

  1. Inside the same <group> element where the output message was placed, there will be 4 different input fields, each corresponding to one of the cardinal directions used to define the bounding box. For example:

    <input label="South" ref="ecs:lrlat" relevant="../../../ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and ../../ecs:spatial_subset_flag='true'" required="true()" type="xsd:double">

    1. In the declaration of the <input> element–inside the tag markers (<>)–there are 3 attributes defined: relevant, required, and type. Add the following attribute to each input element:

      readonly='true'

      This will render the input fields as read-only objects in Earthdata Search Client.

  2. Submit the form changes.
Expected Results

<input label="South" ref="ecs:lrlat" relevant="../../../ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and ../../ecs:spatial_subset_flag='true'" required="true()" type="xsd:double" readonly='true'>

Using Customized XSLT Stylesheets

This section describes the process of swapping a baseline version of the XSLT with a customized version.

Requirements

CM privileges required in the target mode.

Steps

  1. Open a terminal session on the *5dpl01* machine.
  2. Navigate to /usr/ecs/<MODE>/CUSTOM/WWW/DPL/esi/WEB-INF.
  3. There, backup the ECHOFormsGenerator.xsl file: mv ECHOFormsGenerator.xsl ECHOFormsGenerator.xsl.orig_20180928
  4. Then copy the customized XSL document to this directory: cp <CUSTOM_XML_FILE> ECHOFormsGenerator.xsl



Expected Results

f5dpl01{cmdev06}50: ls -l

total 300

-rw-r--r-- 1 cmdev06 cmdev06 133772 Sep 28 11:34 ECHOFormsGenerator.xsl

-rw-r--r-- 1 cmdev06 cmdev06 132789 Dec 20  2017 ECHOFormsGenerator.xsl.orig

-rw-r--r-- 1 cmdev06 cmdev06 2369 Aug 25 2011 ESIAgentResponse.xsl

-rw-r--r-- 1 cmdev06 cmdev06 11596 Apr 9 2015 ProcessingRequestForm.xsl

drwxr-xr-x 3 cmdev06 cmdev06 4096 Aug 31 02:56 classes

drwxr-xr-x 2 cmdev06 cmdev06 4096 Aug 31 02:56 lib

-rwxr-xr-x 1 cmdev06 cmdev06 968 Aug 31 15:00 web.xml



Verification

Expected Results

If updating a form directly in CMR, the changes should be immediately visible in Earthdata Search Client, once submitted.

If using a customized XSLT, then upload order and service forms using the DataAccess GUI or FormUpload.rb in the target mode.

If changes are not immediately visible, wait for the beginning of the next hour, as CMR may have a backlog of updates to process.

ECHO Form Rendering

When input fields are marked read-only, the border of the field will appear to be faded and the cursor will not change on mouse-over.

Screen Shot 2018-08-03 at 12.37.29 PM.png

2 Comments

  1. I mentioned during the ICESAT2 tag up yesterday that I made a minor change to one of the XML elements that otherwise caused an error when trying to update a form. 

    The change was made to the element that displays BBOX_EDIT_DISABLED_MSG:

    original:

    <output ref="../../../ecs:BBOX_EDIT_DISABLED_MSG" relevant="../../../ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and ../../ecs:spatial_subset_flag='true'"/>

    modified:

    <output ref="//ecs:BBOX_EDIT_DISABLED_MSG" relevant="//ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and //ecs:spatial_subset_flag='true'" type="xsd:string"/>


    Using the original XML element caused the following error when trying to update the form:

    Component ref's must point to an existing part of the instance. ref xpath: [../../../ecs:BBOX_EDIT_DISABLED_MSG] control id: [null] 

    Also, if the type="xsd:string" attribute is left out, I get the following error message:

    attribute type is required
    1. user-01f8a

      Hello, Mike–I apologize for the errors in the instructions.

      • I have updated Step 3 of "Update the ECHO form XML Document" as follows:
        1. /form/ui/group[id="<SERVICE_NAME>-spatial"] => /form/ui/group[id="<SERVICE_NAME>-spatial"]/group[id="<SERVICE_NAME>-NWESBoundingBox"]
        2. <output ref="../../../ecs:BBOX_EDIT_DISABLED_MSG" relevant="../../../ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and ../../ecs:spatial_subset_flag='true'"/> => <output ref="../../../ecs:BBOX_EDIT_DISABLED_MSG" type="xsd:string" relevant="../../../ecs:SUBAGENT_ID/ecs:value='<SERVICE_NAME>' and ../../ecs:spatial_subset_flag='true'"/>
      • Using the ../ references in the output element is recommended because if a user switches service agents, the // notation may cause conflicts. Placing the statement one level lower should resolve the ref's error.