pull/60/head
Aidaho12 6 years ago
parent b6d4ebb8c8
commit 6f7984b6be

@ -137,7 +137,6 @@ For Runtime API, Metrics and Alerting enable state file and stat socket on HApro
# Update # Update
``` ```
# cd /var/www/haproxy-wi # cd /var/www/haproxy-wi
# chmod +x update.sh
# ./update.sh # ./update.sh
``` ```

@ -43,6 +43,7 @@ def logging(serv, action, **kwargs):
import sql import sql
import http.cookies import http.cookies
log_path = get_config_var('main', 'log_path') log_path = get_config_var('main', 'log_path')
login = ''
if not os.path.exists(log_path): if not os.path.exists(log_path):
os.makedirs(log_path) os.makedirs(log_path)

@ -73,6 +73,7 @@ if login is not None and password is not None:
print(c) print(c)
sql.write_user_uuid(login, user_uuid) sql.write_user_uuid(login, user_uuid)
sql.write_user_token(login, user_token) sql.write_user_token(login, user_token)
funct.logging('locahost', sql.get_user_name_by_uuid(user_uuid)+' log in')
print("Content-type: text/html\n") print("Content-type: text/html\n")
print('ok') print('ok')
sys.exit() sys.exit()

@ -16,7 +16,7 @@
<td style="width: 10%;">Number rows</td> <td style="width: 10%;">Number rows</td>
<td class="padding10" style="width: 10%;">Ex for grep</td> <td class="padding10" style="width: 10%;">Ex for grep</td>
<td style="width: 10%;"> <td style="width: 10%;">
<label for="time_range_out_hour">Time range:</label> <label for="time_range_out_hour" style="padding: 0">Time range:</label>
<input type="text" id="time_range_out_hour" readonly class="time-range">:<input type="text" id="time_range_out_minut" readonly class="time-range"> - <input type="text" id="time_range_out_hour" readonly class="time-range">:<input type="text" id="time_range_out_minut" readonly class="time-range"> -
<input type="text" id="time_range_out_hour1" readonly class="time-range">:<input type="text" id="time_range_out_minut1" readonly class="time-range"> <input type="text" id="time_range_out_hour1" readonly class="time-range">:<input type="text" id="time_range_out_minut1" readonly class="time-range">
</td> </td>

@ -418,6 +418,7 @@ sudo mkdir /var/www/$HOME_HAPROXY_WI/configs/kp_config/
sudo mkdir /var/www/$HOME_HAPROXY_WI/log/ sudo mkdir /var/www/$HOME_HAPROXY_WI/log/
sudo sudo chmod +x /var/www/$HOME_HAPROXY_WI/app/*.py sudo sudo chmod +x /var/www/$HOME_HAPROXY_WI/app/*.py
sudo chmod +x /var/www/$HOME_HAPROXY_WI/app/tools/*.py sudo chmod +x /var/www/$HOME_HAPROXY_WI/app/tools/*.py
chmod +x /var/www/$HOME_HAPROXY_WI/update.sh
cd /var/www/$HOME_HAPROXY_WI/app cd /var/www/$HOME_HAPROXY_WI/app
./create_db.py ./create_db.py

@ -1,5 +1,5 @@
configparser==3.5.0 configparser==3.5.0
paramiko==2.4.1 paramiko==2.4.2
pytz==2017.3 pytz==2017.3
requests==2.18.4 requests==2.18.4
requests_toolbelt==0.8.0 requests_toolbelt==0.8.0

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
cp app/haproxy-webintarface.config /tmp/ cp app/haproxy-wi.cfg /tmp/
git reset --hard git reset --hard
git pull https://github.com/Aidaho12/haproxy-wi.git git pull https://github.com/Aidaho12/haproxy-wi.git
@ -22,24 +22,14 @@ cd app/
pip3 install -r ../requirements.txt pip3 install -r ../requirements.txt
pip3.5 install -r ../requirements.txt pip3.5 install -r ../requirements.txt
chmod +x ../update.sh
echo "" mv /tmp/haproxy-wi.cfg app/haproxy-wi.cfg
echo "#################"
echo "Change in config:"
diff --expand-tabs -W 100 -y /tmp/haproxy-webintarface.config haproxy-wi.cfg
echo ""
echo "Please set your config"
echo ""
echo "################"
echo "Your config saved in /tmp/haproxy-webintarface.config. Please compare with new and set your env back"
echo ""
echo ""
echo ""
echo "################" echo "################"
echo "" echo ""
echo "" echo ""
echo "" echo ""
echo "ATTENTION!!! New config file name: haproxy-wi.cfg" echo "ATTENTION!!! New config file name is: haproxy-wi.cfg"
echo "" echo ""
echo "" echo ""
echo "" echo ""

Loading…
Cancel
Save