2020-09-04 04:02:03 +00:00
{% extends ../base.html %}
{% block meta %}
<!-- <meta http - equiv="refresh" content="60"> -->
{% end %}
{% block title %}Crafty Controller - Server Details{% 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" >
2021-03-22 04:02:18 +00:00
Server Details - {{ data['server_stats']['server_id']['server_name'] }}
2020-09-04 04:02:03 +00:00
< br / >
2021-03-22 04:02:18 +00:00
< small > UUID: {{ data['server_stats']['server_id']['server_uuid'] }}< / small >
2020-09-04 04:02:03 +00:00
< / h4 >
< / div >
< / div >
< / div >
<!-- Page Title Header Ends -->
{% include "parts/details_stats.html %}
< div class = "row" >
< div class = "col-sm-12 grid-margin" >
< div class = "card" >
< div class = "card-body pt-0" >
< ul class = "nav nav-tabs col-md-12 tab-simple-styled " role = "tablist" >
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=term" role = "tab" aria-selected = "false" >
2020-09-04 04:02:03 +00:00
< i class = "fas fa-file-signature" > < / i > Terminal< / a >
< / li >
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=logs" role = "tab" aria-selected = "false" >
2020-09-04 04:02:03 +00:00
< i class = "fas fa-file-signature" > < / i > Logs< / a >
< / li >
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=tasks" role = "tab" aria-selected = "false" >
2020-09-04 04:02:03 +00:00
< i class = "fas fa-clock" > < / i > Schedule< / a >
< / li >
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=backup" role = "tab" aria-selected = "false" >
2020-09-04 04:02:03 +00:00
< i class = "fas fa-save" > < / i > Backup< / a >
< / li >
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=files" role = "tab" aria-selected = "false" >
2020-09-04 04:02:03 +00:00
< i class = "fas fa-folder-tree" > < / i > Files< / a >
< / li >
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link active" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=config" role = "tab" aria-selected = "true" >
2020-09-04 04:02:03 +00:00
< i class = "fas fa-cogs" > < / i > Config< / a >
< / li >
2021-03-05 08:58:38 +00:00
< li class = "nav-item" >
2021-03-22 04:02:18 +00:00
< a class = "nav-link" href = "/panel/server_detail?id={{ data['server_stats']['server_id']['server_id'] }}&subpage=admin_controls" role = "tab" aria-selected = "true" >
2021-03-05 08:58:38 +00:00
< i class = "fas fa-users" > < / i > Player Controls< / a >
< / li >
2020-09-04 04:02:03 +00:00
< / ul >
< div class = "row" >
< div class = "col-md-6 col-sm-12" >
2020-09-04 18:05:42 +00:00
< form class = "forms-sample" method = "post" action = "/panel/server_detail" >
{% raw xsrf_form_html() %}
2021-03-22 04:02:18 +00:00
< input type = "hidden" name = "id" value = "{{ data['server_stats']['server_id']['server_id'] }}" >
2020-09-04 18:05:42 +00:00
< input type = "hidden" name = "subpage" value = "config" >
< div class = "form-group" >
< label for = "server_name" > Server Name < small class = "text-muted ml-1" > - What you wish to call this server< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "server_name" id = "server_name" value = "{{ data['server_stats']['server_id']['server_name'] }}" placeholder = "Server Name" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
< label for = "server_path" > Server Path < small class = "text-muted ml-1" > - Absolute full path (not including executable)< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "server_path" id = "server_path" value = "{{ data['server_stats']['server_id']['path'] }}" placeholder = "Server Path" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
< label for = "log_path" > Server Log Location < small class = "text-muted ml-1" > - Absolute full path to the log file< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "log_path" id = "log_path" value = "{{ data['server_stats']['server_id']['log_path'] }}" placeholder = "Server Log" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
< label for = "executable" > Server Executable < small class = "text-muted ml-1" > - Just the executable file< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "executable" id = "executable" value = "{{ data['server_stats']['server_id']['executable'] }}" placeholder = "Server Executable" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
< label for = "execution_command" > Server Execution Command < small class = "text-muted ml-1" > - What will be launched in a hidden terminal< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "execution_command" id = "execution_command" value = "{{ data['server_stats']['server_id']['execution_command'] }}" placeholder = "Server Execution Command" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
< label for = "stop_command" > Server Stop Command < small class = "text-muted ml-1" > - Command to send the program to stop it< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "stop_command" id = "stop_command" value = "{{ data['server_stats']['server_id']['stop_command'] }}" placeholder = "Server Stop Command" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
< label for = "auto_start_delay" > Server Autostart Delay < small class = "text-muted ml-1" > - Delay before auto starting (if enabled below)< / small > < / label >
2021-03-22 04:02:18 +00:00
< 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" >
2020-09-04 18:05:42 +00:00
< / div >
< div class = "form-group" >
2020-09-22 16:11:16 +00:00
< label for = "server_ip" > Server IP < small class = "text-muted ml-1" > - IP Crafty should connect to for stats (Try a real ip instead of 127.0.0.1 if you have issues)< / small > < / label >
2021-03-22 04:02:18 +00:00
< input type = "text" class = "form-control" name = "server_ip" id = "server_ip" value = "{{ data['server_stats']['server_id']['server_ip'] }}" >
2020-09-22 16:11:16 +00:00
< / div >
< div class = "form-group" >
< label for = "server_port" > Server Port < small class = "text-muted ml-1" > - Port Crafty should connect to for stats< / small > < / label >
2021-03-22 04:02:18 +00:00
< 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" >
2020-09-04 18:05:42 +00:00
< / div >
2021-01-20 15:20:42 +00:00
< div class = "form-group" >
< label for = "logs_delete_after" > Remove Old Logs After < small class = "text-muted ml-1" > - How many days will a log file has to be old to get deleted (0 is off)< / small > < / label >
2021-03-22 04:02:18 +00:00
< 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" >
2021-01-20 15:20:42 +00:00
< / div >
2020-09-04 18:05:42 +00:00
< div class = "form-check-flat" >
< label for = "auto_start" class = "form-check-label ml-4 mb-4" >
2021-03-22 04:02:18 +00:00
{% if data['server_stats']['server_id']['auto_start'] %}
2020-09-04 18:05:42 +00:00
< input type = "checkbox" class = "form-check-input" id = "auto_start" name = "auto_start" checked = "" value = "1" > Server Auto Start
{% else %}
< input type = "checkbox" class = "form-check-input" id = "auto_start" name = "auto_start" value = "1" > Server Auto Start
{% end %}
< / label >
< label for = "crash_detection" class = "form-check-label ml-4 mb-4" >
2021-03-22 04:02:18 +00:00
{% if data['server_stats']['server_id']['crash_detection'] %}
2020-09-04 18:05:42 +00:00
< input type = "checkbox" class = "form-check-input" id = "crash_detection" name = "crash_detection" checked = "" value = "1" > Server Crash Detection
{% else %}
< input type = "checkbox" class = "form-check-input" id = "crash_detection" name = "crash_detection" value = "1" > Server Crash Detection
{% end %}
< / label >
< / div >
< button type = "submit" class = "btn btn-success mr-2" > Save< / button >
< button type = "reset" class = "btn btn-light" > Cancel< / button >
< / form >
< / div >
2020-09-04 04:02:03 +00:00
2020-09-04 18:05:42 +00:00
< div class = "col-md-6 col-sm-12" >
< div class = "card" >
< div class = "card-body" >
< h4 class = "card-title" > Server Config Area< / h4 >
< p class = "card-description" > Here is where you can change the configuration of your server< / p >
< blockquote class = "blockquote" >
< p class = "mb-0" >
It is recommended to < code > NOT< / code > change the paths of a server managed by Crafty.
Changing paths < code > CAN< / code > break things, especially on Linux type operating systems where
file permissions are more locked down.
< br / > < br / >
If you feel you have to change a where a server is located
you may do so as long as you give the "Crafty" user permission to read / write to the server path.
< br / >
< br / >
On Linux this is best done by executing the following:< br / >
< code >
sudo chown crafty:crafty /path/to/your/server -R< br / >
sudo chmod 2775 /path/to/your/server -R< br / >
< / code >
< / p >
< / blockquote >
< / div >
< / div >
< div class = "text-center" >
2021-03-22 04:02:18 +00:00
{% if data['server_stats']['running'] %}
2020-09-10 15:01:57 +00:00
< a class = "btn btn-sm btn-danger disabled" > Delete Server< / a > < br / >
2020-09-04 18:05:42 +00:00
< small > Please stop the server before deleting it< / small >
2020-09-04 04:02:03 +00:00
{% else %}
2021-03-22 04:02:18 +00:00
< a href = "/panel/remove_server?id={{ data['server_stats']['server_id']['server_id'] }}" class = "btn btn-sm btn-danger" > Delete Server< / a >
2020-09-04 04:02:03 +00:00
{% end %}
2020-09-04 18:05:42 +00:00
< / div >
2020-09-04 04:02:03 +00:00
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
2020-09-04 18:05:42 +00:00
2020-09-04 04:02:03 +00:00
< / div >
<!-- content - wrapper ends -->
{% end %}
{% block js %}
< script >
//used to get cookies from browser - this is part of tornados xsrf protection - it's for extra security
function getCookie(name) {
var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");
return r ? r[1] : undefined;
}
$( document ).ready(function() {
console.log( "ready!" );
});
< / script >
{% end %}