Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

URS notice only when necessary

Mike McGannaf06c56ba51d
diff --git a/etc/ant/js.build.xml b/etc/ant/js.build.xml
index 844c5022b..ab0cf698b 100644
--- a/etc/ant/js.build.xml
+++ b/etc/ant/js.build.xml
@@ -136,6 +136,7 @@
<file name="js/Worldview/DataDownload/Results/PreferredFilter.js"/>
<file name="js/Worldview/DataDownload/Results/ProductLabel.js"/>
<file name="js/Worldview/DataDownload/Results/TagNRT.js"/>
+ <file name="js/Worldview/DataDownload/Results/TagURS.js"/>
<file name="js/Worldview/DataDownload/Results/TagProduct.js"/>
<file name="js/Worldview/DataDownload/Results/TagList.js"/>
<file name="js/Worldview/DataDownload/Results/TagVersion.js"/>
diff --git a/etc/config/config/products/MOD04_L2.json b/etc/config/config/products/MOD04_L2.json
index 5812aabbb..2d2128d19 100644
--- a/etc/config/config/products/MOD04_L2.json
+++ b/etc/config/config/products/MOD04_L2.json
@@ -9,5 +9,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
diff --git a/etc/config/config/products/MOD05_L2_DAY.json b/etc/config/config/products/MOD05_L2_DAY.json
index 0b3a28cf1..335ce5a2b 100644
--- a/etc/config/config/products/MOD05_L2_DAY.json
+++ b/etc/config/config/products/MOD05_L2_DAY.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD05_L2_NIGHT.json b/etc/config/config/products/MOD05_L2_NIGHT.json
index 8eb3263b8..0a2b3cc4d 100644
--- a/etc/config/config/products/MOD05_L2_NIGHT.json
+++ b/etc/config/config/products/MOD05_L2_NIGHT.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD06_L2_DAY.json b/etc/config/config/products/MOD06_L2_DAY.json
index 40b8b0546..8ae253561 100644
--- a/etc/config/config/products/MOD06_L2_DAY.json
+++ b/etc/config/config/products/MOD06_L2_DAY.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD06_L2_NIGHT.json b/etc/config/config/products/MOD06_L2_NIGHT.json
index a40d59ec3..cbb8e3aa0 100644
--- a/etc/config/config/products/MOD06_L2_NIGHT.json
+++ b/etc/config/config/products/MOD06_L2_NIGHT.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD09GA.json b/etc/config/config/products/MOD09GA.json
index 6dea03453..2f60a2ccd 100644
--- a/etc/config/config/products/MOD09GA.json
+++ b/etc/config/config/products/MOD09GA.json
@@ -5,7 +5,7 @@
"science": {
"shortName": "MOD09GA",
"dataCenterId": "LPDAAC_ECS"
- },
+ },
"nrt": {
"shortName": "MOD09",
"dataCenterId": "LANCEMODIS"
@@ -19,5 +19,10 @@
},
"science": {
"handler": "MODISGrid"
- }
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
+ }
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD09GQ.json b/etc/config/config/products/MOD09GQ.json
index 43937eaa1..5f4ca61cf 100644
--- a/etc/config/config/products/MOD09GQ.json
+++ b/etc/config/config/products/MOD09GQ.json
@@ -5,7 +5,7 @@
"science": {
"shortName": "MOD09GQ",
"dataCenterId": "LPDAAC_ECS"
- },
+ },
"nrt": {
"shortName": "MOD09",
"dataCenterId": "LANCEMODIS"
@@ -19,5 +19,10 @@
},
"science": {
"handler": "MODISGrid"
- }
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
+ }
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD10_L2.json b/etc/config/config/products/MOD10_L2.json
index 9b9292944..1f71d62a3 100644
--- a/etc/config/config/products/MOD10_L2.json
+++ b/etc/config/config/products/MOD10_L2.json
@@ -10,6 +10,11 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
diff --git a/etc/config/config/products/MOD11_L2_DAY.json b/etc/config/config/products/MOD11_L2_DAY.json
index 44b011d67..1671772b7 100644
--- a/etc/config/config/products/MOD11_L2_DAY.json
+++ b/etc/config/config/products/MOD11_L2_DAY.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD11_L2_NIGHT.json b/etc/config/config/products/MOD11_L2_NIGHT.json
index 9ef868404..340bc8f44 100644
--- a/etc/config/config/products/MOD11_L2_NIGHT.json
+++ b/etc/config/config/products/MOD11_L2_NIGHT.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD14.json b/etc/config/config/products/MOD14.json
index 1f8962cba..b448c74ad 100644
--- a/etc/config/config/products/MOD14.json
+++ b/etc/config/config/products/MOD14.json
@@ -9,5 +9,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MOD29.json b/etc/config/config/products/MOD29.json
index 22390ca88..d8726ca4c 100644
--- a/etc/config/config/products/MOD29.json
+++ b/etc/config/config/products/MOD29.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD04_L2.json b/etc/config/config/products/MYD04_L2.json
index c9187a153..4ca12e1a5 100644
--- a/etc/config/config/products/MYD04_L2.json
+++ b/etc/config/config/products/MYD04_L2.json
@@ -9,5 +9,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
diff --git a/etc/config/config/products/MYD05_L2_DAY.json b/etc/config/config/products/MYD05_L2_DAY.json
index a5bce625b..c1d4c7a3f 100644
--- a/etc/config/config/products/MYD05_L2_DAY.json
+++ b/etc/config/config/products/MYD05_L2_DAY.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD05_L2_NIGHT.json b/etc/config/config/products/MYD05_L2_NIGHT.json
index caa21bd37..40fcb2707 100644
--- a/etc/config/config/products/MYD05_L2_NIGHT.json
+++ b/etc/config/config/products/MYD05_L2_NIGHT.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD06_L2_DAY.json b/etc/config/config/products/MYD06_L2_DAY.json
index d2bd6ff27..f89f62e0d 100644
--- a/etc/config/config/products/MYD06_L2_DAY.json
+++ b/etc/config/config/products/MYD06_L2_DAY.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD06_L2_NIGHT.json b/etc/config/config/products/MYD06_L2_NIGHT.json
index f95a85c93..519d37d62 100644
--- a/etc/config/config/products/MYD06_L2_NIGHT.json
+++ b/etc/config/config/products/MYD06_L2_NIGHT.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD09GA.json b/etc/config/config/products/MYD09GA.json
index 2345f32da..effcc8132 100644
--- a/etc/config/config/products/MYD09GA.json
+++ b/etc/config/config/products/MYD09GA.json
@@ -4,7 +4,7 @@
"query": {
"science": {
"shortName": "MYD09GA",
- "dataCenterId": "LPDAAC_ECS"
+ "dataCenterId": "LPDAAC_ECS"
},
"nrt": {
"shortName": "MYD09",
@@ -16,8 +16,13 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
- },
+ },
"science": {
"handler": "MODISGrid"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD09GQ.json b/etc/config/config/products/MYD09GQ.json
index 0e1e5e781..9b5374e77 100644
--- a/etc/config/config/products/MYD09GQ.json
+++ b/etc/config/config/products/MYD09GQ.json
@@ -4,7 +4,7 @@
"query": {
"science": {
"shortName": "MYD09GQ",
- "dataCenterId": "LPDAAC_ECS"
+ "dataCenterId": "LPDAAC_ECS"
},
"nrt": {
"shortName": "MYD09",
@@ -16,8 +16,13 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
- },
+ },
"science": {
"handler": "MODISGrid"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD10_L2.json b/etc/config/config/products/MYD10_L2.json
index 116dc3d77..e8e4b45db 100644
--- a/etc/config/config/products/MYD10_L2.json
+++ b/etc/config/config/products/MYD10_L2.json
@@ -10,6 +10,11 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
diff --git a/etc/config/config/products/MYD11_L2_DAY.json b/etc/config/config/products/MYD11_L2_DAY.json
index eee806aa1..f428220f1 100644
--- a/etc/config/config/products/MYD11_L2_DAY.json
+++ b/etc/config/config/products/MYD11_L2_DAY.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD11_L2_NIGHT.json b/etc/config/config/products/MYD11_L2_NIGHT.json
index cef7a4c2a..9bb9df060 100644
--- a/etc/config/config/products/MYD11_L2_NIGHT.json
+++ b/etc/config/config/products/MYD11_L2_NIGHT.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD14.json b/etc/config/config/products/MYD14.json
index e7204f3e4..60e195490 100644
--- a/etc/config/config/products/MYD14.json
+++ b/etc/config/config/products/MYD14.json
@@ -9,5 +9,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/etc/config/config/products/MYD29.json b/etc/config/config/products/MYD29.json
index fb0b22e22..7b8efcfc8 100644
--- a/etc/config/config/products/MYD29.json
+++ b/etc/config/config/products/MYD29.json
@@ -10,5 +10,10 @@
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
}
\ No newline at end of file
diff --git a/src/data/config.json b/src/data/config.json
index 3285d5bbb..b2dbb4ab8 100644
--- a/src/data/config.json
+++ b/src/data/config.json
@@ -62492,6 +62492,11 @@
"LANCEMODIS"
],
"shortName": "MOD04_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD05_L2_DAY": {
@@ -62509,6 +62514,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MOD05_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD05_L2_NIGHT": {
@@ -62526,6 +62536,11 @@
],
"dayNightFlag": "NIGHT",
"shortName": "MOD05_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD06_L2_DAY": {
@@ -62543,6 +62558,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MOD06_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD06_L2_NIGHT": {
@@ -62560,6 +62580,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MOD06_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD09GA": {
@@ -62583,6 +62608,11 @@
},
"science": {
"handler": "MODISGrid"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD09GQ": {
@@ -62606,6 +62636,11 @@
},
"science": {
"handler": "MODISGrid"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD10_L2": {
@@ -62623,6 +62658,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MOD10_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD11_L2_DAY": {
@@ -62640,6 +62680,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MOD11_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD11_L2_NIGHT": {
@@ -62657,6 +62702,11 @@
],
"dayNightFlag": "NIGHT",
"shortName": "MOD11_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD14": {
@@ -62673,6 +62723,11 @@
"LANCEMODIS"
],
"shortName": "MOD14"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MOD29": {
@@ -62690,6 +62745,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MOD29"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD04_L2": {
@@ -62706,6 +62766,11 @@
"LANCEMODIS"
],
"shortName": "MYD04_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD05_L2_DAY": {
@@ -62723,6 +62788,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MYD05_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD05_L2_NIGHT": {
@@ -62740,6 +62810,11 @@
],
"dayNightFlag": "NIGHT",
"shortName": "MYD05_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD06_L2_DAY": {
@@ -62757,6 +62832,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MYD06_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD06_L2_NIGHT": {
@@ -62774,6 +62854,11 @@
],
"dayNightFlag": "NIGHT",
"shortName": "MYD06_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD09GA": {
@@ -62797,6 +62882,11 @@
},
"science": {
"handler": "MODISGrid"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD09GQ": {
@@ -62820,6 +62910,11 @@
},
"science": {
"handler": "MODISGrid"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD10_L2": {
@@ -62837,6 +62932,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MYD10_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD11_L2_DAY": {
@@ -62854,6 +62954,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MYD11_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD11_L2_NIGHT": {
@@ -62871,6 +62976,11 @@
],
"dayNightFlag": "NIGHT",
"shortName": "MYD11_L2"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD14": {
@@ -62887,6 +62997,11 @@
"LANCEMODIS"
],
"shortName": "MYD14"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"MYD29": {
@@ -62904,6 +63019,11 @@
],
"dayNightFlag": "DAY",
"shortName": "MYD29"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
}
},
"OMAERUV": {
diff --git a/src/index.html b/src/index.html
index bca62f28e..81cac2b06 100644
--- a/src/index.html
+++ b/src/index.html
@@ -204,6 +204,7 @@
<!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TagList.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TagProduct.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TagNRT.js"></script>
+ <!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TagURS.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TagVersion.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TimeFilter.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/Worldview/DataDownload/Results/TimeLabel.js"></script>
diff --git a/src/js/Worldview/DataDownload/DownloadListPanel.js b/src/js/Worldview/DataDownload/DownloadListPanel.js
index 3606e0f6d..d2467c710 100644
--- a/src/js/Worldview/DataDownload/DownloadListPanel.js
+++ b/src/js/Worldview/DataDownload/DownloadListPanel.js
@@ -20,9 +20,9 @@ Worldview.DataDownload.DownloadListPanel = function(config, model) {
"<div id='DataDownload_Notice'>" +
"<img class='icon' src='images/info-icon-blue.svg'>" +
"<p class='text'>" +
- "An account with the EOSDIS User Registration System (URS) " +
- "may be necessary to download data. It is simple and " +
- "free to sign up! " +
+ "Some items you have selected require an account with the " +
+ "EOSDIS User Registration System (URS) to download. " +
+ "It is simple and free to sign up! " +
"<a href='https://earthdata.nasa.gov/urs/register' target='urs'>" +
"Click to register for an account.</a>" +
"</p>" +
@@ -31,10 +31,13 @@ Worldview.DataDownload.DownloadListPanel = function(config, model) {
var panel = null;
var selection;
var self = {};
+ var urs = false;
+
self.events = Worldview.Events();
self.show = function() {
selection = reformatSelection();
+ log.debug("selection", selection);
var newPanel = false;
if ( !panel ) {
newPanel = true;
@@ -80,7 +83,11 @@ Worldview.DataDownload.DownloadListPanel = function(config, model) {
var reformatSelection = function() {
var selection = {};
+ urs = false;
$.each(model.selectedGranules, function(key, granule) {
+ if ( granule.urs ) {
+ urs = true;
+ }
if ( !selection[granule.product] ) {
productConfig = config.products[granule.product];
selection[granule.product] = {
@@ -237,10 +244,11 @@ Worldview.DataDownload.DownloadListPanel = function(config, model) {
"<a class='wget' href='#'>Bulk Download (wget)</a>" +
"</div>";
}
- var elements = [
- NOTICE,
- bulk,
- ];
+ var elements =[];
+ if ( urs ) {
+ elements.push(NOTICE);
+ }
+ elements.push(bulk);
$.each(selection, function(key, product) {
elements.push(productText(product));
});
diff --git a/src/js/Worldview/DataDownload/Handler/CollectionList.js b/src/js/Worldview/DataDownload/Handler/CollectionList.js
index 5753d105d..5698e715c 100644
--- a/src/js/Worldview/DataDownload/Handler/CollectionList.js
+++ b/src/js/Worldview/DataDownload/Handler/CollectionList.js
@@ -1,10 +1,10 @@
/*
* NASA Worldview
- *
+ *
* This code was originally developed at NASA/Goddard Space Flight Center for
- * the Earth Science Data and Information System (ESDIS) project.
+ * the Earth Science Data and Information System (ESDIS) project.
*
- * Copyright (C) 2013 United States Government as represented by the
+ * Copyright (C) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*/
@@ -15,29 +15,30 @@
Worldview.namespace("DataDownload.Handler");
Worldview.DataDownload.Handler.CollectionList = function(config, model, spec) {
-
+
var self = Worldview.DataDownload.Handler.Base(config, model);
-
+
self._submit = function(queryData) {
var queryOptions = {
data: queryData
};
-
+
return self.echo.submit(queryOptions);
};
-
+
self._processResults = function(data) {
var results = {
meta: {},
granules: data
};
-
+
var ns = Worldview.DataDownload;
var productConfig = config.products[model.selectedProduct];
var chain = ns.Results.Chain();
chain.processes = [
ns.Results.TagList(),
ns.Results.TagProduct(model.selectedProduct),
+ ns.Results.TagURS(productConfig.urs),
ns.Results.TagVersion(),
ns.Results.CollectVersions(),
ns.Results.VersionFilter(),
@@ -45,6 +46,6 @@ Worldview.DataDownload.Handler.CollectionList = function(config, model, spec) {
];
return chain.process(results);
};
-
+
return self;
};
\ No newline at end of file
diff --git a/src/js/Worldview/DataDownload/Handler/List.js b/src/js/Worldview/DataDownload/Handler/List.js
index b6089c59e..1201e61de 100644
--- a/src/js/Worldview/DataDownload/Handler/List.js
+++ b/src/js/Worldview/DataDownload/Handler/List.js
@@ -1,10 +1,10 @@
/*
* NASA Worldview
- *
+ *
* This code was originally developed at NASA/Goddard Space Flight Center for
- * the Earth Science Data and Information System (ESDIS) project.
+ * the Earth Science Data and Information System (ESDIS) project.
*
- * Copyright (C) 2013 United States Government as represented by the
+ * Copyright (C) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*/
@@ -15,24 +15,24 @@
Worldview.namespace("DataDownload.Handler");
Worldview.DataDownload.Handler.List = function(config, model, spec) {
-
+
var self = Worldview.DataDownload.Handler.Base(config, model);
-
+
self._submit = function(queryData) {
var queryOptions = {
time: model.time,
data: queryData
};
-
+
return self.echo.submit(queryOptions);
};
-
+
self._processResults = function(data) {
var results = {
meta: {},
granules: data
};
-
+
var ns = Worldview.DataDownload;
var productConfig = config.products[model.selectedProduct];
var chain = ns.Results.Chain();
@@ -40,6 +40,7 @@ Worldview.DataDownload.Handler.List = function(config, model, spec) {
ns.Results.TagList(),
ns.Results.TagProduct(model.selectedProduct),
ns.Results.TagNRT(productConfig.nrt),
+ ns.Results.TagURS(productConfig.urs),
ns.Results.CollectPreferred(model.prefer),
ns.Results.PreferredFilter(model.prefer),
ns.Results.TagVersion(),
@@ -49,6 +50,6 @@ Worldview.DataDownload.Handler.List = function(config, model, spec) {
];
return chain.process(results);
};
-
+
return self;
};
\ No newline at end of file
diff --git a/src/js/Worldview/DataDownload/Handler/MODISGrid.js b/src/js/Worldview/DataDownload/Handler/MODISGrid.js
index f64316755..7a57c511d 100644
--- a/src/js/Worldview/DataDownload/Handler/MODISGrid.js
+++ b/src/js/Worldview/DataDownload/Handler/MODISGrid.js
@@ -1,10 +1,10 @@
/*
* NASA Worldview
- *
+ *
* This code was originally developed at NASA/Goddard Space Flight Center for
- * the Earth Science Data and Information System (ESDIS) project.
+ * the Earth Science Data and Information System (ESDIS) project.
*
- * Copyright (C) 2013 United States Government as represented by the
+ * Copyright (C) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*/
@@ -17,7 +17,7 @@ Worldview.namespace("DataDownload.Handler");
Worldview.DataDownload.Handler.MODISGrid = function(config, model, spec) {
var self = Worldview.DataDownload.Handler.Base(config);
-
+
self._submit = function() {
var crs = model.crs.replace(/:/, "_");
@@ -31,13 +31,13 @@ Worldview.DataDownload.Handler.MODISGrid = function(config, model, spec) {
url: "data/MODIS_Grid." + crs + ".json?v=" + Worldview.BUILD_NONCE,
dataType: "json"
});
-
+
return Worldview.AjaxJoin([
- { item: "granules", promise: granules },
+ { item: "granules", promise: granules },
{ item: "grid", promise: grid }
- ]);
+ ]);
};
-
+
self._processResults = function(data) {
var results = {
meta: {
@@ -45,12 +45,13 @@ Worldview.DataDownload.Handler.MODISGrid = function(config, model, spec) {
},
granules: data.granules
};
-
+
var ns = Worldview.DataDownload;
var chain = ns.Results.Chain();
chain.processes = [
ns.Results.TagProduct(model.selectedProduct),
ns.Results.TagVersion(),
+ ns.Results.TagURS(productConfig.urs),
ns.Results.CollectVersions(),
ns.Results.VersionFilter(),
ns.Results.MODISGridIndex(),
@@ -60,8 +61,8 @@ Worldview.DataDownload.Handler.MODISGrid = function(config, model, spec) {
];
return chain.process(results);
};
-
+
return self;
-
+
};
diff --git a/src/js/Worldview/DataDownload/Handler/MODISSwath.js b/src/js/Worldview/DataDownload/Handler/MODISSwath.js
index 9bfe3e5a5..30bce9837 100644
--- a/src/js/Worldview/DataDownload/Handler/MODISSwath.js
+++ b/src/js/Worldview/DataDownload/Handler/MODISSwath.js
@@ -1,10 +1,10 @@
/*
* NASA Worldview
- *
+ *
* This code was originally developed at NASA/Goddard Space Flight Center for
- * the Earth Science Data and Information System (ESDIS) project.
+ * the Earth Science Data and Information System (ESDIS) project.
*
- * Copyright (C) 2013 United States Government as represented by the
+ * Copyright (C) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*/
@@ -15,24 +15,24 @@
Worldview.namespace("DataDownload.Handler");
Worldview.DataDownload.Handler.MODISSwath = function(config, model, spec) {
-
- var MAX_DISTANCE = 270;
+
+ var MAX_DISTANCE = 270;
var self = Worldview.DataDownload.Handler.Base(config, model);
-
+
var init = function() {
- self.extents[Worldview.Map.CRS_WGS_84] =
+ self.extents[Worldview.Map.CRS_WGS_84] =
Worldview.Map.CRS_WGS_84_QUERY_EXTENT;
};
-
+
self._submit = function(queryData) {
var queryOptions = {
time: model.time,
data: queryData
};
-
+
return self.echo.submit(queryOptions);
};
-
+
self._processResults = function(data) {
var results = {
meta: {},
@@ -41,15 +41,16 @@ Worldview.DataDownload.Handler.MODISSwath = function(config, model, spec) {
if ( model.crs === Worldview.Map.CRS_WGS_84 ) {
results.meta.queryMask = Worldview.Map.CRS_WGS_84_QUERY_MASK;
}
-
+
var ns = Worldview.DataDownload;
var productConfig = config.products[model.selectedProduct];
var chain = ns.Results.Chain();
chain.processes = [
ns.Results.TagProduct(model.selectedProduct),
ns.Results.TagNRT(productConfig.nrt),
+ ns.Results.TagURS(productConfig.urs),
ns.Results.CollectPreferred(model.prefer),
- ns.Results.PreferredFilter(model.prefer),
+ ns.Results.PreferredFilter(model.prefer),
ns.Results.TagVersion(),
ns.Results.CollectVersions(),
ns.Results.VersionFilter(),
@@ -63,7 +64,7 @@ Worldview.DataDownload.Handler.MODISSwath = function(config, model, spec) {
];
return chain.process(results);
};
-
+
init();
return self;
};
\ No newline at end of file
diff --git a/src/js/Worldview/DataDownload/Handler/MODISSwathMultiDay.js b/src/js/Worldview/DataDownload/Handler/MODISSwathMultiDay.js
index b481f57ef..d44e1edb3 100644
--- a/src/js/Worldview/DataDownload/Handler/MODISSwathMultiDay.js
+++ b/src/js/Worldview/DataDownload/Handler/MODISSwathMultiDay.js
@@ -1,10 +1,10 @@
/*
* NASA Worldview
- *
+ *
* This code was originally developed at NASA/Goddard Space Flight Center for
- * the Earth Science Data and Information System (ESDIS) project.
+ * the Earth Science Data and Information System (ESDIS) project.
*
- * Copyright (C) 2013 United States Government as represented by the
+ * Copyright (C) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*/
@@ -15,17 +15,17 @@
Worldview.namespace("DataDownload.Handler");
Worldview.DataDownload.Handler.MODISSwathMultiDay = function(config, model, spec) {
-
+
var startTimeDelta = spec.startTimeDelta || 0;
var endTimeDelta = spec.endTimeDelta || 0;
-
+
var self = Worldview.DataDownload.Handler.Base(config, model);
-
+
var init = function() {
- self.extents[Worldview.Map.CRS_WGS_84] =
+ self.extents[Worldview.Map.CRS_WGS_84] =
Worldview.Map.CRS_WGS_84_QUERY_EXTENT;
};
-
+
self._submit = function(queryData) {
var queryOptions = {
time: model.time,
@@ -33,10 +33,10 @@ Worldview.DataDownload.Handler.MODISSwathMultiDay = function(config, model, spec
endTimeDelta: endTimeDelta,
data: queryData
};
-
+
return self.echo.submit(queryOptions);
};
-
+
self._processResults = function(data) {
var results = {
meta: {},
@@ -45,15 +45,16 @@ Worldview.DataDownload.Handler.MODISSwathMultiDay = function(config, model, spec
if ( model.crs === Worldview.Map.CRS_WGS_84 ) {
results.meta.queryMask = Worldview.Map.CRS_WGS_84_QUERY_MASK;
}
-
+
var ns = Worldview.DataDownload;
var productConfig = config.products[model.selectedProduct];
var chain = ns.Results.Chain();
chain.processes = [
ns.Results.TagProduct(model.selectedProduct),
ns.Results.TagNRT(productConfig.nrt),
+ ns.Results.TagURS(productConfig.urs),
ns.Results.CollectPreferred(model.prefer),
- ns.Results.PreferredFilter(model.prefer),
+ ns.Results.PreferredFilter(model.prefer),
ns.Results.TagVersion(),
ns.Results.CollectVersions(),
ns.Results.VersionFilter(),
@@ -71,7 +72,7 @@ Worldview.DataDownload.Handler.MODISSwathMultiDay = function(config, model, spec
];
return chain.process(results);
};
-
+
init();
return self;
};
diff --git a/src/js/Worldview/DataDownload/Results/TagURS.js b/src/js/Worldview/DataDownload/Results/TagURS.js
new file mode 100644
index 000000000..c6278620c
--- /dev/null
+++ b/src/js/Worldview/DataDownload/Results/TagURS.js
@@ -0,0 +1,47 @@
+/*
+ * NASA Worldview
+ *
+ * This code was originally developed at NASA/Goddard Space Flight Center for
+ * the Earth Science Data and Information System (ESDIS) project.
+ *
+ * Copyright (C) 2013 United States Government as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ * All Rights Reserved.
+ */
+
+/**
+ * @module Worldview.DataDownload
+ */
+Worldview.namespace("DataDownload");
+
+// FIXME: Code copy and pasted from TagNRT, maybe consoldate this?
+Worldview.DataDownload.Results.TagURS = function(spec) {
+
+ var self = {};
+
+ self.name = "TagURS";
+
+ self.process = function(meta, granule) {
+ // Exit now if this product doesn't have information about NRT
+ if ( !spec ) {
+ return granule;
+ }
+ var isURS;
+ if ( spec.by === "value" ) {
+ isURS = granule[spec.field] === spec.value;
+ } else if ( spec.by === "regex" ) {
+ var re = new RegExp(spec.value);
+ isURS = re.test(granule[spec.field]);
+ } else {
+ throw new Error("Unknown TagURS method: " + spec.by);
+ }
+ granule.urs = isURS;
+ if ( isURS ) {
+ meta.urs = ( meta.urs ) ? meta.urs += 1 : 1;
+ }
+ return granule;
+ };
+
+ return self;
+
+};
\ No newline at end of file
diff --git a/src/js/Worldview/Widget/DataDownload.js b/src/js/Worldview/Widget/DataDownload.js
index 70311ed45..7915f5815 100644
--- a/src/js/Worldview/Widget/DataDownload.js
+++ b/src/js/Worldview/Widget/DataDownload.js
@@ -29,7 +29,7 @@ Worldview.namespace("Widget");
Worldview.Widget.DataDownload = function(config, spec) {
var log = Logging.getLogger("Worldview.DataDownload");
- //Logging.debug("Worldview.DataDownload");
+ Logging.debug("Worldview.DataDownload");
var HTML_WIDGET_INACTIVE = "<img src='images/camera.png'></img>";
var HTML_WIDGET_ACTIVE = "<img src='images/cameraon.png'></img>";