mirror of https://git.48k.eu/ogcp
Add clients in Linux and Windows mode
Scopes tree shows clients booted in Linux and Windows with ogClient installed. It also shows if the user logs in.async-tree
parent
693f5255b1
commit
42bf42f580
|
@ -33,11 +33,27 @@ html, body {
|
|||
color: #99791a !important;
|
||||
}
|
||||
|
||||
.text-linux {
|
||||
color: #d77cb3 !important;
|
||||
}
|
||||
|
||||
.text-windows {
|
||||
color: #2d9efb !important;
|
||||
}
|
||||
|
||||
.badge-wol {
|
||||
color: white !important;
|
||||
background-color: #99791a !important;
|
||||
}
|
||||
|
||||
.badge-linux {
|
||||
background-color: #d77cb3 !important;
|
||||
}
|
||||
|
||||
.badge-windows {
|
||||
background-color: #2d9efb !important;
|
||||
}
|
||||
|
||||
.og-pill {
|
||||
width: 11em;
|
||||
}
|
||||
|
|
|
@ -179,10 +179,18 @@ function updatePillStatus(scope, pill) {
|
|||
let link = scope.link
|
||||
let units = 'Mb/s'
|
||||
const pillCls = ['badge-danger', 'badge-success', 'badge-warning',
|
||||
'badge-wol', 'badge-light'];
|
||||
'badge-wol', 'badge-light', 'text-linux', 'text-windows'];
|
||||
pill.classList.remove(...pillCls);
|
||||
if (state === 'OPG') {
|
||||
pill.classList.add('badge-warning');
|
||||
} else if (state === 'LNX') {
|
||||
pill.classList.add('badge-linux');
|
||||
} else if (state === 'LNXS') {
|
||||
pill.classList.add('badge-linux');
|
||||
} else if (state === 'WIN') {
|
||||
pill.classList.add('badge-windows');
|
||||
} else if (state === 'WINS') {
|
||||
pill.classList.add('badge-windows');
|
||||
} else if (state === 'BSY') {
|
||||
pill.classList.add('badge-danger');
|
||||
} else if (state === 'VDI') {
|
||||
|
@ -209,8 +217,9 @@ function updateScopes(scopes) {
|
|||
const scopeId = `${scope.name}_${scope.id}`.replaceAll(/[.]|[ ]/g, '_');
|
||||
const iconEl = document.querySelector(`#${scopeId} .nav-icon`);
|
||||
const iconCls = ['fas', 'far', 'fa-circle', 'fa-check-circle',
|
||||
'fa-times-circle', 'text-danger', 'text-success',
|
||||
'text-warning', 'text-wol'];
|
||||
'fa-times-circle', 'fa-user-circle', 'text-danger',
|
||||
'text-success', 'text-warning', 'text-wol',
|
||||
'text-linux', 'text-windows'];
|
||||
iconEl.classList.remove(...iconCls);
|
||||
let newIconCls = [];
|
||||
if (scope.state === 'OPG') {
|
||||
|
@ -219,6 +228,14 @@ function updateScopes(scopes) {
|
|||
newIconCls.push('fa-times-circle');
|
||||
else
|
||||
newIconCls.push('fa-circle');
|
||||
} else if (scope.state === 'LNX') {
|
||||
newIconCls.push('fas', 'fa-circle', 'text-linux');
|
||||
} else if (scope.state === 'LNXS') {
|
||||
newIconCls.push('fas', 'fa-user-circle', 'text-linux');
|
||||
} else if (scope.state === 'WIN') {
|
||||
newIconCls.push('fas', 'fa-circle', 'text-windows');
|
||||
} else if (scope.state === 'WINS') {
|
||||
newIconCls.push('fas', 'fa-user-circle', 'text-windows');
|
||||
} else if (scope.state === 'BSY') {
|
||||
newIconCls.push('fas', 'fa-circle', 'text-danger');
|
||||
} else if (scope.state === 'VDI') {
|
||||
|
|
|
@ -59,6 +59,10 @@
|
|||
{% if "state" in scope %}
|
||||
<i class="nav-icon fa-circle
|
||||
{% if scope['state'] == 'OPG' %}fas text-warning
|
||||
{% elif scope['state'] == 'LNX' %}fas text-linux
|
||||
{% elif scope['state'] == 'LNX' %}fas fa-user-circle text-linux
|
||||
{% elif scope['state'] == 'WIN' %}fas text-windows
|
||||
{% elif scope['state'] == 'WIN' %}fas fa-user-circle text-windows
|
||||
{% elif scope['state'] == 'BSY' %}fas text-danger
|
||||
{% elif scope['state'] == 'VDI' %}fas text-success
|
||||
{% elif scope['state'] == 'WOL_SENT' %}fas text-wol
|
||||
|
@ -84,6 +88,10 @@
|
|||
<li class="nav-item"><i class="nav-icon fas fa-circle text-wol"></i> {{_('WoL sent')}} </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-circle text-warning"></i> ogLive </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-circle text-danger"></i> {{_('Busy')}} </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-circle text-linux"></i> Linux </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-user-circle text-linux"></i> {{_('Linux session')}} </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-circle text-windows"></i> Windows </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-user-circle text-windows"></i> {{_('Windows session')}} </li>
|
||||
<li class="nav-item"><i class="nav-icon fas fa-circle text-success"></i> VDI </li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue