aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--euscanwww/djeuscan/templates/_base.html1
-rw-r--r--euscanwww/djeuscan/templates/euscan/config.html95
-rw-r--r--euscanwww/djeuscan/urls.py1
-rw-r--r--euscanwww/djeuscan/views.py16
-rw-r--r--euscanwww/htdocs/css/style.css8
6 files changed, 113 insertions, 9 deletions
diff --git a/TODO b/TODO
index a0e3a26..932c479 100644
--- a/TODO
+++ b/TODO
@@ -52,7 +52,6 @@ euscan
euscanwww
---------
-- Add an /about/config page that describe the current config (overlays, stuff in make.conf, euscan default settings, etc..)
- Always keep in db all found versions (when using an API only?). But don't display them if older than current packaged version, except maybe in the "upstream_version" column.
### packages
diff --git a/euscanwww/djeuscan/templates/_base.html b/euscanwww/djeuscan/templates/_base.html
index 2d26a33..954e350 100644
--- a/euscanwww/djeuscan/templates/_base.html
+++ b/euscanwww/djeuscan/templates/_base.html
@@ -86,6 +86,7 @@
<li>---</li>
<li><a href="{% url "api" %}">API</a></li>
<li><a href="{% url "feeds" %}">Feeds</a></li>
+ <li><a href="{% url "config" %}">Server config</a></li>
<li><a href="{% url "about" %}">About</a></li>
{% endblock %}
</ul>
diff --git a/euscanwww/djeuscan/templates/euscan/config.html b/euscanwww/djeuscan/templates/euscan/config.html
new file mode 100644
index 0000000..9bbaf14
--- /dev/null
+++ b/euscanwww/djeuscan/templates/euscan/config.html
@@ -0,0 +1,95 @@
+{% extends "_base.html" %}
+
+{% block content %}
+<h2>Server configuration</h2>
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Euscan config</h4>
+ </caption>
+ {% for key, value in CONFIG.items %}
+ <tr>
+ <td><b>{{ key }}</b></td>
+ <td>{{ value }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+<hr />
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Versions blacklist</h4>
+ </caption>
+ {% for item in BLACKLIST_VERSIONS %}
+ <tr>
+ <td>{{ item }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+<hr />
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Packages blacklist</h4>
+ </caption>
+ {% for item in BLACKLIST_PACKAGES %}
+ <tr>
+ <td>{{ item }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+<hr />
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Scandir blacklist</h4>
+ </caption>
+ {% for item in SCANDIR_BLACKLIST_URLS %}
+ <tr>
+ <td>{{ item }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+<hr />
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Bruteforce packages blacklist</h4>
+ </caption>
+ {% for item in BRUTEFORCE_BLACKLIST_PACKAGES %}
+ <tr>
+ <td>{{ item }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+<hr />
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Bruteforce urls blacklist</h4>
+ </caption>
+ {% for item in BRUTEFORCE_BLACKLIST_URLS %}
+ <tr>
+ <td>{{ item }}</td>
+ </tr>
+ {% endfor %}
+</table>
+
+<hr />
+
+<table class="table table-bordered">
+ <caption>
+ <h4 class="padded">Robots.txt domain blacklist</h4>
+ </caption>
+ {% for item in ROBOTS_TXT_BLACKLIST_DOMAINS %}
+ <tr>
+ <td>{{ item }}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endblock %}
diff --git a/euscanwww/djeuscan/urls.py b/euscanwww/djeuscan/urls.py
index e156a4b..789fc9f 100644
--- a/euscanwww/djeuscan/urls.py
+++ b/euscanwww/djeuscan/urls.py
@@ -113,6 +113,7 @@ urlpatterns = patterns('djeuscan.views',
url(r'^about/$', 'about', name="about"),
url(r'^about/api$', 'api', name="api"),
url(r'^about/feeds$', 'feeds', name="feeds"),
+ url(r'^about/config$', 'config', name="config"),
url(r'^statistics/$', 'statistics', name="statistics"),
url(r'^statistics/charts/(?P<chart>[\w\-]+).png$', 'chart', name="chart"),
url(r'^world/$', 'world', name="world"),
diff --git a/euscanwww/djeuscan/views.py b/euscanwww/djeuscan/views.py
index bb60df2..cc0d2f2 100644
--- a/euscanwww/djeuscan/views.py
+++ b/euscanwww/djeuscan/views.py
@@ -311,6 +311,22 @@ def feeds(request):
return {}
+@render_to("euscan/config.html")
+def config(request):
+ from euscan import CONFIG, BLACKLIST_VERSIONS, BLACKLIST_PACKAGES, \
+ SCANDIR_BLACKLIST_URLS, BRUTEFORCE_BLACKLIST_PACKAGES, \
+ BRUTEFORCE_BLACKLIST_URLS, ROBOTS_TXT_BLACKLIST_DOMAINS
+ return {
+ "CONFIG": CONFIG,
+ "BLACKLIST_VERSIONS": BLACKLIST_VERSIONS,
+ "BLACKLIST_PACKAGES": BLACKLIST_PACKAGES,
+ "SCANDIR_BLACKLIST_URLS": SCANDIR_BLACKLIST_URLS,
+ "BRUTEFORCE_BLACKLIST_PACKAGES": BRUTEFORCE_BLACKLIST_PACKAGES,
+ "BRUTEFORCE_BLACKLIST_URLS": BRUTEFORCE_BLACKLIST_URLS,
+ "ROBOTS_TXT_BLACKLIST_DOMAINS": ROBOTS_TXT_BLACKLIST_DOMAINS,
+ }
+
+
@render_to("euscan/statistics.html")
def statistics(request):
return {}
diff --git a/euscanwww/htdocs/css/style.css b/euscanwww/htdocs/css/style.css
index 2877499..bc3cdcb 100644
--- a/euscanwww/htdocs/css/style.css
+++ b/euscanwww/htdocs/css/style.css
@@ -117,14 +117,6 @@ dd {
padding: 5px;
}
-hr {
- margin: 0.3em 1em 0.3em 1em;
- height: 1px;
- border: #bcbcbc dashed;
- border-width: 0 0 1px 0;
-}
-
-
.table {
width: 60% !important;
margin: auto;