Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

sfwebui: Move d3.min.js to ./static/node_modules (#1299)

bcolescb06b958a7cb
diff --git a/.gitignore b/.gitignore
index a71cbf97..96c26fbf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,6 +71,11 @@ spiderfoot/static/node_modules/tablesorter/dist/js/extras/*
!spiderfoot/static/node_modules/tablesorter/dist/js/extras/
!spiderfoot/static/node_modules/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js
+spiderfoot/static/node_modules/d3/*
+
+!spiderfoot/static/node_modules/d3/
+!spiderfoot/static/node_modules/d3/d3.min.js
+
# Compiled source #
###################
*.com
diff --git a/spiderfoot/static/js/LICENSE.d3 b/spiderfoot/static/js/LICENSE.d3
deleted file mode 100644
index ff3f2e54..00000000
--- a/spiderfoot/static/js/LICENSE.d3
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright (c) 2010-2016, Michael Bostock
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* The name Michael Bostock may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/spiderfoot/static/js/d3.min.js b/spiderfoot/static/node_modules/d3/d3.min.js
similarity index 100%
rename from spiderfoot/static/js/d3.min.js
rename to spiderfoot/static/node_modules/d3/d3.min.js
diff --git a/spiderfoot/static/package.json b/spiderfoot/static/package.json
index d9494759..4cfe52b5 100644
--- a/spiderfoot/static/package.json
+++ b/spiderfoot/static/package.json
@@ -2,6 +2,7 @@
"dependencies": {
"alertifyjs": "^1.13.1",
"bootstrap": "^3.4.1",
+ "d3": "^3.5.17",
"jquery": "^3.6.0",
"sigma": "^1.2.1",
"tablesorter": "^2.31.3"
diff --git a/spiderfoot/templates/HEADER.tmpl b/spiderfoot/templates/HEADER.tmpl
index b75e49e2..63e80abb 100644
--- a/spiderfoot/templates/HEADER.tmpl
+++ b/spiderfoot/templates/HEADER.tmpl
@@ -121,7 +121,7 @@ class="nav-item"><a href="${docroot}/opts" class="nav-link"><i class="glyphicon
<script src="${docroot}/static/node_modules/alertifyjs/build/alertify.min.js"></script>
<script src="${docroot}/static/node_modules/tablesorter/dist/js/jquery.tablesorter.min.js"></script>
<script src='${docroot}/static/node_modules/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js'></script>
- <script src="${docroot}/static/js/d3.min.js"></script>
+ <script src="${docroot}/static/node_modules/d3/d3.min.js"></script>
<script type='text/javascript' hash="sha256-0kTZzWMEh3cdgCMVytlY1E8rg7oO13eyLa+kvyAhRmo=">sf.updateTooltips();</script>
<div class="container" id="mainbody" style='padding-bottom: 50px'>