david/factoriocp
david
/
factoriocp
Archived
1
0
Fork 0

minor changes

This commit is contained in:
david 2016-11-22 09:08:59 +01:00
parent 7ba18be952
commit 82062eb734
3 changed files with 15 additions and 22 deletions

View File

@ -17,3 +17,5 @@ fqdn=factorio.socialnerds.org
[factorio]
path=/path/to/factorio/servers
users=username anotheruser athirduser
# this is the lowest port
port=34197

View File

@ -41,9 +41,10 @@ def log_in(username, password):
# get a list of server dicts
def get_servers():
pass
return [{ "name": "Creative fun", "version": "0.14.20", "status": "online", "port": "43564" },
{ "name": "Mad enemies", "version": "0.14.19", "status": "offline", "port": "65432" },
{ "name": "Mad enemies2", "version": "0.14.19", "status": "offline", "port": "65431" }]
return [{ "name": "Creative fun", "desc": "A creative vanilla server for tests.", "version": "0.14.20", "status": "online", "port": "34197" },
{ "name": "Vanilla on the rocks", "desc": "Vanilla map with some mods.", "version": "0.14.19", "status": "offline", "port": "34198" },
{ "name": "Mad enemies", "desc": "Hazardous map. A lot of enemies.", "version": "0.14.19", "status": "online", "port": "34199" },
{ "name": "Mad enemies2", "desc": "Just a copy of Mad enemies.", "version": "0.14.20", "status": "offline", "port": "34200" }]
# routing

View File

@ -2,14 +2,14 @@
<!-- Begin page content -->
<div class="container">
<div class="row">
<div class="col-sm-8">
<div class="col-sm-9">
%if server['status'] == "online":
<h1>{{ server['name'] }}<sup><span class="tag tag-success tag-sm">Online</span></sup></h1>
%else:
<h1>{{ server['name'] }}<sup><span class="tag tag-danger tag-sm">Offline</span></sup></h1>
%end
</div>
<div class="col-sm-4 text-xs-right">
<div class="col-sm-3 text-xs-right">
<div class="btn-group">
<button type="button" class="btn btn-outline-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ username }}
@ -25,7 +25,7 @@
</div>
</div>
</div>
<p class="lead">Some fon server description goes here.</p>
<p class="lead">{{ server['desc'] }}</p>
<table class="table">
<tr>
@ -46,7 +46,7 @@
<td><code>{{ fqdn }}:{{ server['port'] }}</code></td>
<td><code>{{ server['version'] }}</code></td>
<td class="text-xs-right">
<a href="/start" type="button" class="btn btn-outline-success btn-sm">Start</a>
<a href="/start/{{ server['port'] }}" type="button" class="btn btn-outline-success btn-sm">Start</a>
<a href="/delete/{{ server['port'] }}" type="button" class="btn btn-outline-danger btn-sm">Delete</a>
</td>
</tr>
@ -56,41 +56,31 @@
<p>
<h4>Settings</h4>
<hr>
<form class="form-inline">
<input>
</form>
blabla
</p>
<p>
<h4>Backups</h4>
<hr>
<form class="form-inline">
<input>
</form>
blabla
</p>
<p>
<h4>Mods</h4>
<hr>
<form class="form-inline">
<input>
</form>
blabla
</p>
<p>
<h4>Screenshots</h4>
<hr>
<form class="form-inline">
<input>
</form>
blabla
</p>
<p>
<h4>Console</h4>
<hr>
<form class="form-inline">
<input>
</form>
blabla
</p>