mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix tooltip update
This commit is contained in:
parent
5b4639b839
commit
d0e8148282
@ -59,12 +59,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="wrapper my-auto ml-auto ml-lg-4">
|
<div class="wrapper my-auto ml-auto ml-lg-4">
|
||||||
<p id="cpu_data" class="mb-0 text-success" data-toggle="tooltip" data-placement="top" data-html="true"
|
<p id="cpu_data" class="mb-0 text-success" data-toggle="tooltip" data-placement="top" data-html="true"
|
||||||
title="{% raw translate('dashboard', 'cpuCores', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cores') }} <br /> {% raw translate('dashboard', 'cpuCurFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cur_freq') }} <br /> {% raw translate('dashboard', 'cpuMaxFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_max_freq') }}">
|
title="{% raw translate('dashboard', 'cpuCores', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cores') }} <br /> {% raw translate('dashboard', 'cpuCurFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cur_freq') }} <br /> {% raw translate('dashboard', 'cpuMaxFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_max_freq') }}">
|
||||||
{{ translate('dashboard', 'cpuUsage', data['lang']) }}: <span id="cpu_usage">{{
|
{{ translate('dashboard', 'cpuUsage', data['lang']) }}: <span id="cpu_usage">{{
|
||||||
data.get('hosts_data').get('cpu_usage') }}</span>
|
data.get('hosts_data').get('cpu_usage') }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p id="mem_usage" class="mb-0 text-danger" data-toggle="tooltip" data-placement="top"
|
<p id="mem_usage" class="mb-0 text-danger" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_usage') }}">
|
title="{{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_usage') }}">
|
||||||
{{ translate('dashboard', 'memUsage', data['lang']) }}: <span id="mem_percent">{{
|
{{ translate('dashboard', 'memUsage', data['lang']) }}: <span id="mem_percent">{{
|
||||||
data.get('hosts_data').get('mem_percent') }}%</span>
|
data.get('hosts_data').get('mem_percent') }}%</span>
|
||||||
</p>
|
</p>
|
||||||
@ -110,18 +110,22 @@
|
|||||||
{% for item in data.get('hosts_data').get('disk_json') %}
|
{% for item in data.get('hosts_data').get('disk_json') %}
|
||||||
{% if item["mount"] in data["monitored"] %}
|
{% if item["mount"] in data["monitored"] %}
|
||||||
<div id="{{item['device']}}" class="col-xl-3 col-lg-3 col-md-4 col-12">
|
<div id="{{item['device']}}" class="col-xl-3 col-lg-3 col-md-4 col-12">
|
||||||
<h4 class="mb-0 font-weight-semibold d-inline-block text-truncate" id="title_{{item['device']}}" data-toggle="tooltip" data-placement="bottom" title="{{item['mount']}}" style="max-width: 100%;"><i class="fas fa-hdd"></i> {{item["mount"]}}</h4>
|
<h4 class="mb-0 font-weight-semibold d-inline-block text-truncate storage-heading"
|
||||||
<div class="progress d-inline-block" style="height: 20px; width: 100%; background-color: rgb(139, 139, 139) !important;">
|
id="title_{{item['device']}}" data-toggle="tooltip" data-placement="bottom"
|
||||||
|
title="{{item['mount']}}" style="max-width: 100%;"><i class="fas fa-hdd"></i>
|
||||||
|
{{item["mount"]}}</h4>
|
||||||
|
<div class="progress d-inline-block"
|
||||||
|
style="height: 20px; width: 100%; background-color: rgb(139, 139, 139) !important;">
|
||||||
<div class="progress-bar
|
<div class="progress-bar
|
||||||
{% if item['percent_used'] <= 33 %}
|
{% if item['percent_used'] <= 58 %}
|
||||||
bg-success
|
bg-success
|
||||||
{% elif 34 <= item['percent_used'] <= 75 %}
|
{% elif 59 <= item['percent_used'] <= 75 %}
|
||||||
bg-warning
|
bg-warning
|
||||||
{% else %}
|
{% else %}
|
||||||
bg-danger
|
bg-danger
|
||||||
{% end %}
|
{% end %}
|
||||||
" role="progressbar" style="color: black; height: 100%; width: {{item['percent_used']}}%;"
|
" role="progressbar" style="color: black; height: 100%; width: {{item['percent_used']}}%;"
|
||||||
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">{{item["used"]}} /
|
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">{{item["used"]}} /
|
||||||
{{item["total"]}}
|
{{item["total"]}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -148,8 +152,8 @@
|
|||||||
{% if len(data['servers']) > 0 %}
|
{% if len(data['servers']) > 0 %}
|
||||||
{% if data['user_data']['hints'] %}
|
{% if data['user_data']['hints'] %}
|
||||||
<span class="too_small" title="{{ translate('dashboard', 'cannotSeeOnMobile', data['lang']) }}" ,
|
<span class="too_small" title="{{ translate('dashboard', 'cannotSeeOnMobile', data['lang']) }}" ,
|
||||||
data-content="{{ translate('dashboard', 'cannotSeeOnMobile2', data['lang']) }}" ,
|
data-content="{{ translate('dashboard', 'cannotSeeOnMobile2', data['lang']) }}" ,
|
||||||
data-placement="top"></span>
|
data-placement="top"></span>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
<div><a class="nav-link" href="/server/step1"><i class="fas fa-plus-circle"></i> {{
|
<div><a class="nav-link" href="/server/step1"><i class="fas fa-plus-circle"></i> {{
|
||||||
@ -188,7 +192,7 @@
|
|||||||
<i class="fas fa-server"></i>
|
<i class="fas fa-server"></i>
|
||||||
{% if server['alert'] %}
|
{% if server['alert'] %}
|
||||||
<a style="color: red !important;" draggable="false"
|
<a style="color: red !important;" draggable="false"
|
||||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||||
{{ server['server_data']['server_name'] }} <i class="fas fa-exclamation-triangle"></i>
|
{{ server['server_data']['server_name'] }} <i class="fas fa-exclamation-triangle"></i>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -203,12 +207,12 @@
|
|||||||
{% if server['stats']['importing'] and server['stats']['running'] %}
|
{% if server['stats']['importing'] and server['stats']['running'] %}
|
||||||
<!-- 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> {{ translate('serverTerm', 'installing',
|
class="fa fa-spinner fa-spin"></i> {{ translate('serverTerm', 'installing',
|
||||||
data['lang']) }}</i></a>
|
data['lang']) }}</i></a>
|
||||||
{% elif server['stats']['updating']%}
|
{% 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> {{ translate('serverTerm', 'updating',
|
class="fa fa-spinner fa-spin"></i> {{ translate('serverTerm', 'updating',
|
||||||
data['lang']) }}</i></a>
|
data['lang']) }}</i></a>
|
||||||
{% elif server['stats']['waiting_start']%}
|
{% elif server['stats']['waiting_start']%}
|
||||||
<!-- WHAT HAPPENED HERE -->
|
<!-- WHAT HAPPENED HERE -->
|
||||||
@ -221,30 +225,30 @@
|
|||||||
data['lang']) }}</a>
|
data['lang']) }}</a>
|
||||||
{% elif server['stats']['running'] %}
|
{% elif server['stats']['running'] %}
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="stop_button" data-toggle="tooltip"
|
<a data-id="{{server['server_data']['server_id']}}" class="stop_button" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
||||||
<i class="fas fa-stop"></i>
|
<i class="fas fa-stop"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="restart_button" data-toggle="tooltip"
|
<a data-id="{{server['server_data']['server_id']}}" class="restart_button" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
||||||
<i class="fas fa-sync"></i>
|
<i class="fas fa-sync"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="kill_button" data-toggle="tooltip"
|
<a data-id="{{server['server_data']['server_id']}}" class="kill_button" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||||
<i class="fas fa-skull"></i>
|
<i class="fas fa-skull"></i>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="play_button" data-toggle="tooltip"
|
<a data-id="{{server['server_data']['server_id']}}" class="play_button" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
||||||
<i class="fas fa-play"></i>
|
<i class="fas fa-play"></i>
|
||||||
</a>
|
</a>
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="clone_button" data-toggle="tooltip"
|
<a data-id="{{server['server_data']['server_id']}}" class="clone_button" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
||||||
<i class="fas fa-clone"></i>
|
<i class="fas fa-clone"></i>
|
||||||
</a>
|
</a>
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="kill_button" data-toggle="tooltip"
|
<a data-id="{{server['server_data']['server_id']}}" class="kill_button" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||||
<i class="fas fa-skull"></i>
|
<i class="fas fa-skull"></i>
|
||||||
</a>
|
</a>
|
||||||
{% end %}
|
{% end %}
|
||||||
@ -253,7 +257,7 @@
|
|||||||
|
|
||||||
<td draggable="false" id="server_cpu_{{server['server_data']['server_id']}}">
|
<td draggable="false" id="server_cpu_{{server['server_data']['server_id']}}">
|
||||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{server['stats']['cpu']}}">
|
title="{{server['stats']['cpu']}}">
|
||||||
<div class="progress-bar
|
<div class="progress-bar
|
||||||
{% if server['stats']['cpu'] <= 33 %}
|
{% if server['stats']['cpu'] <= 33 %}
|
||||||
bg-success
|
bg-success
|
||||||
@ -263,14 +267,14 @@
|
|||||||
bg-danger
|
bg-danger
|
||||||
{% end %}
|
{% end %}
|
||||||
" role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0"
|
" role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0"
|
||||||
aria-valuemin="0" aria-valuemax="100"></div>
|
aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
</div>
|
</div>
|
||||||
{{server['stats']['cpu']}}%
|
{{server['stats']['cpu']}}%
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td draggable="false" id="server_mem_{{server['server_data']['server_id']}}">
|
<td draggable="false" id="server_mem_{{server['server_data']['server_id']}}">
|
||||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{server['stats']['mem']}}">
|
title="{{server['stats']['mem']}}">
|
||||||
<div class="progress-bar
|
<div class="progress-bar
|
||||||
{% if server['stats']['mem_percent'] <= 33 %}
|
{% if server['stats']['mem_percent'] <= 33 %}
|
||||||
bg-success
|
bg-success
|
||||||
@ -280,7 +284,7 @@
|
|||||||
bg-danger
|
bg-danger
|
||||||
{% end %}
|
{% end %}
|
||||||
" role="progressbar" style="width: {{server['stats']['mem_percent']}}%" aria-valuenow="0"
|
" role="progressbar" style="width: {{server['stats']['mem_percent']}}%" aria-valuenow="0"
|
||||||
aria-valuemin="0" aria-valuemax="100"></div>
|
aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
</div>
|
</div>
|
||||||
{{server['stats']['mem_percent']}}% -
|
{{server['stats']['mem_percent']}}% -
|
||||||
|
|
||||||
@ -300,7 +304,7 @@
|
|||||||
|
|
||||||
{% if server['stats']['desc'] != 'False' %}
|
{% if server['stats']['desc'] != 'False' %}
|
||||||
<div id="desc_id"
|
<div id="desc_id"
|
||||||
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">{{
|
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">{{
|
||||||
server['stats']['desc'] }}</div> <br />
|
server['stats']['desc'] }}</div> <br />
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
@ -329,7 +333,7 @@
|
|||||||
<br />
|
<br />
|
||||||
</td>
|
</td>
|
||||||
<span class="server-player-totals" id="server_players_{{server['server_data']['server_id']}}"
|
<span class="server-player-totals" id="server_players_{{server['server_data']['server_id']}}"
|
||||||
data-players="{{ server['stats']['online']}}" data-max="{{ server['stats']['max'] }}"></span>
|
data-players="{{ server['stats']['online']}}" data-max="{{ server['stats']['max'] }}"></span>
|
||||||
</tr>
|
</tr>
|
||||||
{% end %}
|
{% end %}
|
||||||
</div>
|
</div>
|
||||||
@ -337,7 +341,7 @@
|
|||||||
{% for server in data['failed_servers'] %}
|
{% for server in data['failed_servers'] %}
|
||||||
<tr id="{{server['server_id']}}" draggable="false">
|
<tr id="{{server['server_id']}}" draggable="false">
|
||||||
<td class="text-warning"><i class="fas fa-server"></i> <a class="text-warning"
|
<td class="text-warning"><i class="fas fa-server"></i> <a class="text-warning"
|
||||||
href="/panel/server_detail?id={{server['server_id']}}&subpage=config">{{server['server_name']}}</a>
|
href="/panel/server_detail?id={{server['server_id']}}&subpage=config">{{server['server_name']}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -363,27 +367,27 @@
|
|||||||
<div class="col-10 col-lg-3 mx-0 px-0">
|
<div class="col-10 col-lg-3 mx-0 px-0">
|
||||||
{% if server['alert'] %}
|
{% if server['alert'] %}
|
||||||
<a style="color: red !important" class="btn btn-link d-flex justify-content-start" type="button"
|
<a style="color: red !important" class="btn btn-link d-flex justify-content-start" type="button"
|
||||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||||
<i class="fas fa-server"></i> {{ server['server_data']['server_name'] }} <i
|
<i class="fas fa-server"></i> {{ server['server_data']['server_name'] }} <i
|
||||||
class="fas fa-exclamation-triangle"></i>
|
class="fas fa-exclamation-triangle"></i>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="btn btn-link d-flex justify-content-start" type="button"
|
<a class="btn btn-link d-flex justify-content-start" type="button"
|
||||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||||
<i class="fas fa-server"></i> {{ server['server_data']['server_name'] }}
|
<i class="fas fa-server"></i> {{ server['server_data']['server_name'] }}
|
||||||
</a>
|
</a>
|
||||||
{% end %}
|
{% end %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2 col-lg-3 mx-0 px-0">
|
<div class="col-2 col-lg-3 mx-0 px-0">
|
||||||
<a class="btn btn-link d-flex justify-content-center" type="button" data-toggle="collapse"
|
<a class="btn btn-link d-flex justify-content-center" type="button" data-toggle="collapse"
|
||||||
data-target="#collapse-{{server['server_data']['server_id']}}" aria-expanded="false"
|
data-target="#collapse-{{server['server_data']['server_id']}}" aria-expanded="false"
|
||||||
aria-controls="collapse-{{server['server_data']['server_id']}}">
|
aria-controls="collapse-{{server['server_data']['server_id']}}">
|
||||||
<i class="fas fa-chart-bar"></i>
|
<i class="fas fa-chart-bar"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-lg-3 mx-0 px-0">
|
<div class="col-4 col-lg-3 mx-0 px-0">
|
||||||
<a id="m_server_running_status_{{server['server_data']['server_id']}}"
|
<a id="m_server_running_status_{{server['server_data']['server_id']}}"
|
||||||
class="btn btn-link d-flex justify-content-start" type="button">
|
class="btn btn-link d-flex justify-content-start" type="button">
|
||||||
{% if server['stats']['running'] %}
|
{% if server['stats']['running'] %}
|
||||||
<span class="text-success"><i class="fas fa-signal"></i> {{ translate('dashboard', 'online',
|
<span class="text-success"><i class="fas fa-signal"></i> {{ translate('dashboard', 'online',
|
||||||
data['lang']) }}</span>
|
data['lang']) }}</span>
|
||||||
@ -405,22 +409,22 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 px-0">
|
<div class="col-4 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}"
|
<a data-id="{{server['server_data']['server_id']}}"
|
||||||
class="btn btn-link stop_button actions_serveritem" data-toggle="tooltip"
|
class="btn btn-link stop_button actions_serveritem" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
||||||
<i class="fas fa-stop"></i>
|
<i class="fas fa-stop"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 px-0">
|
<div class="col-4 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}"
|
<a data-id="{{server['server_data']['server_id']}}"
|
||||||
class="btn btn-link restart_button actions_serveritem" data-toggle="tooltip"
|
class="btn btn-link restart_button actions_serveritem" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
||||||
<i class="fas fa-sync"></i>
|
<i class="fas fa-sync"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 px-0">
|
<div class="col-4 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}"
|
<a data-id="{{server['server_data']['server_id']}}"
|
||||||
class="btn btn-link kill_button actions_serveritem" data-toggle="tooltip"
|
class="btn btn-link kill_button actions_serveritem" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||||
<i class="fas fa-skull"></i>
|
<i class="fas fa-skull"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -447,7 +451,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 px-0">
|
<div class="col-12 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}" class="btn btn-link"><i
|
<a data-id="{{server['server_data']['server_id']}}" class="btn btn-link"><i
|
||||||
class="fa fa-spinner fa-spin"></i>
|
class="fa fa-spinner fa-spin"></i>
|
||||||
{{ translate('serverTerm', 'importing', data['lang']) }}</a>
|
{{ translate('serverTerm', 'importing', data['lang']) }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -455,22 +459,22 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 px-0">
|
<div class="col-4 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}"
|
<a data-id="{{server['server_data']['server_id']}}"
|
||||||
class="btn play_button actions_serveritem" data-toggle="tooltip"
|
class="btn play_button actions_serveritem" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
||||||
<i class="fas fa-play"></i>
|
<i class="fas fa-play"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 px-0">
|
<div class="col-4 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}"
|
<a data-id="{{server['server_data']['server_id']}}"
|
||||||
class="btn clone_button actions_serveritem" data-toggle="tooltip"
|
class="btn clone_button actions_serveritem" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
||||||
<i class="fas fa-clone"></i>
|
<i class="fas fa-clone"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 px-0">
|
<div class="col-4 px-0">
|
||||||
<a data-id="{{server['server_data']['server_id']}}"
|
<a data-id="{{server['server_data']['server_id']}}"
|
||||||
class="btn kill_button actions_serveritem" data-toggle="tooltip"
|
class="btn kill_button actions_serveritem" data-toggle="tooltip"
|
||||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||||
<i class="fas fa-skull"></i></a>
|
<i class="fas fa-skull"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -483,14 +487,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="collapse-{{server['server_data']['server_id']}}" class="collapse"
|
<div id="collapse-{{server['server_data']['server_id']}}" class="collapse"
|
||||||
aria-labelledby="heading-{{server['server_data']['server_id']}}" data-parent="#accordionServers">
|
aria-labelledby="heading-{{server['server_data']['server_id']}}" data-parent="#accordionServers">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<h6>{{ translate('dashboard', 'cpuUsage', data['lang']) }}</h6>
|
<h6>{{ translate('dashboard', 'cpuUsage', data['lang']) }}</h6>
|
||||||
<div id="m_server_cpu_{{server['server_data']['server_id']}}">
|
<div id="m_server_cpu_{{server['server_data']['server_id']}}">
|
||||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{server['stats']['cpu']}}">
|
title="{{server['stats']['cpu']}}">
|
||||||
<div class="progress-bar
|
<div class="progress-bar
|
||||||
{% if server['stats']['cpu'] <= 33 %}
|
{% if server['stats']['cpu'] <= 33 %}
|
||||||
bg-success
|
bg-success
|
||||||
@ -500,7 +504,7 @@
|
|||||||
bg-danger
|
bg-danger
|
||||||
{% end %}
|
{% end %}
|
||||||
" role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0" aria-valuemin="0"
|
" role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0" aria-valuemin="0"
|
||||||
aria-valuemax="100"></div>
|
aria-valuemax="100"></div>
|
||||||
</div>
|
</div>
|
||||||
{{server['stats']['cpu']}}%
|
{{server['stats']['cpu']}}%
|
||||||
</div>
|
</div>
|
||||||
@ -509,7 +513,7 @@
|
|||||||
<h6>{{ translate('dashboard', 'memUsage', data['lang']) }}</h6>
|
<h6>{{ translate('dashboard', 'memUsage', data['lang']) }}</h6>
|
||||||
<div draggable="false" id="m_server_mem_{{server['server_data']['server_id']}}">
|
<div draggable="false" id="m_server_mem_{{server['server_data']['server_id']}}">
|
||||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{server['stats']['mem']}}">
|
title="{{server['stats']['mem']}}">
|
||||||
<div class="progress-bar
|
<div class="progress-bar
|
||||||
{% if server['stats']['mem_percent'] <= 33 %}
|
{% if server['stats']['mem_percent'] <= 33 %}
|
||||||
bg-success
|
bg-success
|
||||||
@ -519,7 +523,7 @@
|
|||||||
bg-danger
|
bg-danger
|
||||||
{% end %}
|
{% end %}
|
||||||
" role="progressbar" style="width: {{server['stats']['mem_percent']}}%" aria-valuenow="0"
|
" role="progressbar" style="width: {{server['stats']['mem_percent']}}%" aria-valuenow="0"
|
||||||
aria-valuemin="0" aria-valuemax="100"></div>
|
aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
</div>
|
</div>
|
||||||
{{server['stats']['mem_percent']}}% -
|
{{server['stats']['mem_percent']}}% -
|
||||||
|
|
||||||
@ -549,7 +553,7 @@
|
|||||||
|
|
||||||
{% if server['stats']['desc'] != 'False' %}
|
{% if server['stats']['desc'] != 'False' %}
|
||||||
<div id="desc_id"
|
<div id="desc_id"
|
||||||
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">
|
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">
|
||||||
{{ server['stats']['desc'] }}</div> <br />
|
{{ server['stats']['desc'] }}</div> <br />
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
@ -928,12 +932,12 @@
|
|||||||
for (i = 0; i < hostStats.disk_usage.length; i++) {
|
for (i = 0; i < hostStats.disk_usage.length; i++) {
|
||||||
if (hostStats.mounts.includes(hostStats.disk_usage[i].mount)) {
|
if (hostStats.mounts.includes(hostStats.disk_usage[i].mount)) {
|
||||||
storage_html += `<div id="{{item['device']}}" class="col-xl-3 col-lg-3 col-md-4 col-12">
|
storage_html += `<div id="{{item['device']}}" class="col-xl-3 col-lg-3 col-md-4 col-12">
|
||||||
<h4 class="mb-0 font-weight-semibold d-inline-block text-truncate" id="title_{{item['device']}}" data-toggle="tooltip" data-placement="bottom" title="${hostStats.disk_usage[i].mount}" style="max-width: 100%;"><i class="fas fa-hdd"></i> ${hostStats.disk_usage[i].mount}</h4>
|
<h4 class="mb-0 font-weight-semibold d-inline-block text-truncate storage-heading" id="title_{{item['device']}}" data-toggle="tooltip" data-placement="bottom" title="${hostStats.disk_usage[i].mount}" style="max-width: 100%;"><i class="fas fa-hdd"></i> ${hostStats.disk_usage[i].mount}</h4>
|
||||||
<div class="progress" style="display: inline-block; height: 20px; width: 100%; background-color: rgb(139, 139, 139) !important;">
|
<div class="progress" style="display: inline-block; height: 20px; width: 100%; background-color: rgb(139, 139, 139) !important;">
|
||||||
<div class="progress-bar`;
|
<div class="progress-bar`;
|
||||||
if (hostStats.disk_usage[i].percent_used <= 33) {
|
if (hostStats.disk_usage[i].percent_used <= 58) {
|
||||||
storage_html += ` bg-success`;
|
storage_html += ` bg-success`;
|
||||||
} else if (hostStats.disk_usage[i].percent_used <= 75 && hostStats.disk_usage[i].percent_used >= 34) {
|
} else if (hostStats.disk_usage[i].percent_used <= 75 && hostStats.disk_usage[i].percent_used >= 59) {
|
||||||
storage_html += ` bg-warning`;
|
storage_html += ` bg-warning`;
|
||||||
} else {
|
} else {
|
||||||
storage_html += ` bg-danger`;
|
storage_html += ` bg-danger`;
|
||||||
@ -946,7 +950,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
storage_html += `</div>`;
|
storage_html += `</div>`;
|
||||||
|
$(".storage-heading").tooltip('hide');
|
||||||
$("#storage_data").html(storage_html);
|
$("#storage_data").html(storage_html);
|
||||||
|
$("#storage_data").tooltip({ selector: '.storage-heading' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user