Changelog: https://roxy-wi.org/changelog#6_2_3
pull/343/head
Pavel Loginov 2022-11-03 11:45:50 +03:00
parent b4dc2a24cf
commit a9783ee58d
5 changed files with 27 additions and 20 deletions

View File

@ -966,7 +966,7 @@ def update_db_v_6_2_1():
def update_ver():
try:
Version.update(version='6.2.2.0').execute()
Version.update(version='6.2.3.0').execute()
except Exception:
print('Cannot update version')

View File

@ -56,7 +56,7 @@ class SshConnection:
def run_command(self, command):
try:
stdin, stdout, stderr = self.ssh.exec_command(command, get_pty=True)
stdin, stdout, stderr = self.ssh.exec_command(command, get_pty=True, timeout=2)
except Exception as e:
raise paramiko.SSHException(str(e))

View File

@ -32,8 +32,8 @@ a.px:link {color: #ffff40; text-decoration: none;}a.px:visited {color: #ffff40;
table.tbl { border-collapse: collapse; border-style: none;}
table.tbl td { text-align: right; border-width: 1px 1px 1px 1px; border-style: solid solid solid solid; padding: 2px 3px; border-color: gray; white-space: nowrap;}
table.tbl td.ac { text-align: center;}
table.tbl th { border-width: 1px; border-style: solid solid solid solid; border-color: gray; padding-left: 10px;}
table.tbl th.pxname { background: #b00040; color: #ffff40; font-weight: bold; border-style: solid solid none solid; padding: 2px 3px; white-space: nowrap;}
table.tbl th { border-width: 1px; border-style: solid solid solid solid; border-color: gray; padding-left: 10px; font-size: 12px;}
table.tbl th.pxname { background: #b00040; color: #ffff40; font-weight: bold; border-style: solid solid none solid; padding: 2px 3px; white-space: nowrap; font-size: 1em;}
table.tbl th.empty { border-style: none; empty-cells: hide; background: white;}
table.tbl th.desc { background: white; border-style: solid solid none solid; text-align: left; padding: 2px 3px;}
@ -59,17 +59,14 @@ div.tips {
}
u:hover div.tips {visibility:visible;}
</style>
{% for l in out %}
<table class="tbl" width="100%">
<tr class="titre">
<th class="pxname" style="background-color: rgb(93, 156, 235); width: 100%; padding-top: 4px; padding-bottom: 4px; border-color: rgb(221, 221, 221);">
<a name="status">
<a class="px" href="#stats" style="color: rgb(255, 255, 255);">NGINX status</a>
</th>
</tr>
<tr class="titre">
<th class="pxname" style="background-color: rgb(93, 156, 235); width: 100%; padding-top: 4px; padding-bottom: 4px; border-color: rgb(221, 221, 221);">
<a name="status">
<a class="px" href="#stats" style="color: rgb(255, 255, 255);">NGINX status</a>
</th>
</tr>
</table>
<table class="tbl" width="100%">
<tr class="titre">
@ -77,13 +74,13 @@ u:hover div.tips {visibility:visible;}
{{l.0.0}} {{l.0.1}}
</th>
<th style="background-color: rgb(245, 250, 244); padding-top: 4px; padding-bottom: 4px; border-color: rgb(221, 221, 221);">
{{l.0.4}}
{{l.0.4|title}}
</th>
<th style="background-color: rgb(245, 250, 244); padding-top: 4px; padding-bottom: 4px; border-color: rgb(221, 221, 221);">
{{l.0.5}}
{{l.0.5|title}}
</th>
<th style="background-color: rgb(245, 250, 244); padding-top: 4px; padding-bottom: 4px; border-color: rgb(221, 221, 221);">
{{l.0.6}}
{{l.0.6|title}}
</th>
<th style="background-color: rgb(245, 250, 244); padding-top: 4px; padding-bottom: 4px; border-color: rgb(221, 221, 221);">
{{l.0.10}}
@ -117,7 +114,6 @@ u:hover div.tips {visibility:visible;}
<td style="font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; font-size: 11px; border-color: rgb(221, 221, 221); padding: 3px;">
{{l.0.15}}
</td>
</tr>
</table>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">

View File

@ -20,6 +20,9 @@
<tbody>
{% endif %}
{% for user in users %}
{% if user.role == 'superAdmin' and page == "servers.py" %}
{% set disable_superAdmin = "disabled" %}
{% endif %}
<tr id="user-{{user.user_id}}" class="{{ loop.cycle('odd', 'even') }} {% if adding %}newuser{% endif %}">
<td class="padding10 first-collumn">
{% set login_id = 'login-' + user.user_id|string() %}
@ -38,9 +41,9 @@
<td class="checkbox">
{% set activeuser_id = 'activeuser-' + user.user_id|string() %}
{% if user.activeuser == 1 %}
{{ checkbox(activeuser_id, checked='checked') }}
{{ checkbox(activeuser_id, checked='checked', disabled=disable_superAdmin) }}
{% else %}
{{ checkbox(activeuser_id) }}
{{ checkbox(activeuser_id, disable_superAdmin) }}
{% endif %}
</td>
<td>
@ -52,7 +55,7 @@
{% endif %}
</td>
<td>
<select id="role-{{user.user_id}}" name="role-{{user.user_id}}">
<select id="role-{{user.user_id}}" name="role-{{user.user_id}}" {{disable_superAdmin}}>
<option disabled selected>Select a role</option>
{% for r in roles %}
{% if page == "servers.py" %}

View File

@ -2139,6 +2139,10 @@ function openChangeUserServiceDialog(id) {
changeUserServiceDialog(id);
}
function changeUserPasswordDialog(id) {
if ($('#role-'+id + ' option:selected' ).val() == 'Select a role') {
toastr.warning('You cannot edit password for superAdmin role.');
return false;
}
$( "#user-change-password-table" ).dialog({
autoOpen: true,
resizable: false,
@ -2232,6 +2236,10 @@ function changeUserGroupDialog(id) {
} );
}
function changeUserServiceDialog(id) {
if ($('#role-'+id + ' option:selected' ).val() == 'Select a role') {
toastr.warning('You cannot edit services for superAdmin role.');
return false;
}
$.ajax( {
url: "options.py",
data: {