mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fixing Terminal and a little more
This commit is contained in:
parent
e9844b96e1
commit
578cd73fe4
@ -30,6 +30,30 @@ body.sidebar-icon-only .navbar-toggler .mdi-chevron-double-left {
|
|||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mw-25 {
|
||||||
|
max-width: 25% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mh-25 {
|
||||||
|
max-height: 25% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mw-50 {
|
||||||
|
max-width: 50% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mh-50 {
|
||||||
|
max-height: 50% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mw-75 {
|
||||||
|
max-width: 75% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mh-75 {
|
||||||
|
max-height: 75% !important;
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
|
38
app/frontend/static/assets/css/partial/crafty-terminal.css
Normal file
38
app/frontend/static/assets/css/partial/crafty-terminal.css
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#virt_console::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
|
#virt_console {
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
/* IE and Edge */
|
||||||
|
scrollbar-width: none;
|
||||||
|
/* Firefox */
|
||||||
|
font-family: Consolas, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
width: 100%;
|
||||||
|
font-size: .8em;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border: 1px solid var(--outline);
|
||||||
|
background-color: var(--card-banner-bg);
|
||||||
|
height: 500px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
#to-bottom {
|
||||||
|
visibility: hidden;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.term-btn {
|
||||||
|
max-width: 12rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.server_command {
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.server_command {
|
||||||
|
min-width: 10rem;
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
#creation_wizard {
|
/*#creation_wizard {
|
||||||
-webkit-filter: grayscale(1);
|
-webkit-filter: grayscale(1);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
.api-alert {
|
.api-alert {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -171,7 +171,7 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<style rel="stylesheet" href="/static/assets/css/partial/crafty-backup.css"></style>
|
<link rel="stylesheet" href="/static/assets/css/partial/crafty-backup.css">
|
||||||
<!-- content-wrapper ends -->
|
<!-- content-wrapper ends -->
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
|
@ -242,7 +242,7 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<style rel="stylesheet" href="/static/assets/css/partial/crafty-backup.css"></style>
|
<link rel="stylesheet" href="/static/assets/css/partial/crafty-backup.css">
|
||||||
<!-- content-wrapper ends -->
|
<!-- content-wrapper ends -->
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
|
@ -41,96 +41,66 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button id="to-bottom" style="visibility: hidden; float: right;" class="btn btn-outline-success" hidden>{{
|
<button id="to-bottom" class="btn btn-outline-success" hidden>
|
||||||
translate('serverDetails', 'reset', data['lang']) }}</button>
|
{{ translate('serverDetails', 'reset', data['lang']) }}
|
||||||
|
</button>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div id="virt_console" class=""
|
<div id="virt_console">
|
||||||
style="width: 100%; font-size: .8em; padding: 5px 10px; border: 1px solid var(--outline); background-color:var(--card-banner-bg);height:500px; overflow: scroll;">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div style="gap: 0.5rem;" class="input-group flex-wrap">
|
<div class="input-group flex-wrap server_command">
|
||||||
<input style="min-width: 10rem;" type="text" class="form-control" id="server_command"
|
<input type="text" class="form-control server_command" id="server_command" name="server_command" placeholder="{{ translate('serverTerm', 'commandInput', data['lang']) }}" autofocus="">
|
||||||
name="server_command" placeholder="{{ translate('serverTerm', 'commandInput', data['lang']) }}"
|
|
||||||
autofocus="">
|
|
||||||
<span class="input-group-btn ml-5">
|
<span class="input-group-btn ml-5">
|
||||||
<button id="submit" class="btn btn-sm btn-info" type="button">{{ translate('serverTerm', 'sendCommand',
|
<button id="submit" class="btn btn-sm btn-info" type="button">{{ translate('serverTerm', 'sendCommand', data['lang']) }}</button>
|
||||||
data['lang']) }}</button>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{% if data['permissions']['Commands'] in data['user_permissions'] %}
|
{% if data['permissions']['Commands'] in data['user_permissions'] %}
|
||||||
{% if data['importing'] and data['server_stats']['running']%}
|
{% if data['importing'] and data['server_stats']['running']%}
|
||||||
<div id="update_control_buttons"
|
<div id="update_control_buttons" class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0">
|
||||||
class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0"
|
<button onclick="" id="start-btn" class="btn btn-warning m-1 flex-grow-1 term-btn disabled"><i class="fa fa-spinner fa-spin"></i> {{translate('serverTerm', 'installing', data['lang'])
|
||||||
style="visibility: visible">
|
|
||||||
<button onclick="" id="start-btn" style="max-width: 7rem;"
|
|
||||||
class="btn btn-warning m-1 flex-grow-1 disabled"><i
|
|
||||||
class="fa fa-spinner fa-spin"></i> {{translate('serverTerm', 'installing', data['lang'])
|
|
||||||
}}</button>
|
}}</button>
|
||||||
<button onclick="" id="restart-btn" style="max-width: 7rem;"
|
<button onclick="" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn disabled">{% raw translate('serverTerm', 'restart',
|
||||||
class="btn btn-outline-primary m-1 flex-grow-1 disabled">{% raw translate('serverTerm', 'restart',
|
|
||||||
data['lang']) %}</button>
|
data['lang']) %}</button>
|
||||||
<button onclick="" id="stop-btn" style="max-width: 7rem;"
|
<button onclick="" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
||||||
class="btn btn-danger m-1 flex-grow-1 disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
{% elif data['server_stats']['updating']%}
|
{% elif data['server_stats']['updating']%}
|
||||||
<div id="update_control_buttons"
|
<div id="update_control_buttons" class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0">
|
||||||
class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0"
|
<button onclick="" id="start-btn" class="btn btn-warning m-1 flex-grow-1 term-btn disabled"><i class="fa fa-spinner fa-spin"></i> {{
|
||||||
style="visibility: visible">
|
|
||||||
<button onclick="" id="start-btn" style="max-width: 7rem;"
|
|
||||||
class="btn btn-warning m-1 flex-grow-1 disabled"><i class="fa fa-spinner fa-spin"></i> {{
|
|
||||||
translate('serverTerm', 'updating', data['lang']) }}</button>
|
translate('serverTerm', 'updating', data['lang']) }}</button>
|
||||||
<button onclick="" id="restart-btn" style="max-width: 7rem;"
|
<button onclick="" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn disabled">{% raw translate('serverTerm', 'restart',
|
||||||
class="btn btn-outline-primary m-1 flex-grow-1 disabled">{% raw translate('serverTerm', 'restart',
|
|
||||||
data['lang']) %}</button>
|
data['lang']) %}</button>
|
||||||
<button onclick="" id="stop-btn" style="max-width: 7rem;"
|
<button onclick="" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
||||||
class="btn btn-danger m-1 flex-grow-1 disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
{% elif data['waiting_start'] %}
|
{% elif data['waiting_start'] %}
|
||||||
<div id="control_buttons"
|
<div id="control_buttons" class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0">
|
||||||
class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0"
|
<button onclick="" id="start-btn" class="btn btn-secondary m-1 flex-grow-1 term-btn disabled" data-toggle="tooltip" title="{{ translate('serverTerm', 'delay-explained', data['lang'])}}">{{ translate('serverTerm',
|
||||||
style="visibility: visible">
|
|
||||||
<button onclick="" id="start-btn" style="max-width: 7rem; white-space: nowrap;"
|
|
||||||
class="btn btn-secondary m-1 flex-grow-1 disabled" data-toggle="tooltip"
|
|
||||||
title="{{ translate('serverTerm', 'delay-explained', data['lang'])}}">{{ translate('serverTerm',
|
|
||||||
'starting', data['lang']) }}</button>
|
'starting', data['lang']) }}</button>
|
||||||
<button onclick="" id="restart-btn" style="max-width: 7rem;"
|
<button onclick="" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn disabled">{% raw translate('serverTerm', 'restart',
|
||||||
class="btn btn-outline-primary m-1 flex-grow-1 disabled">{% raw translate('serverTerm', 'restart',
|
|
||||||
data['lang']) %}</button>
|
data['lang']) %}</button>
|
||||||
<button onclick="" id="stop-btn" style="max-width: 7rem;"
|
<button onclick="" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
||||||
class="btn btn-danger m-1 flex-grow-1 disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
{% elif data['importing'] %}
|
{% elif data['importing'] %}
|
||||||
<div id="control_buttons"
|
<div id="control_buttons" class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0">
|
||||||
class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0"
|
<button onclick="" id="start-btn" class="btn btn-secondary m-1 flex-grow-1 term-btn disabled"><i class="fa fa-spinner fa-spin"></i> {{
|
||||||
style="visibility: visible">
|
|
||||||
<button onclick="" id="start-btn" style="max-width: 12rem; white-space: nowrap;"
|
|
||||||
class="btn btn-secondary m-1 flex-grow-1 disabled"><i class="fa fa-spinner fa-spin"></i> {{
|
|
||||||
translate('serverTerm', 'importing',
|
translate('serverTerm', 'importing',
|
||||||
data['lang']) }}</button>
|
data['lang']) }}</button>
|
||||||
<button onclick="" id="restart-btn" style="max-width: 7rem;"
|
<button onclick="" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn disabled">{% raw translate('serverTerm', 'restart',
|
||||||
class="btn btn-outline-primary m-1 flex-grow-1 disabled">{% raw translate('serverTerm', 'restart',
|
|
||||||
data['lang']) %}</button>
|
data['lang']) %}</button>
|
||||||
<button onclick="" id="stop-btn" style="max-width: 7rem;"
|
<button onclick="" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
||||||
class="btn btn-danger m-1 flex-grow-1 disabled">{{ translate('serverTerm', 'stop', data['lang'])
|
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="control_buttons"
|
<div id="control_buttons" class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0">
|
||||||
class="mt-4 flex-wrap d-flex justify-content-between justify-content-md-center align-items-center px-5 px-md-0"
|
<button onclick="send_command(serverId, 'start_server');" id="start-btn" class="btn btn-primary m-1 flex-grow-1 term-btn">{{ translate('serverTerm', 'start', data['lang']) }}</button>
|
||||||
style="visibility: visible">
|
<button onclick="send_command(serverId, 'restart_server');" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn">{% raw translate('serverTerm', 'restart', data['lang'])
|
||||||
<button onclick="send_command(serverId, 'start_server');" id="start-btn" style="max-width: 7rem;"
|
|
||||||
class="btn btn-primary m-1 flex-grow-1">{{ translate('serverTerm', 'start', data['lang']) }}</button>
|
|
||||||
<button onclick="send_command(serverId, 'restart_server');" id="restart-btn" style="max-width: 7rem;"
|
|
||||||
class="btn btn-outline-primary m-1 flex-grow-1">{% raw translate('serverTerm', 'restart', data['lang'])
|
|
||||||
%}</button>
|
%}</button>
|
||||||
<button onclick="send_command(serverId, 'stop_server');" id="stop-btn" style="max-width: 7rem;"
|
<button onclick="send_command(serverId, 'stop_server');" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn">{{ translate('serverTerm', 'stop', data['lang']) }}</button>
|
||||||
class="btn btn-danger m-1 flex-grow-1">{{ translate('serverTerm', 'stop', data['lang']) }}</button>
|
|
||||||
</div>
|
</div>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
@ -140,21 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<link rel="stylesheet" href="/static/assets/css/partial/crafty-terminal.css">
|
||||||
#virt_console::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hide scrollbar for IE, Edge and Firefox */
|
|
||||||
#virt_console {
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
/* IE and Edge */
|
|
||||||
scrollbar-width: none;
|
|
||||||
/* Firefox */
|
|
||||||
font-family: Consolas, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!-- content-wrapper ends -->
|
<!-- content-wrapper ends -->
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@ -200,12 +156,12 @@
|
|||||||
if (updateButton.isUpdating) {
|
if (updateButton.isUpdating) {
|
||||||
if (updateButton.server_id == serverId) {
|
if (updateButton.server_id == serverId) {
|
||||||
console.log(updateButton.isUpdating)
|
console.log(updateButton.isUpdating)
|
||||||
document.getElementById('control_buttons').innerHTML = '<button onclick="" id="start-btn" style="max-width: 7rem;" class="btn btn-primary m-1 flex-grow-1">{{ translate("serverTerm", "updating", data["lang"]) }}</button><button onclick="" id="restart-btn" style="max-width: 7rem;" class="btn btn-outline-primary m-1 flex-grow-1">{% raw translate("serverTerm", "restart", data["lang"]) %}</button><button onclick="" id="stop-btn" style="max-width: 7rem;" class="btn btn-danger m-1 flex-grow-1 disabled">{{ translate("serverTerm", "stop", data["lang"]) }}</button>';
|
document.getElementById('control_buttons').innerHTML = '<button onclick="" id="start-btn" class="btn btn-primary m-1 flex-grow-1 term-btn">{{ translate("serverTerm", "updating", data["lang"]) }}</button><button onclick="" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn">{% raw translate("serverTerm", "restart", data["lang"]) %}</button><button onclick="" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn disabled">{{ translate("serverTerm", "stop", data["lang"]) }}</button>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (updateButton.server_id == serverId) {
|
else if (updateButton.server_id == serverId) {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
document.getElementById('update_control_buttons').innerHTML = '<button onclick="send_command(serverId, "start_server");" id="start-btn" style="max-width: 7rem;" class="btn btn-primary m-1 flex-grow-1">{{ translate("serverTerm", "start", data["lang"]) }}</button><button onclick="send_command(serverId, "restart_server");" id="restart-btn" style="max-width: 7rem;" class="btn btn-outline-primary m-1 flex-grow-1">{% raw translate("serverTerm", "restart", data["lang"]) %}</button><button onclick="" id="stop-btn" style="max-width: 7rem;" class="btn btn-danger m-1 flex-grow-1 disabled">{{ translate("serverTerm", "stop", data["lang"]) }}</button>';
|
document.getElementById('update_control_buttons').innerHTML = '<button onclick="send_command(serverId, "start_server");" id="start-btn" class="btn btn-primary m-1 flex-grow-1 term-btn">{{ translate("serverTerm", "start", data["lang"]) }}</button><button onclick="send_command(serverId, "restart_server");" id="restart-btn" class="btn btn-outline-primary m-1 flex-grow-1 term-btn">{% raw translate("serverTerm", "restart", data["lang"]) %}</button><button onclick="" id="stop-btn" class="btn btn-danger m-1 flex-grow-1 term-btn disabled">{{ translate("serverTerm", "stop", data["lang"]) }}</button>';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<style rel="stylesheet" href="/static/assets/css/partial/crafty-wizard.css"></style>
|
<link rel="stylesheet" href="/static/assets/css/partial/crafty-wizard.css">
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<style rel="stylesheet" href="/static/assets/css/partial/crafty-wizard.css"></style>
|
<link rel="stylesheet" href="/static/assets/css/partial/crafty-wizard.css">
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user