5
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2024-11-22 12:50:27 +00:00

Remove unfinished features

This commit is contained in:
Vanhala Antti 2014-03-30 02:14:02 +02:00
parent c478436e87
commit a53ce7a950
6 changed files with 10 additions and 118 deletions

Binary file not shown.

View File

@ -1,24 +1,16 @@
@font-face {
font-family: 'Inconsolata';
src: url("/static/Inconsolata.otf");
}
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
html, body { html, body {
font-family: 'Source Sans Pro';
background: #F5F5F5; background: #F5F5F5;
overflow: hidden; font-family: 'sans serif';
} }
#header { #header {
background: #FFF; background: #FFF;
height: 48px; height: 48px;
line-height: 48px; line-height: 48px;
/*box-shadow: 0 5px 3px rgba(0, 0, 0, 0.1);*/
/*z-index: 1;*/
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -26,7 +18,7 @@ html, body {
} }
h1 { h1 {
font-family: 'Inconsolata'; font-family: 'Inconsolata', 'Consolas', 'Ubuntu Mono', monospace;
font-size: 32px; font-size: 32px;
float: left; float: left;
padding: 0 40px; padding: 0 40px;
@ -40,8 +32,6 @@ small {
.grey { .grey {
color: #999; color: #999;
/*font-size: 16px;*/
/*vertical-align: middle;*/
} }
ul { ul {
@ -56,7 +46,7 @@ li {
#header a { #header a {
color: #777; color: #777;
padding: 0 20px; padding: 0 20px;
font-family: 'Source Sans Pro'; font-family: 'Open Sans', 'sans-serif';
font-size: 14px; font-size: 14px;
text-decoration: none; text-decoration: none;
height: 100%; height: 100%;
@ -68,14 +58,6 @@ li {
background: #EEE; background: #EEE;
} }
/*#map-wrapper {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: -1;
}*/
@ -98,10 +80,9 @@ li {
top: 0; top: 0;
right: 0; right: 0;
/*bottom: 0;*/ /*bottom: 0;*/
min-width: 200px; min-width: 250px;
z-index: 999; z-index: 999;
/*overflow-y: auto;*/ /*overflow-y: scroll;*/
/*overflow: hidden;*/
font-size: 12px; font-size: 12px;
} }
@ -112,6 +93,7 @@ li {
/*top: 0;*/ /*top: 0;*/
/*right: 10px;*/ /*right: 10px;*/
/*z-index: 5;*/ /*z-index: 5;*/
font-size: 10px;
} }
#search-box { #search-box {
width: 100%; width: 100%;
@ -137,11 +119,6 @@ h2 {
color: #29BBFF; color: #29BBFF;
} }
#node-info {
/*position: absolute;*/
/*overflow-y: scroll;*/
/*background: rgba(220, 220, 220, 0.8);*/
}
#node-info table { #node-info table {
width: 100%; width: 100%;
} }
@ -156,13 +133,13 @@ h2 {
} }
.tt { .tt {
font-family: 'Source Code Pro', Consolas, monospace; font-family: monospace;
font-size: 10px; font-size: 10px;
} }
.autocomplete-suggestions { .autocomplete-suggestions {
font-family: 'Source Code Pro', Consolas, monospace; font-family: monospace;
font-size: 12px; font-size: 10px;
border: 1px solid #FFF; border: 1px solid #FFF;
background: #FFF; background: #FFF;
overflow: auto; overflow: auto;

View File

@ -5,8 +5,6 @@
<title>fc00::/8</title> <title>fc00::/8</title>
<script src="static/jquery-2.0.3.min.js"></script> <script src="static/jquery-2.0.3.min.js"></script>
<script src="static/jquery.autocomplete.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'> <link href='static/style.css' rel='stylesheet' type='text/css'>
</head> </head>
<body> <body>
@ -14,9 +12,6 @@
<h1>fc00<span class="grey">::/8</span></h1> <h1>fc00<span class="grey">::/8</span></h1>
<ul> <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> <li><tt>{{ ip }}</tt></li>
</ul> </ul>
</div> </div>

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,22 +1,7 @@
from flask import Flask, render_template, request from flask import Flask, render_template, request
from flaskext.mysql import MySQL
import MySQLdb
from pprint import pprint
app = Flask(__name__) app = Flask(__name__)
app.debug = True app.debug = False
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.context_processor @app.context_processor
@ -24,27 +9,11 @@ def add_ip():
return dict(ip=request.environ['REMOTE_ADDR']) return dict(ip=request.environ['REMOTE_ADDR'])
@app.route('/') @app.route('/')
@app.route('/network') @app.route('/network')
def page_network(): def page_network():
return render_template('network.html') 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__': if __name__ == '__main__':
app.run(host='::') app.run(host='::')