2020-08-13 14:38:36 +00:00
|
|
|
{% extends ../base.html %}
|
|
|
|
|
|
|
|
{% block title %}Crafty Controller - Dashboard{% end %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<div class="content-wrapper">
|
|
|
|
|
|
|
|
<!-- Page Title Header Starts-->
|
|
|
|
<div class="row page-title-header">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="page-header">
|
|
|
|
<h4 class="page-title">Dashboard</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- Page Title Header Ends-->
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 grid-margin">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-6">
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="wrapper">
|
2020-08-17 02:47:53 +00:00
|
|
|
<h5 class="mb-1 font-weight-medium text-primary"> Host</h5>
|
|
|
|
<h3 class="mb-0 font-weight-semibold"> <i class="fas fa-chart-line"></i></h3>
|
2020-08-13 14:38:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wrapper my-auto ml-auto ml-lg-4">
|
2020-08-19 01:04:43 +00:00
|
|
|
<p class="mb-0 text-success">{{ data.get('hosts_data').get('cpu_usage') }} {{ _('CPU Usage') }}</p>
|
|
|
|
<p class="mb-0 text-danger">{{ data.get('hosts_data').get('mem_percent') }}% {{ _('Memory Usage') }}</p>
|
2020-08-13 14:38:36 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-3 col-md-6 mt-md-0 mt-4">
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="wrapper">
|
|
|
|
<h5 class="mb-1 font-weight-medium text-primary">Servers</h5>
|
2020-08-19 01:04:43 +00:00
|
|
|
<h3 class="mb-0 font-weight-semibold">{{ data['server_stats']['total'] }}</h3>
|
2020-08-13 14:38:36 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wrapper my-auto ml-auto ml-lg-4">
|
2020-08-24 17:08:17 +00:00
|
|
|
<p class="mb-0 text-success">{{ data['server_stats']['running'] }} {{_('Online')}}</p>
|
|
|
|
<p class="mb-0 text-warning"> {{ data['server_stats']['stopped'] }} {{_('Shutdown')}}</p>
|
2020-08-13 14:38:36 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-3 col-md-6 mt-md-0 mt-4">
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="wrapper">
|
|
|
|
<h5 class="mb-1 font-weight-medium text-primary">Players</h5>
|
|
|
|
<h3 class="mb-0 font-weight-semibold">18</h3>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wrapper my-auto ml-auto ml-lg-4">
|
|
|
|
<p class="mb-0 text-success">35 Max (24 H)</p>
|
|
|
|
<p class="mb-0 text-warning">10 Avg (24 H)</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-3 col-md-6 mt-md-0 mt-4">
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="wrapper">
|
|
|
|
|
|
|
|
<h5 class="mb-1 font-weight-medium text-primary">Backups</h5>
|
|
|
|
<h3 class="mb-0 font-weight-semibold">7</h3>
|
|
|
|
</div>
|
|
|
|
<div class="wrapper my-auto ml-auto ml-lg-4">
|
|
|
|
<p class="mb-0 text-success">Last: 11-31-2020</p>
|
|
|
|
<p class="mb-0 text-success">Next: 12-05-2020</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 col-lg-12 grid-margin stretch-card">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header header-sm d-flex justify-content-between align-items-center">
|
|
|
|
<h4 class="card-title">All Servers</h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr class="rounded">
|
|
|
|
<th>Server</th>
|
2020-08-24 17:08:17 +00:00
|
|
|
<th>Actions</th>
|
2020-08-13 14:38:36 +00:00
|
|
|
<th>CPU</th>
|
|
|
|
<th>Memory</th>
|
2020-08-24 17:08:17 +00:00
|
|
|
<th>World</th>
|
2020-08-13 14:38:36 +00:00
|
|
|
<th>Players</th>
|
|
|
|
<th>Status</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-08-24 17:08:17 +00:00
|
|
|
{% for server in data['servers'] %}
|
2020-08-13 14:38:36 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2020-08-24 17:08:17 +00:00
|
|
|
<i class="fas fa-server"></i>
|
|
|
|
<a href="/panel/server_detail?id={{s['server_id']}}">
|
|
|
|
{{ server['server_id']['server_name'] }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
|
2020-08-13 14:38:36 +00:00
|
|
|
<td>
|
2020-08-24 17:08:17 +00:00
|
|
|
{% if server['started'] == True %}
|
|
|
|
<a hidden data-id="server['server_id']['server_id']" class="play_button hidden"><i class="fas fa-play"></i></a>
|
|
|
|
<a data-id="server['server_id']['server_id']" class="stop_button"><i class="fas fa-stop"></i></a>
|
|
|
|
<a data-id="server['server_id']['server_id']" class="restart_button"><i class="fas fa-sync"></i></a>
|
|
|
|
{% else %}
|
|
|
|
<a data-id="server['server_id']['server_id']" class="play_button"><i class="fas fa-play"></i></a>
|
|
|
|
<a hidden data-id="server['server_id']['server_id']" class="stop_button hidden"><i class="fas fa-stop"></i></a>
|
|
|
|
<a hidden data-id="server['server_id']['server_id']" class="restart_button hidden"><i class="fas fa-sync"></i></a>
|
|
|
|
{% end %}
|
2020-08-13 14:38:36 +00:00
|
|
|
</td>
|
2020-08-24 17:08:17 +00:00
|
|
|
|
2020-08-13 14:38:36 +00:00
|
|
|
<td>
|
|
|
|
<div class="progress">
|
2020-08-24 17:08:17 +00:00
|
|
|
<div class="progress-bar bg-success" role="progressbar" style="width: {{server['cpu']}}%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
2020-08-13 14:38:36 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
2020-08-24 17:08:17 +00:00
|
|
|
|
2020-08-13 14:38:36 +00:00
|
|
|
<td>
|
|
|
|
<div class="progress">
|
2020-08-24 17:08:17 +00:00
|
|
|
<div class="progress-bar bg-danger" role="progressbar" style="{{server['mem']}}%" aria-valuenow="24" aria-valuemin="0" aria-valuemax="100"></div>
|
2020-08-13 14:38:36 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2020-08-24 17:08:17 +00:00
|
|
|
{{ server['world_name'] }} : {{ server['world_size'] }}
|
2020-08-13 14:38:36 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2020-08-24 17:08:17 +00:00
|
|
|
{{ server['int_ping_results'] }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if server['started'] == True %}
|
2020-08-13 14:38:36 +00:00
|
|
|
<i class="fas fa-thumbs-up"></i> <span class="text-success">Online</span>
|
2020-08-24 17:08:17 +00:00
|
|
|
{% else %}
|
|
|
|
<i class="fas fa-thumbs-down"></i> <span class="text-danger">Offline</span>
|
|
|
|
{% end %}
|
2020-08-13 14:38:36 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2020-08-24 17:08:17 +00:00
|
|
|
{% end %}
|
2020-08-13 14:38:36 +00:00
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-08-24 17:08:17 +00:00
|
|
|
|
|
|
|
|
2020-08-13 14:38:36 +00:00
|
|
|
</div>
|
|
|
|
<!-- content-wrapper ends -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% end %}
|