mirror of
https://github.com/cwinfo/yggdrasil-map
synced 2024-11-22 01:10:28 +00:00
Remove unfinished features
This commit is contained in:
parent
c478436e87
commit
a53ce7a950
Binary file not shown.
@ -1,24 +1,16 @@
|
||||
@font-face {
|
||||
font-family: 'Inconsolata';
|
||||
src: url("/static/Inconsolata.otf");
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html, body {
|
||||
font-family: 'Source Sans Pro';
|
||||
background: #F5F5F5;
|
||||
overflow: hidden;
|
||||
font-family: 'sans serif';
|
||||
}
|
||||
|
||||
#header {
|
||||
background: #FFF;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
/*box-shadow: 0 5px 3px rgba(0, 0, 0, 0.1);*/
|
||||
/*z-index: 1;*/
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -26,7 +18,7 @@ html, body {
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Inconsolata';
|
||||
font-family: 'Inconsolata', 'Consolas', 'Ubuntu Mono', monospace;
|
||||
font-size: 32px;
|
||||
float: left;
|
||||
padding: 0 40px;
|
||||
@ -40,8 +32,6 @@ small {
|
||||
|
||||
.grey {
|
||||
color: #999;
|
||||
/*font-size: 16px;*/
|
||||
/*vertical-align: middle;*/
|
||||
}
|
||||
|
||||
ul {
|
||||
@ -56,7 +46,7 @@ li {
|
||||
#header a {
|
||||
color: #777;
|
||||
padding: 0 20px;
|
||||
font-family: 'Source Sans Pro';
|
||||
font-family: 'Open Sans', 'sans-serif';
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
height: 100%;
|
||||
@ -68,14 +58,6 @@ li {
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
/*#map-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: -1;
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
@ -98,10 +80,9 @@ li {
|
||||
top: 0;
|
||||
right: 0;
|
||||
/*bottom: 0;*/
|
||||
min-width: 200px;
|
||||
min-width: 250px;
|
||||
z-index: 999;
|
||||
/*overflow-y: auto;*/
|
||||
/*overflow: hidden;*/
|
||||
/*overflow-y: scroll;*/
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@ -112,6 +93,7 @@ li {
|
||||
/*top: 0;*/
|
||||
/*right: 10px;*/
|
||||
/*z-index: 5;*/
|
||||
font-size: 10px;
|
||||
}
|
||||
#search-box {
|
||||
width: 100%;
|
||||
@ -137,11 +119,6 @@ h2 {
|
||||
color: #29BBFF;
|
||||
}
|
||||
|
||||
#node-info {
|
||||
/*position: absolute;*/
|
||||
/*overflow-y: scroll;*/
|
||||
/*background: rgba(220, 220, 220, 0.8);*/
|
||||
}
|
||||
#node-info table {
|
||||
width: 100%;
|
||||
}
|
||||
@ -156,13 +133,13 @@ h2 {
|
||||
}
|
||||
|
||||
.tt {
|
||||
font-family: 'Source Code Pro', Consolas, monospace;
|
||||
font-family: monospace;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.autocomplete-suggestions {
|
||||
font-family: 'Source Code Pro', Consolas, monospace;
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
font-size: 10px;
|
||||
border: 1px solid #FFF;
|
||||
background: #FFF;
|
||||
overflow: auto;
|
||||
|
@ -5,8 +5,6 @@
|
||||
<title>fc00::/8</title>
|
||||
<script src="static/jquery-2.0.3.min.js"></script>
|
||||
<script src="static/jquery.autocomplete.min.js"></script>
|
||||
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro|Droid+Sans|Duru+Sans|Quattrocento+Sans|Open+Sans' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
|
||||
<link href='static/style.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
@ -14,9 +12,6 @@
|
||||
<h1>fc00<span class="grey">::/8</span></h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="/network">Network</a></li>
|
||||
<li><a href="/world-map">World map</a></li>
|
||||
<li><a href="/tools">Tools</a></li>
|
||||
<li><tt>{{ ip }}</tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -1,9 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-wrapper">
|
||||
<h2>Ping</h2>
|
||||
<input type="text" value="{{ ip }}">
|
||||
<h2>Traceroute</h2>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,40 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-wrapper">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
|
||||
var nodes = {{ nodes|tojson|safe }}
|
||||
|
||||
var map = L.map('map').setView([0, 0], 2);
|
||||
|
||||
L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', {
|
||||
subdomains: '1234',
|
||||
minZoom: 2,
|
||||
maxZoom: 7,
|
||||
noWrap: true
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
for (var i = 0; i < nodes.length; ++i) {
|
||||
var node = nodes[i];
|
||||
|
||||
node.circle = L.circle([node.latitude, node.longitude], 5000, {
|
||||
// color: 'red',
|
||||
stroke: false,
|
||||
fillColor: 'red',
|
||||
fillOpacity: 1
|
||||
}).addTo(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
33
web/web.py
33
web/web.py
@ -1,22 +1,7 @@
|
||||
from flask import Flask, render_template, request
|
||||
from flaskext.mysql import MySQL
|
||||
import MySQLdb
|
||||
from pprint import pprint
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
app.debug = True
|
||||
app.config['MYSQL_DATABASE_HOST'] = 'localhost'
|
||||
app.config['MYSQL_DATABASE_PORT'] = 3306
|
||||
app.config['MYSQL_DATABASE_USER'] = 'fc00'
|
||||
app.config['MYSQL_DATABASE_PASSWORD'] = 'A54RZ8FN9CtgIdPWmVIgp3sKgm1uSNVlVtPGipOHsalMZ9DNEUTeOijNcZRpLCn1'
|
||||
app.config['MYSQL_DATABASE_DB'] = 'fc00'
|
||||
app.config['MYSQL_DATABASE_CHARSET'] = 'utf8'
|
||||
|
||||
mysql = MySQL()
|
||||
mysql.init_app(app)
|
||||
conn = mysql.connect()
|
||||
cursor = conn.cursor(MySQLdb.cursors.DictCursor)
|
||||
app.debug = False
|
||||
|
||||
|
||||
@app.context_processor
|
||||
@ -24,27 +9,11 @@ def add_ip():
|
||||
return dict(ip=request.environ['REMOTE_ADDR'])
|
||||
|
||||
|
||||
|
||||
@app.route('/')
|
||||
@app.route('/network')
|
||||
def page_network():
|
||||
return render_template('network.html')
|
||||
|
||||
@app.route('/world-map')
|
||||
def page_world_map():
|
||||
cursor.execute('SELECT ip, ipv4, ipv6, domain, CONVERT(longitude, CHAR(16)) as longitude, CONVERT(latitude, CHAR(16)) as latitude FROM nodes')
|
||||
nodes = cursor.fetchall()
|
||||
return render_template('world-map.html', nodes=nodes)
|
||||
|
||||
@app.route('/tools')
|
||||
def page_tools():
|
||||
return render_template('tools.html')
|
||||
|
||||
@app.route('/test')
|
||||
def asd():
|
||||
pprint(vars(request))
|
||||
return 'Asd'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='::')
|
||||
|
Loading…
Reference in New Issue
Block a user