mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'dev' into bugfix/task-command
This commit is contained in:
commit
56d6b3b3cd
@ -3,7 +3,9 @@
|
||||
### New features
|
||||
TBD
|
||||
### Bug fixes
|
||||
TBD
|
||||
- Fix upload root files being hidden ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/590))
|
||||
- Send empty json for no banned/cached players ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/589))
|
||||
- Bump Tornado from 6.0 to 6.3.2 in response to CVE-2023-28370 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/591))
|
||||
### Tweaks
|
||||
TBD
|
||||
### Lang
|
||||
|
@ -529,8 +529,8 @@ class ServersController(metaclass=Singleton):
|
||||
content = file.read()
|
||||
file.close()
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
return None
|
||||
logger.error(ex)
|
||||
return {}
|
||||
|
||||
return json.loads(content)
|
||||
|
||||
@ -548,8 +548,8 @@ class ServersController(metaclass=Singleton):
|
||||
content = file.read()
|
||||
file.close()
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
return None
|
||||
logger.error(ex)
|
||||
return {}
|
||||
|
||||
return json.loads(content)
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
{% if player['status'] == 'online' %}
|
||||
<td><span class="text-success"><i class="fas fa-signal"></i> {{ player['status'] }}</span></td>
|
||||
{% elif player['status'] == 'offline' %}
|
||||
<td><span class="text-warning"><i class="fa-solid fa-signal-slash"></i> Last connexion : {{ player['last_seen'] }}</span></td>
|
||||
<td><span class="text-warning"><i class="fa-solid fa-signal-slash"></i> Last connection : {{ player['last_seen'] }}</span></td>
|
||||
{% end %}
|
||||
<td class="buttons">
|
||||
{% if data['server_stats']['running'] %}
|
||||
|
@ -45,69 +45,6 @@
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<style>
|
||||
.playerItem {
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 1rem 0px 1rem 0px;
|
||||
}
|
||||
|
||||
.playerItem h3 {
|
||||
vertical-align: middle;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
|
||||
.playerItem button {
|
||||
vertical-align: middle;
|
||||
margin: 0.25rem;
|
||||
}
|
||||
|
||||
.playerUnban {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.banned span {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
</style>
|
||||
<h2>{{ translate('serverPlayerManagement', 'players', data['lang']) }}:</h2>
|
||||
<ul style="list-style: none;padding: 0px;margin: 0px; margin-bottom: 1rem;gap: 1rem;">
|
||||
{% for player in data['get_players'] %}
|
||||
<li class="playerItem">
|
||||
<h3>{{ player }}</h3>
|
||||
<div class="buttons">
|
||||
<button onclick="send_command_to_server('ban {{ player }}')" type="button"
|
||||
class="btn btn-danger">Ban</button>
|
||||
<button onclick="send_command_to_server('kick {{ player }}')" type="button"
|
||||
class="btn btn-outline-danger">Kick</button>
|
||||
<button onclick="send_command_to_server('op {{ player }}')" type="button"
|
||||
class="btn btn-warning">OP</button>
|
||||
<button onclick="send_command_to_server('deop {{ player }}')" type="button"
|
||||
class="btn btn-outline-warning">De-OP</button>
|
||||
</div>
|
||||
</li>
|
||||
{% end %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h2>{{ translate('serverPlayerManagement', 'bannedPlayers', data['lang']) }}:</h2>
|
||||
<ul id="bannedPlayers" style="list-style: none;padding: 0px;margin: 0px; margin-bottom: 1rem;gap: 1rem;">
|
||||
<li class="playerItem banned">
|
||||
<h3>{{ translate('serverPlayerManagement', 'loadingBannedPlayers', data['lang']) }}</h3>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -553,6 +553,7 @@
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="zip_root_path" name="zip_root_path">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="dir_upload_select" tabindex="-1" role="dialog" aria-labelledby="dir_select" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
@ -596,7 +597,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
button>i.refresh-class {
|
||||
margin: 0px;
|
||||
@ -949,6 +949,7 @@
|
||||
|
||||
function show_file_tree() {
|
||||
if (upload) {
|
||||
console.log("upload true")
|
||||
$("#dir_upload_select").modal();
|
||||
} else {
|
||||
$("#dir_select").modal();
|
||||
|
@ -15,7 +15,7 @@ pyjwt==2.4.0
|
||||
PyYAML==5.4
|
||||
requests==2.26
|
||||
termcolor==1.1
|
||||
tornado==6.0
|
||||
tornado==6.3.2
|
||||
tzlocal==4.0
|
||||
jsonschema==4.5.1
|
||||
orjson==3.8.12
|
||||
|
Loading…
Reference in New Issue
Block a user