mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Add mobile menu to pages without it
This commit is contained in:
parent
6c360d1ff1
commit
177d99e002
@ -32,7 +32,12 @@
|
|||||||
<div class="col-sm-12 grid-margin">
|
<div class="col-sm-12 grid-margin">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body pt-0">
|
<div class="card-body pt-0">
|
||||||
{% include "parts/server_controls_list.html" %}
|
<span class="d-none d-sm-block">
|
||||||
|
{% include "parts/server_controls_list.html %}
|
||||||
|
</span>
|
||||||
|
<span class="d-block d-sm-none">
|
||||||
|
{% include "parts/m_server_controls_list.html %}
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-sm-12">
|
<div class="col-md-6 col-sm-12">
|
||||||
@ -82,14 +87,15 @@
|
|||||||
{% if data['server_stats']['server_type'] == "minecraft-java" %}
|
{% if data['server_stats']['server_type'] == "minecraft-java" %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="java_selection">{{ translate('serverConfig', 'javaVersion', data['lang']) }}
|
<label for="java_selection">{{ translate('serverConfig', 'javaVersion', data['lang']) }}
|
||||||
<small class="text-muted ml-1">{{ translate('serverConfig', 'javaVersionDesc', data['lang']) }}</small>
|
<small class="text-muted ml-1">{{ translate('serverConfig', 'javaVersionDesc', data['lang'])
|
||||||
|
}}</small>
|
||||||
</label>
|
</label>
|
||||||
<select class="form-select form-control form-control-lg select-css" id="java_selection"
|
<select class="form-select form-control form-control-lg select-css" id="java_selection"
|
||||||
name="java_selection" form="config_form">
|
name="java_selection" form="config_form">
|
||||||
<option value="">{{ translate('serverConfig',
|
<option value="">{{ translate('serverConfig',
|
||||||
'javaNoChange', data['lang'])}}</option>
|
'javaNoChange', data['lang'])}}</option>
|
||||||
{% for path in data['java_versions'] %}
|
{% for path in data['java_versions'] %}
|
||||||
<option value="{{path}}">{{path}}</option>
|
<option value="{{path}}">{{path}}</option>
|
||||||
{% end %}
|
{% end %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -106,94 +112,94 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<label for="execution_command">{{ translate('serverConfig', 'serverExecutionCommand', data['lang']) }}
|
<label for="execution_command">{{ translate('serverConfig', 'serverExecutionCommand', data['lang']) }}
|
||||||
<div class="card-header header-sm d-flex justify-content-between align-items-center">
|
<div class="card-header header-sm d-flex justify-content-between align-items-center">
|
||||||
<span style="color: gray;">{{ data['server_stats']['server_id']['execution_command'] }}</span> 🔒
|
<span style="color: gray;">{{ data['server_stats']['server_id']['execution_command'] }}</span> 🔒
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="stop_command">{{ translate('serverConfig', 'serverStopCommand', data['lang']) }} <small
|
<label for="stop_command">{{ translate('serverConfig', 'serverStopCommand', data['lang']) }} <small
|
||||||
class="text-muted ml-1"> - {{ translate('serverConfig', 'serverStopCommandDesc', data['lang'])
|
class="text-muted ml-1"> - {{ translate('serverConfig', 'serverStopCommandDesc', data['lang'])
|
||||||
}}</small> </label>
|
}}</small> </label>
|
||||||
<input type="text" class="form-control" name="stop_command" id="stop_command"
|
<input type="text" class="form-control" name="stop_command" id="stop_command"
|
||||||
value="{{ data['server_stats']['server_id']['stop_command'] }}"
|
value="{{ data['server_stats']['server_id']['stop_command'] }}"
|
||||||
placeholder="{{ translate('serverConfig', 'serverStopCommand', data['lang']) }}" required>
|
placeholder="{{ translate('serverConfig', 'serverStopCommand', data['lang']) }}" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="auto_start_delay">{{ translate('serverConfig', 'serverAutostartDelay', data['lang']) }}
|
<label for="auto_start_delay">{{ translate('serverConfig', 'serverAutostartDelay', data['lang']) }}
|
||||||
<small class="text-muted ml-1"> - {{ translate('serverConfig', 'serverAutostartDelayDesc',
|
<small class="text-muted ml-1"> - {{ translate('serverConfig', 'serverAutostartDelayDesc',
|
||||||
data['lang']) }}</small> </label>
|
data['lang']) }}</small> </label>
|
||||||
<input type="number" class="form-control" name="auto_start_delay" id="auto_start_delay"
|
<input type="number" class="form-control" name="auto_start_delay" id="auto_start_delay"
|
||||||
value="{{ data['server_stats']['server_id']['auto_start_delay'] }}" step="1" max="999" min="10"
|
value="{{ data['server_stats']['server_id']['auto_start_delay'] }}" step="1" max="999" min="10"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if data['super_user'] %}
|
{% if data['super_user'] %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="executable_update_url">{{ translate('serverConfig', 'exeUpdateURL', data['lang']) }}
|
<label for="executable_update_url">{{ translate('serverConfig', 'exeUpdateURL', data['lang']) }}
|
||||||
<small class="text-muted ml-1"> - {{ translate('serverConfig', 'exeUpdateURLDesc', data['lang'])
|
<small class="text-muted ml-1"> - {{ translate('serverConfig', 'exeUpdateURLDesc', data['lang'])
|
||||||
}}</small> </label>
|
}}</small> </label>
|
||||||
<input type="text" class="form-control" name="executable_update_url" id="executable_update_url"
|
<input type="text" class="form-control" name="executable_update_url" id="executable_update_url"
|
||||||
value="{{ data['server_stats']['server_id']['executable_update_url'] }}"
|
value="{{ data['server_stats']['server_id']['executable_update_url'] }}"
|
||||||
placeholder="{{ translate('serverConfig', 'exeUpdateURL', data['lang']) }}">
|
placeholder="{{ translate('serverConfig', 'exeUpdateURL', data['lang']) }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="server_ip">{{ translate('serverConfig', 'serverIP', data['lang']) }} <small
|
<label for="server_ip">{{ translate('serverConfig', 'serverIP', data['lang']) }} <small
|
||||||
class="text-muted ml-1">- {{ translate('serverConfig', 'serverIPDesc', data['lang']) }}</small>
|
class="text-muted ml-1">- {{ translate('serverConfig', 'serverIPDesc', data['lang']) }}</small>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control" name="server_ip" id="server_ip"
|
<input type="text" class="form-control" name="server_ip" id="server_ip"
|
||||||
value="{{ data['server_stats']['server_id']['server_ip'] }}" required>
|
value="{{ data['server_stats']['server_id']['server_ip'] }}" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="server_port">{{ translate('serverConfig', 'serverPort', data['lang']) }} <small
|
<label for="server_port">{{ translate('serverConfig', 'serverPort', data['lang']) }} <small
|
||||||
class="text-muted ml-1"> - {{ translate('serverConfig', 'serverPortDesc', data['lang']) }}
|
class="text-muted ml-1"> - {{ translate('serverConfig', 'serverPortDesc', data['lang']) }}
|
||||||
</small> </label>
|
</small> </label>
|
||||||
<input type="number" class="form-control" name="server_port" id="server_port"
|
<input type="number" class="form-control" name="server_port" id="server_port"
|
||||||
value="{{ data['server_stats']['server_id']['server_port'] }}" step="1" max="65566" min="1"
|
value="{{ data['server_stats']['server_id']['server_port'] }}" step="1" max="65566" min="1"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="logs_delete_after">{{ translate('serverConfig', 'removeOldLogsAfter', data['lang']) }}
|
<label for="logs_delete_after">{{ translate('serverConfig', 'removeOldLogsAfter', data['lang']) }}
|
||||||
<small class="text-muted ml-1"> - {{ translate('serverConfig', 'removeOldLogsAfterDesc',
|
<small class="text-muted ml-1"> - {{ translate('serverConfig', 'removeOldLogsAfterDesc',
|
||||||
data['lang']) }}</small> </label>
|
data['lang']) }}</small> </label>
|
||||||
<input type="number" class="form-control" name="logs_delete_after" id="logs_delete_after"
|
<input type="number" class="form-control" name="logs_delete_after" id="logs_delete_after"
|
||||||
value="{{ data['server_stats']['server_id']['logs_delete_after'] }}" step="1" max="365" min="0"
|
value="{{ data['server_stats']['server_id']['logs_delete_after'] }}" step="1" max="365" min="0"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-check-flat">
|
<div class="form-check-flat">
|
||||||
<label for="auto_start" class="form-check-label ml-4 mb-4">
|
<label for="auto_start" class="form-check-label ml-4 mb-4">
|
||||||
{% if data['server_stats']['server_id']['auto_start'] %}
|
{% if data['server_stats']['server_id']['auto_start'] %}
|
||||||
<input type="checkbox" class="form-check-input" id="auto_start" name="auto_start" checked=""
|
<input type="checkbox" class="form-check-input" id="auto_start" name="auto_start" checked=""
|
||||||
value="1">{{ translate('serverConfig', 'serverAutoStart', data['lang']) }}
|
value="1">{{ translate('serverConfig', 'serverAutoStart', data['lang']) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<input type="checkbox" class="form-check-input" id="auto_start" name="auto_start" value="1">{{
|
<input type="checkbox" class="form-check-input" id="auto_start" name="auto_start" value="1">{{
|
||||||
translate('serverConfig', 'serverAutoStart', data['lang']) }}
|
translate('serverConfig', 'serverAutoStart', data['lang']) }}
|
||||||
{% end %}
|
{% end %}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="crash_detection" class="form-check-label ml-4 mb-4">
|
<label for="crash_detection" class="form-check-label ml-4 mb-4">
|
||||||
{% if data['server_stats']['server_id']['crash_detection'] %}
|
{% if data['server_stats']['server_id']['crash_detection'] %}
|
||||||
<input type="checkbox" class="form-check-input" id="crash_detection" name="crash_detection"
|
<input type="checkbox" class="form-check-input" id="crash_detection" name="crash_detection"
|
||||||
checked="" value="1">{{ translate('serverConfig', 'serverCrashDetection', data['lang']) }}
|
checked="" value="1">{{ translate('serverConfig', 'serverCrashDetection', data['lang']) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<input type="checkbox" class="form-check-input" id="crash_detection" name="crash_detection"
|
<input type="checkbox" class="form-check-input" id="crash_detection" name="crash_detection"
|
||||||
value="1">{{ translate('serverConfig', 'serverCrashDetection', data['lang']) }}
|
value="1">{{ translate('serverConfig', 'serverCrashDetection', data['lang']) }}
|
||||||
{% end %}
|
{% end %}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-success mr-2"><i class="fas fa-save"></i> {{
|
<button type="submit" class="btn btn-success mr-2"><i class="fas fa-save"></i> {{
|
||||||
translate('serverConfig', 'save', data['lang']) }}</button>
|
translate('serverConfig', 'save', data['lang']) }}</button>
|
||||||
<button type="reset" class="btn btn-light"><i class="fas fa-times"></i> {{ translate('serverConfig',
|
<button type="reset" class="btn btn-light"><i class="fas fa-times"></i> {{ translate('serverConfig',
|
||||||
'cancel', data['lang']) }}</button>
|
'cancel', data['lang']) }}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -396,4 +402,4 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
@ -32,7 +32,12 @@
|
|||||||
<div class="col-sm-12 grid-margin">
|
<div class="col-sm-12 grid-margin">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body pt-0">
|
<div class="card-body pt-0">
|
||||||
{% include "parts/server_controls_list.html" %}
|
<span class="d-none d-sm-block">
|
||||||
|
{% include "parts/server_controls_list.html %}
|
||||||
|
</span>
|
||||||
|
<span class="d-block d-sm-none">
|
||||||
|
{% include "parts/m_server_controls_list.html %}
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-sm-12">
|
<div class="col-md-6 col-sm-12">
|
||||||
@ -212,7 +217,9 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body, body > .container-scroller {
|
html,
|
||||||
|
body,
|
||||||
|
body>.container-scroller {
|
||||||
overflow: initial;
|
overflow: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +292,7 @@
|
|||||||
mac: 'Command-S',
|
mac: 'Command-S',
|
||||||
sender: 'editor|cli'
|
sender: 'editor|cli'
|
||||||
},
|
},
|
||||||
exec: function(env, args, request) {
|
exec: function (env, args, request) {
|
||||||
save()
|
save()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1097,7 +1104,7 @@
|
|||||||
if (handlerName == 'null') handlerName = null;
|
if (handlerName == 'null') handlerName = null;
|
||||||
editor.setKeyboardHandler(handlerName, () => {
|
editor.setKeyboardHandler(handlerName, () => {
|
||||||
if (handlerName == 'ace/keyboard/vim') {
|
if (handlerName == 'ace/keyboard/vim') {
|
||||||
require("ace/keyboard/vim").Vim.defineEx('write', 'w', function() {
|
require("ace/keyboard/vim").Vim.defineEx('write', 'w', function () {
|
||||||
save();
|
save();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1117,4 +1124,4 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
@ -9,14 +9,15 @@
|
|||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<!-- Page Title Header Starts-->
|
<!-- Page Title Header Starts-->
|
||||||
<div class="row page-title-header">
|
<div class="row page-title-header">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h4 class="page-title">
|
<h4 class="page-title">
|
||||||
{{ translate('serverDetails', 'serverDetails', data['lang']) }} - {{ data['server_stats']['server_id']['server_name'] }}
|
{{ translate('serverDetails', 'serverDetails', data['lang']) }} - {{
|
||||||
<br />
|
data['server_stats']['server_id']['server_name'] }}
|
||||||
<small>UUID: {{ data['server_stats']['server_id']['server_uuid'] }}</small>
|
<br />
|
||||||
|
<small>UUID: {{ data['server_stats']['server_id']['server_uuid'] }}</small>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -24,23 +25,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Page Title Header Ends-->
|
<!-- Page Title Header Ends-->
|
||||||
|
|
||||||
{% include "parts/details_stats.html" %}
|
{% include "parts/details_stats.html" %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-12 grid-margin">
|
<div class="col-sm-12 grid-margin">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body pt-0">
|
<div class="card-body pt-0">
|
||||||
{% include "parts/server_controls_list.html" %}
|
<span class="d-none d-sm-block">
|
||||||
|
{% include "parts/server_controls_list.html %}
|
||||||
|
</span>
|
||||||
|
<span class="d-block d-sm-none">
|
||||||
|
{% include "parts/m_server_controls_list.html %}
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div id="virt_console" class="" style="font-size: .8em; padding: 5px 10px; border: 1px solid #383e5d; background-color:#2a2c44;height:500px; overflow: scroll;"></div>
|
<div id="virt_console" class=""
|
||||||
|
style="font-size: .8em; padding: 5px 10px; border: 1px solid #383e5d; background-color:#2a2c44;height:500px; overflow: scroll;">
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,8 +65,8 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
const serverId = new URLSearchParams(document.location.search).get('id')
|
const serverId = new URLSearchParams(document.location.search).get('id')
|
||||||
function get_server_log(){
|
function get_server_log() {
|
||||||
if( !$("#stop_scroll").is(':checked')){
|
if (!$("#stop_scroll").is(':checked')) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '/ajax/server_log?id=' + serverId + '&full=1',
|
url: '/ajax/server_log?id=' + serverId + '&full=1',
|
||||||
@ -78,21 +86,21 @@
|
|||||||
return r ? r[1] : undefined;
|
return r ? r[1] : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$(document).ready(function () {
|
||||||
console.log( "ready!" );
|
console.log("ready!");
|
||||||
get_server_log()
|
get_server_log()
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function scroll(){
|
function scroll() {
|
||||||
var logview = $('#virt_console');
|
var logview = $('#virt_console');
|
||||||
if(logview.length)
|
if (logview.length)
|
||||||
logview.scrollTop(logview[0].scrollHeight - logview.height());
|
logview.scrollTop(logview[0].scrollHeight - logview.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
Loading…
x
Reference in New Issue
Block a user