Interactive interface for browsing global, full-resolution satellite imagery
Metrics no longer in build by default
Mike McGannde59c7d28431
diff --git a/.gitignore b/.gitignoreindex a3d5ac7e9..78ae67106 100644--- a/.gitignore+++ b/.gitignore@@ -11,3 +11,4 @@ doctools*~*.swp+conf/web/eosdisdiff --git a/Gruntfile.js b/Gruntfile.jsindex 2b323cfce..5fa6ba01f 100644--- a/Gruntfile.js+++ b/Gruntfile.js@@ -9,6 +9,7 @@* All Rights Reserved.*/var moment = require("moment");+var fs = require("fs");// Build date shown in the About boxvar buildTimestamp = moment.utc().format("MMMM DD, YYYY [-] HH:mm [UTC]");@@ -27,6 +28,27 @@ module.exports = function(grunt) {var wvJs = grunt.file.readJSON("etc/deploy/wv.js.json");var wvCss = grunt.file.readJSON("etc/deploy/wv.css.json");+ var bitly = fs.existsSync("conf/bitly_config.py");+ var eosdis = fs.existsSync("conf/web/eosdis");+ var gibsOps = !process.env.GIBS_HOST;+ var official = bitly && eosdis && gibsOps;+ var pkg = grunt.file.readJSON("package.json");++ console.log();+ console.log("============================================================");+ console.log("[" + pkg.name + "] " + pkg.longName + ", Version " ++ pkg.version + "-" + pkg.release);+ console.log("");+ console.log("GIBS public servers: " + gibsOps);+ console.log("bit.ly support : " + bitly);+ console.log("EOSDIS options : " + eosdis);+ if ( !official ) {+ console.error();+ grunt.log.error("WARNING: This is NOT a standard configuration");+ }+ console.log("============================================================");+ console.log();+// Copyright notice to place at the top of the minified JavaScript and// CSS filesvar banner = grunt.file.read("etc/deploy/banner.txt");diff --git a/bin/make-conf b/bin/make-confindex 080039cd9..21cf5af61 100755--- a/bin/make-conf+++ b/bin/make-conf@@ -27,6 +27,9 @@ rm -f "$BUILD_DIR"/web/main/sources.json-e"$BASE_DIR"/gibs2wv "$BUILD_DIR"/../gc/*.xml \> "$BUILD_DIR"/web/main/gc.json+if [ -e "$BUILD_DIR"/web/eosdis ] ; then+ cp -r "$BUILD_DIR"/web/eosdis "$BUILD_DIR"/web/main+fi"$BASE_DIR"/conf-cat --input-dir "$BUILD_DIR"/web/main \> "$DEBUG_DIR"/wv.json"$BASE_DIR"/conf-cat --input-dir "$BUILD_DIR"/web/palettes/custom \diff --git a/src/index.html b/src/index.htmlindex 349ed1691..eacc3ac20 100644--- a/src/index.html+++ b/src/index.html@@ -231,12 +231,5 @@<li id="mapPanel" data-id="mapPanelTourAnchor" data-button="Next" data-options="tipLocation:left;nubPosition:left;prevButton:true;bordered:true"></li><li id="toolbarPanel" class="toolbarTip" data-id="toolbarlist" data-button="Finish" data-options="tipLocation:bottom;nubPosition:top;tipAnimation:fade;prevButton:true;bordered:true;class:toolbar"></li></ol>-<script>-</script>- <!-- BEGIN: Unica Page Tag -->- <!-- Copyright 2004-2010 Unica Corporation. All rights reserved. -->- <script type="text/javascript" language="JavaScript" src="https://earthdata.nasa.gov/sites/all/themes/earthdata/js/ntpagetag.js"></script>- <!-- END: Unica Page Tag --></body>-</html>\ No newline at end of filediff --git a/src/js/image/wv.image.panel.js b/src/js/image/wv.image.panel.jsindex 63e49a367..b10ec06d4 100644--- a/src/js/image/wv.image.panel.js+++ b/src/js/image/wv.image.panel.js@@ -142,7 +142,7 @@ wv.image.panel = wv.image.panel || function(models, ui, config) {$("#btnImgDownload").unbind('click').click(function(){- ntptEventTag('lc='+encodeURIComponent(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&width="+$("#imgWidth").text()+"&height="+$("#imgHeight").text() ) );+ wv.util.metrics('lc='+encodeURIComponent(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&width="+$("#imgWidth").text()+"&height="+$("#imgHeight").text() ) );window.open(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&width="+$("#imgWidth").text()+"&height="+$("#imgHeight").text(),"_blank");});} catch ( cause ) {diff --git a/src/js/util/wv.util.browser.js b/src/js/util/wv.util.browser.jsindex 34a2de0f8..750ae153e 100644--- a/src/js/util/wv.util.browser.js+++ b/src/js/util/wv.util.browser.js@@ -421,3 +421,4 @@ if (!String.prototype.endsWith) {}})();+diff --git a/src/js/util/wv.util.js b/src/js/util/wv.util.jsindex eff8a1cb3..df85972de 100644--- a/src/js/util/wv.util.js+++ b/src/js/util/wv.util.js@@ -419,6 +419,8 @@ wv.util = (function(self) {return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');};+ self.metrics = window.ntptEventTag || function() {};+return self;})(wv.util || {});diff --git a/src/js/wv.main.js b/src/js/wv.main.jsindex 848163705..a2122bb0b 100644--- a/src/js/wv.main.js+++ b/src/js/wv.main.js@@ -33,6 +33,13 @@ $(function() {// Export for debuggingwv.config = config;+ // Load any additional scripts as needed+ if ( config.scripts ) {+ _.each(config.scripts, function(script) {+ $.getScript(script);+ });+ }+wv.layers.validate(errors, config);parsers = [