Merge branch 'feature/forge-install' of gitlab.com:crafty-controller/crafty-4 into feature/forge-install

This commit is contained in:
Silversthorn 2022-11-19 23:20:26 +01:00
commit b4dca8b27f
4 changed files with 31 additions and 4 deletions

View File

@ -427,6 +427,9 @@ class ServerInstance:
).format(self.name, ex) ).format(self.name, ex)
}, },
) )
if forge_install:
# Reset import status if failed while forge installing
self.stats_helper.finish_import()
return False return False
else: else:
@ -465,6 +468,9 @@ class ServerInstance:
).format(self.name, ex) ).format(self.name, ex)
}, },
) )
if forge_install:
# Reset import status if failed while forge installing
self.stats_helper.finish_import()
return False return False
out_buf = ServerOutBuf(self.helper, self.process, self.server_id) out_buf = ServerOutBuf(self.helper, self.process, self.server_id)

View File

@ -168,7 +168,12 @@
<td draggable="false" id="controls{{server['server_data']['server_id']}}" class="actions_serverlist"> <td draggable="false" id="controls{{server['server_data']['server_id']}}" class="actions_serverlist">
{% if server['user_command_permission'] %} {% if server['user_command_permission'] %}
{% if server['stats']['updating']%} {% if server['stats']['importing'] and server['stats']['running'] %}
<!-- WHAT HAPPENED HERE -->
<a data-id="{{server['server_data']['server_id']}}" class=""><i
class="fa fa-spinner fa-spin"></i>&nbsp;{{ translate('serverTerm', 'installing',
data['lang']) }}</i></a>
{% elif server['stats']['updating']%}
<!-- WHAT HAPPENED HERE --> <!-- WHAT HAPPENED HERE -->
<a data-id="{{server['server_data']['server_id']}}" class=""><i <a data-id="{{server['server_data']['server_id']}}" class=""><i
class="fa fa-spinner fa-spin"></i>&nbsp;{{ translate('serverTerm', 'updating', class="fa fa-spinner fa-spin"></i>&nbsp;{{ translate('serverTerm', 'updating',

View File

@ -62,7 +62,21 @@
</span> </span>
</div> </div>
{% if data['permissions']['Commands'] in data['user_permissions'] %} {% if data['permissions']['Commands'] in data['user_permissions'] %}
{% if data['server_stats']['updating']%} {% if data['importing'] and data['server_stats']['running']%}
<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"
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>&nbsp;{{translate('serverTerm', 'installing', data['lang']) }}</button>
<button onclick="" id="restart-btn" style="max-width: 7rem;"
class="btn btn-outline-primary m-1 flex-grow-1 disabled">{% 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>
</div>
{% 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"
style="visibility: visible"> style="visibility: visible">

View File

@ -97,7 +97,8 @@
"status": "Status", "status": "Status",
"stop": "Stop", "stop": "Stop",
"version": "Version", "version": "Version",
"welcome": "Welcome to Crafty Controller" "welcome": "Welcome to Crafty Controller",
"installing": "Installing..."
}, },
"datatables": { "datatables": {
"i18n": { "i18n": {
@ -481,7 +482,8 @@
"starting": "Delayed-Start", "starting": "Delayed-Start",
"stop": "Stop", "stop": "Stop",
"stopScroll": "Stop Auto Scrolling", "stopScroll": "Stop Auto Scrolling",
"updating": "Updating..." "updating": "Updating...",
"installing": "Installing..."
}, },
"serverMetrics": { "serverMetrics": {
"resetZoom": "Reset Zoom", "resetZoom": "Reset Zoom",