Pavel Loginov 2021-01-12 11:05:53 +06:00
parent c5067cd5bc
commit f5856ad73b
15 changed files with 110 additions and 102 deletions

View File

@ -70,7 +70,7 @@
{{ input('listen-port', name='port', type="number", title="Port for bind listen", placeholder="8080", size='5', required='required') }}
<div class="tooltip tooltipTop">
IP for bind listener, <b>if empty will be assigned on all IPs</b>.
Start typing IP, or press down.<br>If you are using <b>VRRP, leave the IP field blank</b>. If you assign an IP, the slave server will not start
Start typing IP, or press the "down" button.<br>If you are using <b>VRRP, leave the IP field blank</b>. If you assign an IP, the slave server will not start
</div>
</td>
</tr>
@ -162,7 +162,7 @@
{{ checkbox('antibot', title='Antibot Protection', desc='Antibot', value='1') }}
</span>
<div id="blacklist-hide" style="display: none;">
<br /><span class="tooltip tooltipTop">Enter the name of the blacklist, or press down:</span><br />
<br /><span class="tooltip tooltipTop">Enter a blacklist name, or press the "down" button:</span><br />
{{ input('blacklist-hide-input', size='39', name="blacklist", placeholder="blacklist.lst") }}
</div>
</td>
@ -201,7 +201,7 @@
<span style="padding-right: 10px;">Start typing options: </span>
{{ input('options') }}
<span style="padding-left: 10px;">
or press down. <a href="http://cbonte.github.io/haproxy-dconv/1.7/configuration.html" target="_blanck" style="color: #23527c" title="HAproxy docs">Read more about options</a>
or press the "down" button. <a href="http://cbonte.github.io/haproxy-dconv/1.7/configuration.html" target="_blanck" style="color: #23527c" title="HAproxy docs">Read more about options</a>
</span>
<br />
<span style="padding-right: 10px;">Start typing saved options: </span>
@ -245,8 +245,10 @@
</td>
</tr>
<tr class="advance-show">
<td class="addName">Advanced:</td>
<td class="addOption"><span title="Show Advanced settings" class="link">Show Advanced settings</span></td>
<td class="addOption" colspan="2">
<button title="Show full list of settings" class="row-down advance-show-button">Show Advanced settings</button>
<button title="Hide full list of settings" class="row-up advance-hide-button" style="display: none">Hide Advanced settings</button>
</td>
</tr>
<tr>
<td class="addButton">
@ -301,7 +303,7 @@
<input type="number" name="port" required title="Port for bind frontend" placeholder="8080" class="form-control">
<div class="tooltip tooltipTop">
IP for bind listener, <b>if empty will be assigned on all IPs</b>.
Start typing IP, or press down.<br>If you are using <b>VRRP, leave the IP field blank</b>. If you assign an IP, the slave server will not start
Start typing IP, or press the "down" button.<br>If you are using <b>VRRP, leave the IP field blank</b>. If you assign an IP, the slave server will not start
</div>
</td>
</tr>
@ -316,7 +318,7 @@
<input type="checkbox" id="https-frontend" name="ssl" value="https">
</span>
<div id="https-hide-frontend" style="display: none;">
<br /><span class="tooltip tooltipTop">Enter name of pem file, or press the "down" button:</span><br />
<br /><span class="tooltip tooltipTop">Enter a name of pem file, or press the "down" button:</span><br />
{{ input('path-cert-frontend', name="cert", placeholder="some_cert.pem", size='39') }}
</div>
</td>
@ -374,7 +376,7 @@
{{ checkbox('antibot1', title='Antibot Protection', desc='Antibot', value='1') }}
</span>
<div id="blacklist-hide1" style="display: none;">
<br /><span class="tooltip tooltipTop">Enter the name of the blacklist, or press down:</span><br />
<br /><span class="tooltip tooltipTop">Enter a blacklist name, or press the "down" button::</span><br />
{{ input('blacklist-hide-input1', size='39', name="blacklist", placeholder="blacklist.lst") }}
</div>
</td>
@ -394,7 +396,7 @@
<span style="padding-right: 10px;">Start typing options: </span>
{{ input('options1') }}
<span style="padding-left: 10px;">
or press down. <a href="http://cbonte.github.io/haproxy-dconv/1.7/configuration.html" target="_blanck" style="color: #23527c" title="HAproxy docs">Read more about options</a>
or press the "down" button:. <a href="http://cbonte.github.io/haproxy-dconv/1.7/configuration.html" target="_blanck" style="color: #23527c" title="HAproxy docs">Read more about options</a>
</span>
<br />
<span style="padding-right: 10px;">Start typing saved options: </span>
@ -408,14 +410,16 @@
<tr>
<td class="addName">Default backend</td>
<td class="addOption">
<div style="font-size: 12px; padding-bottom: 10px;">Start typing backend, or press down</div>
<div style="font-size: 12px; padding-bottom: 10px;">Start typing backend, or press the "down" button</div>
{{ input('backends', name='backends', placeholder="some_backend", size='30') }}
<p style="font-size: 12px"><b>Note:</b> If you want to use a default backend, you must <span title="Create backend" id="redirectBackend" class="link">create a new backend</span> first.</p>
</td>
</tr>
<tr class="advance-show">
<td class="addName">Advanced:</td>
<td class="addOption"><span title="Show Advanced settings" class="link">Show Advanced settings</span></td>
<td class="addOption" colspan="2">
<button title="Show full list of settings" class="row-down advance-show-button">Show Advanced settings</button>
<button title="Hide full list of settings" class="row-up advance-hide-button" style="display: none">Hide Advanced settings</button>
</td>
</tr>
<tr>
<td class="addButton">
@ -565,7 +569,7 @@
<span style="padding-right: 10px;">Start typing options: </span>
{{ input('options2') }}
<span style="padding-left: 10px;">
or press down. <a href="http://cbonte.github.io/haproxy-dconv/1.7/configuration.html" target="_blanck" style="color: #23527c" title="HAproxy docs">Read more about options</a>
or press the "down" button. <a href="http://cbonte.github.io/haproxy-dconv/1.7/configuration.html" target="_blanck" style="color: #23527c" title="HAproxy docs">Read more about options</a>
</span>
<br />
<span style="padding-right: 10px;">Start typing saved options: </span>
@ -609,8 +613,10 @@
</td>
</tr>
<tr class="advance-show">
<td class="addName">Advanced:</td>
<td class="addOption"><span title="Show Advanced settings" class="link">Show Advanced settings</span></td>
<td class="addOption" colspan="2">
<button title="Show full list of settings" class="row-down advance-show-button">Show Advanced settings</button>
<button title="Hide full list of settings" class="row-up advance-hide-button" style="display: none">Hide Advanced settings</button>
</td>
</tr>
<tr>
<td class="addButton">

View File

@ -352,23 +352,6 @@
<div id="change-user-groups-dialog" style="display: none;">
<div id="change-user-groups-form"></div>
</div>
<style>
.ui-selectmenu-button.ui-button {
width: 10em;
}
.first-collumn {
width: 10%;
}
.container {
margin-right: 0;
}
@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
.ui-checkboxradio-label {
padding-bottom: 0.6em !important;
padding-top: 0.6em !important;
}
}
</style>
<script>
$( function() {
{% for user in users %}
@ -407,4 +390,5 @@
{% endfor %}
});
</script>
<link href="/inc/servers.css" rel="stylesheet"/>
{% endblock %}

View File

@ -5,7 +5,6 @@
$(document).ready(function() {
$('#{{tables_head.0.strip()}}').on( 'page.dt', function () { $.getScript("/inc/fontawesome.min.js"); } )
.DataTable( {
"order": [[ 4, "desc" ]],
"pageLength": 25,
"columnDefs": [
{
@ -39,6 +38,7 @@
</tr>
</table>
<table class="overview hover order-column display compact" id="{{tables_head.0.strip()}}">
{% if table[0] != '' %}
{% for t in table %}
{% if t != '' %}
{% if loop.index == 1 %}
@ -46,15 +46,9 @@
{% set headers = headers.split(' ') %}
<thead>
<tr class="overviewHead">
<th class="padding10" style="width: 10%; padding-left: 10px;">
IP
</th>
<th>
Use
</th>
<th>
Exp
</th>
<th class="padding10" style="width: 10%; padding-left: 10px;">IP</th>
<th>Use</th>
<th>Exp</th>
<th>
{{headers.4.split('=')[0].split('(')[0]}}
</th>
@ -88,8 +82,7 @@
{{headers.11.split('=')[0].split('(')[0]}}
</th>
{% endif %}
<th>
</th>
<th style="width: 10px;"></th>
</tr>
</thead>
<tbody>
@ -145,9 +138,10 @@
<a class="delete" title="Delete this entry" style="cursor: pointer;" onclick="deleteTableEntry(this, '{{tables_head.0.strip()}}', '{{body.1.split('=')[1]}}')"></a>
</td>
</tr>
{% endif %}
{% endfor %}
{% else %}
<span class="alert alert-warning" style="margin-bottom: 0px;">Table is empty</span>
{% endif %}
{% endfor %}
</tbody>
</table>

View File

@ -6,7 +6,6 @@
$(document).ready(function() {
$('#{{t.0.0.strip()}}').on( 'page.dt', function () { $.getScript("/inc/fontawesome.min.js"); } )
.DataTable( {
"order": [[ 4, "desc" ]],
"pageLength": 10,
"columnDefs": [
{
@ -45,15 +44,9 @@
{% set headers = headers.split(' ') %}
<thead>
<tr class="overviewHead">
<th class="padding10" style="width: 10%; padding-left: 10px;">
IP
</th>
<th>
Use
</th>
<th>
Exp
</th>
<th class="padding10" style="width: 10%; padding-left: 10px;">IP</th>
<th>Use</th>
<th>Exp</th>
<th>
{{headers.4.split('=')[0].split('(')[0]}}
</th>
@ -87,7 +80,7 @@
{{headers.11.split('=')[0].split('(')[0]}}
</th>
{% endif %}
<th>
<th style="width: 10px;">
</th>
</tr>
</thead>

View File

@ -5,6 +5,9 @@
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
{% if title == 'Login page' %}
<meta name="viewport" content="width=device-width, user-scalable=1">
{% endif %}
<link href="/inc/images/favicon/favicon.ico" rel="icon" type="image/png" />
<link rel="apple-touch-icon" sizes="57x57" href="/inc/images/favicon/inc/images/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/inc/images/favicon/apple-icon-60x60.png">

View File

@ -10,20 +10,20 @@
IP
<span class="need-field">*</span>
</td>
<td>{{ input('new-ip', size='14') }}</td>
<td>{{ input('new-ip') }}</td>
<tr>
<td class="padding20" title="SSH port">
Port
<span class="need-field">*</span>
</td>
<td>{{ input('new-port', value='22', size='3') }}</td>
<td>{{ input('new-port', value='22', type='number') }}</td>
</tr>
<tr>
<td class="padding20">Enable</td>
<td>{{ checkbox('enable', checked='checked') }}</td>
</tr>
<tr>
<td class="padding20" title="Vitrual IP, something like VRRP">Virt</td>
<td class="padding20" title="Virtual IP(VRRP)">Virt</td>
<td>{{ checkbox('typeip') }}</td>
</tr>
<tr>

View File

@ -27,5 +27,5 @@
Email
<span class="need-field">*</span>
</td>
<td>{{ input('new-email') }}</td>
<td>{{ input('new-email', type='email') }}</td>
</tr>

View File

@ -21,8 +21,8 @@
<th class="slave-field" style="width: 10%">
<span title="Actions with the master config will automatically apply on the slave">Slave for</span>
</th>
<th class="cred-field" style="width: 15%">Credentials</th>
<th class="cred-field" style="width: 200px;"></th>
<th class="cred-field">Credentials</th>
<th class="cred-field" style="min-width: 70px;"></th>
<th style="width: 100%">Description</th>
<th></th>
<th></th>
@ -41,7 +41,7 @@
</td>
<td>
{% set id = 'port-' + server.0|string() %}
{{ input(id, value=server.10, size='2') }}
{{ input(id, value=server.10, type='number', style='width: 50px;') }}
</td>
{% if page != "servers.py" %}
<td>

View File

@ -7,7 +7,7 @@
<th style="width: 10%">Password</th>
<th style="width: 10%">Active</th>
<th style="width: 20%">Email</th>
<th style="width: {% if page == "servers.py" %}100{% else %}10{% endif %}%">Role</th>
<th style="width: {% if page == 'servers.py' %}100{% else %}10{% endif %}%">Role</th>
{% if page != "servers.py" %}
<th style="width: 100%">Group</th>
{% endif %}
@ -46,7 +46,7 @@
{% if user.6 == 1%}
{{ input(email_id, value=user.2, readonly='readonly') }}
{% else %}
{{ input(email_id, value=user.2) }}
{{ input(email_id, value=user.2, type='email') }}
{% endif %}
</td>
<td>

View File

@ -224,26 +224,5 @@
{% endfor %}
});
</script>
<style>
.ui-selectmenu-button.ui-button {
width: 10em;
}
.checkbox {
width: 90px;
}
.container {
margin-right: 0;
}
@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
.ui-checkboxradio-label {
padding-bottom: 0.6em !important;
padding-top: 0.6em !important;
}
}
.group_error {
display: none;
clear: both;
height: 60px;
}
</style>
<link href="/inc/servers.css" rel="stylesheet"/>
{% endblock %}

View File

@ -902,9 +902,15 @@ $( function() {
$('#add-userlist-group').click(function() {
$('#userlist-groups').append(add_userlist_group_var);
});
$('.advance-show').click(function() {
$('.advance-show').fadeOut();
$('.advance-show-button').click(function() {
$('.advance').fadeIn();
$('.advance-show-button').css('display', 'none');
$('.advance-hide-button').css('display', 'block');
});
$('.advance-hide-button').click(function() {
$('.advance').fadeOut();
$('.advance-show-button').css('display', 'block');
$('.advance-hide-button').css('display', 'none');
});
$('#ssl_offloading').click(function() {
if($('#optionsInput').val().indexOf('ssl_fc ') == '-1') {

View File

@ -259,3 +259,18 @@
font-family: "Font Awesome 5 Solid";
content: "\f068";
}
.row-down::after {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f078";
}
.row-up::after {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f077";
}
.row-down .fa-chevron-down, .row-up .fa-chevron-up {
margin-bottom: -1px;
padding-left: 5px;
}

View File

@ -181,7 +181,7 @@ $( function() {
type: "POST",
success: function( data ) {
data = data.replace(/\s+/g,' ');
if (data.indexOf('error: ') != '-1') {
if (data.indexOf('error: ') != '-1' || data.indexOf('Invalid ') != '-1') {
toastr.error(data);
} else {
toastr.success(data);
@ -249,7 +249,6 @@ $( function() {
} else {
var value = data.split(',');
$('#list_select').find('option').remove();
//$('#list_select').append($("<option titile='Show all tables'></option>").attr("value","All").text("All"));
for (let i = 0; i < data.split(',').length; i++) {
if (value[i] != '') {
@ -388,8 +387,6 @@ function addNewIp() {
allFields.removeClass( "ui-state-error" );
valid = valid && checkLength( $('#list_add_ip_new_ip'), "IP", 1 );
var ip = $('#list_add_ip_new_ip').val();
console.log($('#list_add_ip_new_ip').val());
console.log($('#list_add_ip').data("list-id"))
if(valid) {
$.ajax({
url: "options.py",

34
inc/servers.css Normal file
View File

@ -0,0 +1,34 @@
.ui-selectmenu-button.ui-button {
width: 10em;
}
.first-collumn {
width: 10%;
}
.container {
margin-right: 0;
}
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) {
.ui-checkboxradio-label {
padding-bottom: 0.6em !important;
padding-top: 0.6em !important;
}
.ui-checkboxradio-checked {
padding-bottom: 0.6em !important;
padding-top: 0.7em !important;
}
}
@-moz-document url-prefix() {
.ui-checkboxradio-label {
padding-bottom: 0.4em !important;
padding-top: 0.4em !important;
}
.ui-checkboxradio-checked {
padding-bottom: 0.4em !important;
padding-top: 0.5em !important;
}
}
.group_error {
display: none;
clear: both;
height: 60px;
}

View File

@ -313,12 +313,9 @@ pre {
.advance {
display: none;
}
.advance-show {
.advance-show, .advance-hide {
font-size: 13px !important;
}
.advance-show a{
color: #23527c !important;
}
.addButton {
padding-top: 15px;
padding-left: 15px;
@ -381,7 +378,7 @@ pre {
padding-left: 10px;
}
.cred-field {
min-width: 214px;
min-width: 225px;
}
.overviewTr {
margin: 0;
@ -615,15 +612,15 @@ ul{
.ui-selectmenu-open, .ui-selectmenu-menu {
z-index: 1010 !important;
}
.ui-corner-all {
border-radius: 0 !important;
}
#tabs.ui-widget.ui-widget-content {
border-bottom: none !important;
}
.need-field {
color: red;
}
.ui-corner-all {
border-radius: 0 !important;
}
a:active, a:hover {
outline: 0;
}