ATLAS-4527 : Upgrade underscore.js to 1.12.1+

Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
diff --git a/dashboardv2/package-lock.json b/dashboardv2/package-lock.json
index 61fd944..e1d672d 100644
--- a/dashboardv2/package-lock.json
+++ b/dashboardv2/package-lock.json
@@ -208,6 +208,13 @@
       "requires": {
         "backbone": ">=0.9.9 <=1.3.x",
         "underscore": ">=1.4.0 <=1.8.3"
+      },
+      "dependencies": {
+        "underscore": {
+          "version": "1.8.3",
+          "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
+          "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
+        }
       }
     },
     "backbone.marionette": {
@@ -252,6 +259,13 @@
       "requires": {
         "backbone": ">=0.9.9 <=1.3.x",
         "underscore": ">=1.3.3 <=1.8.3"
+      },
+      "dependencies": {
+        "underscore": {
+          "version": "1.8.3",
+          "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
+          "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
+        }
       }
     },
     "backgrid": {
@@ -3668,9 +3682,9 @@
       "dev": true
     },
     "underscore": {
-      "version": "1.8.3",
-      "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
-      "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz",
+      "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g=="
     },
     "underscore.string": {
       "version": "3.3.5",
@@ -3879,4 +3893,4 @@
       }
     }
   }
-}
\ No newline at end of file
+}
diff --git a/dashboardv2/package.json b/dashboardv2/package.json
index 2cc1d4b..30837fe 100644
--- a/dashboardv2/package.json
+++ b/dashboardv2/package.json
@@ -52,7 +52,7 @@
     "requirejs-text": "2.0.15",
     "select2": "4.0.3",
     "table-dragger": "1.0.2",
-    "underscore": "1.8.3"
+    "underscore": "1.13.1"
   },
   "devDependencies": {
     "grunt": "1.0.4",
diff --git a/dashboardv2/public/js/utils/Globals.js b/dashboardv2/public/js/utils/Globals.js
index 8fe8ebc..c30f840 100644
--- a/dashboardv2/public/js/utils/Globals.js
+++ b/dashboardv2/public/js/utils/Globals.js
@@ -16,10 +16,13 @@
  * limitations under the License.
  */
 
-define(["require"], function(require) {
+define(["require", "underscore"], function(require, _) {
     "use strict";
 
     var Globals = {};
+    //We have assigned underscore object to the window object, So that we don't have to import,
+    // it in every file where underscore functions are used because of the version update.
+    window._ = _;
     Globals.settings = {};
     Globals.settings.PAGE_SIZE = 25;
     Globals.saveApplicationState = {
diff --git a/dashboardv3/package-lock.json b/dashboardv3/package-lock.json
index 2b00b15..1ebd66f 100644
--- a/dashboardv3/package-lock.json
+++ b/dashboardv3/package-lock.json
@@ -208,6 +208,13 @@
       "requires": {
         "backbone": ">=0.9.9 <=1.3.x",
         "underscore": ">=1.4.0 <=1.8.3"
+      },
+      "dependencies": {
+        "underscore": {
+          "version": "1.8.3",
+          "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
+          "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
+        }
       }
     },
     "backbone.marionette": {
@@ -252,6 +259,13 @@
       "requires": {
         "backbone": ">=0.9.9 <=1.3.x",
         "underscore": ">=1.3.3 <=1.8.3"
+      },
+      "dependencies": {
+        "underscore": {
+          "version": "1.8.3",
+          "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
+          "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
+        }
       }
     },
     "backgrid": {
@@ -3676,9 +3690,9 @@
       "dev": true
     },
     "underscore": {
-      "version": "1.8.3",
-      "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
-      "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz",
+      "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g=="
     },
     "underscore.string": {
       "version": "3.3.5",
@@ -3887,4 +3901,4 @@
       }
     }
   }
-}
\ No newline at end of file
+}
diff --git a/dashboardv3/package.json b/dashboardv3/package.json
index 49fd9df..cc15a93 100644
--- a/dashboardv3/package.json
+++ b/dashboardv3/package.json
@@ -53,7 +53,7 @@
     "requirejs-text": "2.0.15",
     "select2": "4.0.3",
     "table-dragger": "1.0.2",
-    "underscore": "1.8.3"
+    "underscore": "1.13.1"
   },
   "devDependencies": {
     "grunt": "1.0.4",
diff --git a/dashboardv3/public/js/utils/Globals.js b/dashboardv3/public/js/utils/Globals.js
index df17a68..5bbc71a 100644
--- a/dashboardv3/public/js/utils/Globals.js
+++ b/dashboardv3/public/js/utils/Globals.js
@@ -16,10 +16,13 @@
  * limitations under the License.
  */
 
-define(["require"], function(require) {
+define(["require", "underscore"], function(require, _) {
     "use strict";
 
     var Globals = {};
+    //We have assigned underscore object to the window object, So that we don't have to import,
+    // it in every file where underscore functions are used because of the version update.
+    window._ = _;
     Globals.settings = {};
     Globals.settings.PAGE_SIZE = 25;
     Globals.saveApplicationState = {