Interactive interface for browsing global, full-resolution satellite imagery
One step development install with wv-setup
Mike McGann14464b794592
diff --git a/Gruntfile.js b/Gruntfile.jsindex fcd56bda5..96cccd5ab 100644--- a/Gruntfile.js+++ b/Gruntfile.js@@ -27,6 +27,9 @@ module.exports = function(grunt) {if ( fs.existsSync("options") ) {var opt = grunt.file.readJSON("options/brand.json");+ opt.officialName = opt.officialName || opt.name;+ opt.longName = opt.longName || opt.name;+ opt.shortName = opt.shortName || opt.name;var features = grunt.file.readJSON("options/features.json").features;console.log("");@@ -47,6 +50,7 @@ module.exports = function(grunt) {grunt.initConfig({pkg: ( opt ) ? opt.packageName : "",+ info: info,opt: opt,features: features,@@ -128,7 +132,7 @@ module.exports = function(grunt) {apache: {files: [{ expand: true, flatten: true, cwd: "etc/dev",- src: ["worldview-dev.conf"], dest: "build" }+ src: ["worldview-dev.httpd.conf"], dest: "build" }]},@@ -136,8 +140,8 @@ module.exports = function(grunt) {rename: {apache: {- src: "build/worldview-dev.conf",- dest: "dist/<%=pkg%>-dev.conf"+ src: "build/worldview-dev.httpd.conf",+ dest: "dist/<%=pkg%>-dev.httpd.conf"}},@@ -167,8 +171,8 @@ module.exports = function(grunt) {tar_debug_versioned: {command: "tar cjCf build dist/<%=pkg%>" +"-debug" +- "-<%=opt.version%>" +- "-<%=opt.release%>" ++ "-<%=info.version%>" ++ "-<%=info.release%>" +buildNumber +".git<%= grunt.config.get('git-revision') %>" +".tar.bz2 " +@@ -187,8 +191,8 @@ module.exports = function(grunt) {// git revisiontar_release_versioned: {command: "tar cjCf build dist/<%=pkg%>" +- "-<%=opt.version%>" +- "-<%=opt.release%>" ++ "-<%=info.version%>" ++ "-<%=info.release%>" +buildNumber +".git<%= grunt.config.get('git-revision') %>" +".tar.bz2 " +@@ -287,7 +291,7 @@ module.exports = function(grunt) {apache: {src: [- "build/worldview-dev.conf"+ "build/worldview-dev.httpd.conf"],overwrite: true,replacements: [{@@ -504,7 +508,6 @@ module.exports = function(grunt) {]);grunt.registerTask("apache-config" , [- "brand","copy:apache","replace:apache","rename:apache"diff --git a/etc/deploy/worldview.spec b/etc/deploy/worldview.specindex e1ab4afd0..905fea67e 100644--- a/etc/deploy/worldview.spec+++ b/etc/deploy/worldview.spec@@ -84,7 +84,7 @@ rm httpd.worldview.conf# Apache configuration for debuginstall -m 644 httpd.worldview-debug.conf \%{buildroot}/%{httpdconfdir}/@[email protected]-rm httpd.worldview-debug.conf+rm httpd.worldview-debug.conf# Release configuration directoryinstall -m 755 -d %{buildroot}/%{_sysconfdir}@@ -161,7 +161,7 @@ rm -rf %{buildroot}if [ $1 -gt 0 ] ; thenif /sbin/service httpd status >/dev/null ; then/sbin/service httpd reload- fi+ fifi%post debug@@ -190,5 +190,5 @@ fi* Wed Oct 30 2013 Mike McGann <[email protected]> - 0.6.0-1- Worldview 0.6.0 release-* Thu May 9 2013 Mike McGann <[email protected]> - 0.4.5-1+* Thu May 9 2013 Mike McGann <[email protected]> - 0.4.5-1- Initial packagediff --git a/etc/deploy/wv.js.json b/etc/deploy/wv.js.jsonindex 085f5ad2d..cf2e925f1 100644--- a/etc/deploy/wv.js.json+++ b/etc/deploy/wv.js.json@@ -47,7 +47,7 @@"src/js/map/wv.map.model.js","src/js/map/wv.map.palette.js","src/js/map/wv.map.ui.js",-+"src/js/link/wv.link.model.js","src/js/link/wv.link.ui.js",diff --git a/etc/dev/worldview-dev.conf b/etc/dev/worldview-dev.httpd.confsimilarity index 84%rename from etc/dev/worldview-dev.confrename to etc/dev/worldview-dev.httpd.confindex b862afd32..1d3e35e67 100644--- a/etc/dev/worldview-dev.conf+++ b/etc/dev/worldview-dev.httpd.conf@@ -1,7 +1,6 @@Alias /@WORLDVIEW@ @ROOT@/srcAlias /@WORLDVIEW@-release @ROOT@/build/@WORLDVIEW@/webAlias /@WORLDVIEW@-debug @ROOT@/build/@WORLDVIEW@-debug/web-Alias /@WORLDVIEW@-doc @ROOT@/build/@WORLDVIEW@-doc<Directory @ROOT@>Options Indexes FollowSymLinks ExecCGIdiff --git a/package.json b/package.jsonindex 4d9847959..9d6c79a80 100644--- a/package.json+++ b/package.json@@ -9,7 +9,7 @@"test": "grunt test lint"},"devDependencies": {- "buster": "0.7.8",+ "buster": "0.7.x","grunt": "0.4.x","grunt-buster": "0.3.x","grunt-contrib-clean": "0.5.x",diff --git a/python_install b/python_installdeleted file mode 100755index 6b4f0550a..000000000--- a/python_install+++ /dev/null@@ -1,23 +0,0 @@-#!/bin/bash-#-# 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 - 2014 United States Government as represented by the-# Administrator of the National Aeronautics and Space Administration.-# All Rights Reserved.-#--BASE_DIR=$(dirname "$0")-PIP="$BASE_DIR"/python/bin/pip--# virtualenv 1.11 is broken-# http://stackoverflow.com/questions/20916712/cannot-create-virtualenv-instance-in-python-2-7-5-because-of-pip-installation-er-if [ ! -e /usr/bin/virtualenv ] && [ ! -e /usr/local/bin/virtualenv ] ; then- echo "Install virtualenv before running this script" >&2-fi-virtualenv python-$PIP install xmltodict-diff --git a/src/config/.htaccess b/src/config/.htaccessindex aa4902dec..f9b313776 100644--- a/src/config/.htaccess+++ b/src/config/.htaccess@@ -2,8 +2,3 @@ ExpiresActive OnExpiresDefault A0Header set Cache-Control "no-cache, must-revalidate, public"Header set Pragma "no-cache"-----diff --git a/wv-dist-clean b/wv-dist-cleannew file mode 100755index 000000000..17620090b--- /dev/null+++ b/wv-dist-clean@@ -0,0 +1,38 @@+#!/bin/bash+#+# 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 - 2014 United States Government as represented by the+# Administrator of the National Aeronautics and Space Administration.+# All Rights Reserved.+#++set -e++PROG=$(basename "$0")+BASE_DIR=$(dirname "$0")++echo -n "$PROG: Removing node_modules... "+rm -rf "$BASE_DIR/node_modules"+echo "done."++echo -n "$PROG: Removing python virtualenv... "+rm -rf "$BASE_DIR"/python+echo "done."++echo -n "$PROG: Removing build directory... "+rm -rf "$BASE_DIR"/build+echo "done."++echo -n "$PROG: Removing dist directory... "+rm -rf "$BASE_DIR"/dist+echo "done."++echo -n "$PROG: Removing any other non-source files... "+rm -f npm-debug.log+rm -rf src/conf/*+rm -rf src/config/*+echo "done."diff --git a/wv-setup b/wv-setupnew file mode 100755index 000000000..0bc20668f--- /dev/null+++ b/wv-setup@@ -0,0 +1,111 @@+#!/bin/bash+#+# 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 - 2014 United States Government as represented by the+# Administrator of the National Aeronautics and Space Administration.+# All Rights Reserved.+#++set -e++BASE_DIR=$(dirname "$0")+PROG=$(basename "$0")++usage() {+ cat << EOF+Usage: $PROG [options]++Options:+ -d Install apache configuration files and restart the web server+ -h Prints this usage+EOF+}++while getopts dkh flag; do+ case "$flag" in+ d)+ DEVELOP=1+ shift+ ;;+ h)+ usage+ exit 0+ ;;+ ?)+ usage+ exit 1+ ;;+ esac+done+shift $(( OPTIND - 1 ));++cd "$BASE_DIR"++if [ ! -e /usr/local/bin/grunt ] ; then+ echo "$PROG: ***** Installing a global version of grunt."+ echo "You may be prompted for the root password to execute this command:"+ echo " sudo npm install --global grunt-cli"+ sudo npm install --global grunt-cli+fi++if [ ! -d "$BASE_DIR/node_modules" ] ; then+ echo "***** Installing node.js dependencies"+ npm install+fi++if [ ! -e "/usr/local/bin/virtualenv" ] ; then+ echo "$PROG: ***** Installing a global version of virtualenv"+ echo "You may be prompted for the root password to execute this command:"+ echo " sudo easy_install virtualenv==1.10.1"+ sudo easy_install virtualenv==1.10.1+fi++if [ ! -d "$BASE_DIR/python" ] ; then+ echo "$PROG: ***** Installing python dependencies"+ virtualenv python+ "$BASE_DIR"/python/bin/pip install xmltodict+fi++if [ ! -d "$BASE_DIR/options" ] ; then+ echo "$PROG: ***** Fetching options"+ git clone https://github.com/nasa-gibs/worldview-options-template options+ mkdir -p "$BASE_DIR/build"+ git clone https://github.com/nasa-gibs/worldview-options-eosdis \+ "$BASE_DIR/build/options-eosdis"+ cp "$BASE_DIR/build/options-eosdis/config.json" "$BASE_DIR/options"+ cp -r "$BASE_DIR/build/options-eosdis/config" "$BASE_DIR/options"+ cp -r "$BASE_DIR/build/options-eosdis/colormaps" "$BASE_DIR/options"+fi++if [ ! -d "$BASE_DIR/dist" ] ; then+ echo "$PROG: ***** First time build"+ grunt build+fi++if [ "$DEVELOP" ] ; then+ echo "$PROG: ***** Creating apache configuration"+ rm -f dist/*.httpd.conf+ grunt apache-config++ # OS X+ if [ -d /etc/apache2/other ] ; then+ echo "$PROG: ***** Installing configuration and restarting server"+ echo "You may be prompted for the root password to execute these"+ echo "commands:"+ echo " sudo cp dist/*.httpd.conf /etc/apache2/other"+ echo " sudo apachectl restart"+ sudo cp dist/*.httpd.conf /etc/apache2/other+ sudo apachectl restart+ else+ echo "This only works on OS X at the moment"+ exit 1+ fi++ echo -e "\nApplication is now available at:\n"+ grep Alias dist/*.httpd.conf | cut -f 2 -d" " | sed s_.*_http://localhost\&_g+ echo+fi