Permalink
Browse files

Remove 30 day chart because it does not work at all

  • Loading branch information...
Jan Kelin
Jan Kelin committed Dec 2, 2018
1 parent 3bf2187 commit e231a1a5068f3af4145f2ba0f839b45f7b2ab01b
Showing with 120 additions and 106 deletions.
  1. +120 −106 views/server.handlebars
@@ -1,8 +1,8 @@
{{#if alerts}}
{{#each alerts}}
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{{text}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{{text}}
</div>
{{/each}}
{{/if}}
@@ -11,120 +11,134 @@
<h2>{{data.name}} <small>{{data._id}}</small></h2>
{{#if online}}
<h4 style="color:#00AA00">Online</h4>
{{else}}
{{else}}
<h4 style="color:#AA0000">Offline</h4>
{{/if}}
<table class="table table-bordered">
<tr><td>Admin name</td><td>{{data.adminname}}</td></tr>
<tr><td>Admin email</td><td>{{data.adminemail}}</td></tr>
<tr><td>Time online</td><td>{{showMinutes data.minutesonline}}</td></tr>
<tr><td>Max players</td><td>{{data.maxplayers}}</td></tr>
<tr><td>Last seen</td><td>{{showMoment data.lastseen}}</td></tr>
<tr>
<td>Last full report</td>
{{#if data.lastfullreport}}
<td>{{showMoment data.lastfullreport}}</td>
{{else}}
<td>Never (<a href="https://github.com/jkelin/TribesVengeanceServerStatus">server side mod</a> is not installed)</td>
{{/if}}
</tr>
{{#if online}}
<tr class="server-map-row">
<td>Map</td>
<td class="server-map-td">
<div class="server-map">
<span class="server-map-description">
[{{data.lastdata.gametype}}] {{mapName data.lastdata.mapname}}
</span>
{{#if data.lastdata.mapnamefull}}
<span class="server-map-thumbnail hidden-xs">
<a href="{{mapImage data.lastdata.mapnamefull "loadscreens-chopped" false}}" target="_blank">
<img width="91" height="44" src="{{mapImage data.lastdata.mapnamefull "loadscreens-chopped" true}}" alt="{{data.lastdata.mapname}}">
</a>
</span>
{{/if}}
{{#if data.lastdata.mapnamefull}}
<span style="margin-left: 8px" class="server-map-thumbnail hidden-xs">
<a href="{{mapImage data.lastdata.mapnamefull "maps" false}}" target="_blank">
<img width="44" height="44" src="{{mapImage data.lastdata.mapnamefull "maps" true}}" alt="{{data.lastdata.mapname}}">
</a>
</span>
{{/if}}
</div>
</td>
</tr>
<tr>
<td>Admin name</td>
<td>{{data.adminname}}</td>
</tr>
<tr>
<td>Admin email</td>
<td>{{data.adminemail}}</td>
</tr>
<tr>
<td>Time online</td>
<td>{{showMinutes data.minutesonline}}</td>
</tr>
<tr>
<td>Max players</td>
<td>{{data.maxplayers}}</td>
</tr>
<tr>
<td>Last seen</td>
<td>{{showMoment data.lastseen}}</td>
</tr>
<tr>
<td>Last full report</td>
{{#if data.lastfullreport}}
<td>{{showMoment data.lastfullreport}}</td>
{{else}}
<td>Never (<a href="https://github.com/jkelin/TribesVengeanceServerStatus">server side mod</a> is not installed)</td>
{{/if}}
</tr>
{{#if online}}
<tr class="server-map-row">
<td>Map</td>
<td class="server-map-td">
<div class="server-map">
<span class="server-map-description">
[{{data.lastdata.gametype}}] {{mapName data.lastdata.mapname}}
</span>
{{#if data.lastdata.mapnamefull}}
<span class="server-map-thumbnail hidden-xs">
<a href="{{mapImage data.lastdata.mapnamefull "loadscreens-chopped" false}}" target="_blank">
<img width="91" height="44" src="{{mapImage data.lastdata.mapnamefull "loadscreens-chopped" true}}" alt="{{data.lastdata.mapname}}">
</a>
</span>
{{/if}}
{{#if data.lastdata.mapnamefull}}
<span style="margin-left: 8px" class="server-map-thumbnail hidden-xs">
<a href="{{mapImage data.lastdata.mapnamefull "maps" false}}" target="_blank">
<img width="44" height="44" src="{{mapImage data.lastdata.mapnamefull "maps" true}}" alt="{{data.lastdata.mapname}}">
</a>
</span>
{{/if}}
</div>
</td>
</tr>
{{/if}}
</table>

{{#if data.lastdata.players}}
<h3>Players</h3>
<table class="table table-bordered">
<tr>
<th>Name</th>
<th>Score</th>
<th>Team</th>
<th>Ping</th>
</tr>
{{#if data.lastdata.players}}
<h3>Players</h3>
<table class="table table-bordered">
<tr>
<th>Name</th>
<th>Score</th>
<th>Team</th>
<th>Ping</th>
</tr>

{{#each data.lastdata.players}}
<tr>
<td><a href="/player/{{urlencode player}}">{{player}}</a></td>
<td>{{score}}</td>
<td>{{team}}</td>
<td>{{ping}}</td>
</tr>
{{/each}}
</table>
{{/if}}
{{#each data.lastdata.players}}
<tr>
<td><a href="/player/{{urlencode player}}">{{player}}</a></td>
<td>{{score}}</td>
<td>{{team}}</td>
<td>{{ping}}</td>
</tr>
{{/each}}
</table>
{{/if}}

{{#if chatOk}}
<h3>Chat</h3>
<div id="chat-container">
{{#each chat}}
{{> chatitem}}
{{/each}}
{{#if chatOk}}
<h3>Chat</h3>
<div id="chat-container">
{{#each chat}}
{{> chatitem}}
{{/each}}
</div>
<br>
<form action="#" id="chat-form" class="form">
<div class="row">
<div class="col-sm-2">
<div class="checkbox">
<label>
<input type="checkbox" id="notif"> Notifications
</label>
</div>
</div>
<br>
<form action="#" id="chat-form" class="form">
<div class="row">
<div class="col-sm-2">
<div class="checkbox">
<label>
<input type="checkbox" id="notif"> Notifications
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<input type="text" class="form-control input-sm" placeholder="Username" maxlength="29" required id="usr" pattern="(A-Za-z0-9\| \-_\?\*\/:\.){3,29}">
</div>
<div class="col-sm-8">
<input type="text" class="form-control input-sm" placeholder="Message" required maxlength="196" id="msg" pattern="(A-Za-z0-9\| \-_\?\*\/:\.)">
</div>
<div class="col-sm-2">
<button type="submit" class="btn btn-block btn-sm btn-primary" disabled data-loading-text="Sending..." id="snd">
Connecting...
</button>
</div>
</div>
</form>
{{/if}}

<br>
<div class="hidden-xs">
<h3>Number of players online in last {{numdays}} days</h3>
<a href="?days=2">2 Days</a> |
<a href="?days=5">5 Days</a> |
<a href="?days=7">7 Days</a> |
<a href="?days=30">30 Days</a>
<span id="chartdata" style="display:none">{{{json tracks}}}</span>
<span id="chatdata" style="display:none">{{{json chat}}}</span>
<span id="serverid" style="display:none">{{{json data._id}}}</span>
<div id="chart_div" style="width: 900px; height: 400px;margin-left:auto;margin-right:auto"></div>
<br>
<br>
</div>
<div class="row">
<div class="col-sm-2">
<input type="text" class="form-control input-sm" placeholder="Username" maxlength="29" required id="usr" pattern="(A-Za-z0-9\| \-_\?\*\/:\.){3,29}">
</div>
<div class="col-sm-8">
<input type="text" class="form-control input-sm" placeholder="Message" required maxlength="196" id="msg" pattern="(A-Za-z0-9\| \-_\?\*\/:\.)">
</div>
<div class="col-sm-2">
<button type="submit" class="btn btn-block btn-sm btn-primary" disabled data-loading-text="Sending..." id="snd">
Connecting...
</button>
</div>
</div>
</form>
{{/if}}

<br>
<div class="hidden-xs">
<h3>Number of players online in last {{numdays}} days</h3>
<a href="?days=2">2 Days</a> |
<a href="?days=5">5 Days</a> |
<a href="?days=7">7 Days</a>
<span id="chartdata" style="display:none">{{{json tracks}}}</span>
<span id="chatdata" style="display:none">{{{json chat}}}</span>
<span id="serverid" style="display:none">{{{json data._id}}}</span>
<div id="chart_div" style="width: 900px; height: 400px;margin-left:auto;margin-right:auto"></div>
<br>
<br>
</div>
{{else}}
Server not found
{{/if}}

0 comments on commit e231a1a

Please sign in to comment.