Bugs
pull/21/head
Aidaho12 2018-07-07 15:43:31 +06:00
parent 2c6eb8d37d
commit 00aaa0a481
9 changed files with 36 additions and 10 deletions

View File

@ -22,7 +22,7 @@ try:
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
user_id = cookie.get('uuid')
user = sql.get_user_name_by_uuid(user_id.value)
servers = sql.get_dick_permit()
servers = sql.get_dick_permit(disable=0)
token = sql.get_token(user_id.value)
except:
pass

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import os
import sql
import http
import http, cgi
import funct
import sql
from jinja2 import Environment, FileSystemLoader
@ -10,6 +10,7 @@ template = env.get_template('runtimeapi.html')
print('Content-type: text/html\n')
funct.check_login()
form = cgi.FieldStorage()
try:
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
@ -17,6 +18,7 @@ try:
user = sql.get_user_name_by_uuid(user_id.value)
servers = sql.get_dick_permit(virt=1)
token = sql.get_token(user_id.value)
servbackend = form.getvalue('servbackend')
except:
pass
@ -27,5 +29,6 @@ output_from_parsed_template = template.render(h2 = 1,
onclick = "showRuntime()",
select_id = "serv",
selects = servers,
token = token)
token = token,
servbackend = servbackend)
print(output_from_parsed_template)

View File

@ -6,6 +6,11 @@
<li><a href="#frontend">Frontend</a></li>
<li><a href="#backend">Backend</a></li>
<li><a href="#ssl">SSL certificates</a></li>
{% if user %}
<a href=/app/login.py?logout=logout title="Logout, user name: {{ user }}" class="login"> Logout</a>
{% else %}
<a href=/app/login.py title="Login" class="login"> Login</a>
{% endif %}
</ul>
<div id="listen">
<form name="add-listner" action="/app/add.py">

View File

@ -11,6 +11,11 @@
<li><a href="#servers">Servers</a></li>
<li><a href="#roles">Roles</a></li>
<li><a href="#ssh">SSH credentials</a></li>
{% if user %}
<a href=/app/login.py?logout=logout title="Logout, user name: {{ user }}" class="login"> Logout</a>
{% else %}
<a href=/app/login.py title="Login" class="login"> Login</a>
{% endif %}
</ul>
<div id="users">
<table class="overview" id="ajax-users">

View File

@ -10,8 +10,8 @@
</tr>
<tr>
<td class="padding10 first-collumn" style="width: 25%;">
<form action= {{ action }} method="get">
<select autofocus required id="{{ select_id }}">
<form action="{{ action }}" method="get">
<select autofocus required id="{{ select_id }}" name="{{ select_id }}">
<option disabled>Choose server</option>
{% for select in selects %}
<option value="{{ select.2 }}">{{ select.1 }}</option>
@ -30,7 +30,7 @@
</select>
</td>
<td>
<input type="text" name="servbackend" id="servbackend" size=35 title="Frontend, backend/server, show: info, pools or help" required class="form-control">
<input type="text" name="servbackend" id="servbackend" size=35 title="Frontend, backend/server, show: info, pools or help" required class="form-control" value="{{ servbackend }}">
</td>
<td>
{% if role <= 2 %}
@ -43,4 +43,9 @@
</form>
</tr>
</table>
<script>
if($('#servbackend').val()) {
window.onload = {{ onclick }}
}
</script>
{% endblock %}

View File

@ -8,6 +8,11 @@
<ul>
<li><a href="#servers">Servers</a></li>
<li><a href="#ssh">SSH credentials</a></li>
{% if user %}
<a href=/app/login.py?logout=logout title="Logout, user name: {{ user }}" class="login"> Logout</a>
{% else %}
<a href=/app/login.py title="Login" class="login"> Login</a>
{% endif %}
</ul>
<div id="servers">

View File

@ -30,7 +30,7 @@
position: fixed;
z-index: 1031;
top: 15px;
right: 175px;
right: 285px;
}
#nprogress .spinner-icon {
width: 18px;

View File

@ -419,7 +419,8 @@ pre {
color: #fff !important;
}
.ui-tabs-nav {
padding-left: 20px !important;
border-radius: 0 !important;
padding-left: 25px !important;
}
.ui-tabs .ui-tabs-panel {
padding: 0 !important;
@ -427,6 +428,8 @@ pre {
}
.ui-tabs {
padding-left: 0 !important;
margin-top: -5px !important;
margin-left: -2px;
}
.ui-widget-header {
background: #5d9ceb !important;

View File

@ -57,7 +57,7 @@ else
yum -y install epel-release
fi
yum -y install git nmap-ncat net-tools lshw python34 dos2unix python34-pip httpd mod_ssl gcc python34-devel
yum -y install git nmap-ncat net-tools lshw python34 dos2unix python34-pip httpd mod_ssl python34-devel
HTTPD_CONFIG="/etc/httpd/conf/httpd.conf"
HAPROXY_WI_VHOST_CONF="/etc/httpd/conf.d/haproxy-wi.conf"
HTTPD_NAME="httpd"