Browse Source

v3.2.13

pull/60/head
Aidaho12 6 years ago
parent
commit
6f7984b6be
  1. 1
      README.md
  2. 1
      app/funct.py
  3. 1
      app/login.py
  4. 2
      app/templates/logs.html
  5. 1
      install.sh
  6. 2
      requirements.txt
  7. 18
      update.sh

1
README.md

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

1
app/funct.py

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

1
app/login.py

@ -73,6 +73,7 @@ if login is not None and password is not None:
print(c)
sql.write_user_uuid(login, user_uuid)
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('ok')
sys.exit()

2
app/templates/logs.html

@ -16,7 +16,7 @@
<td style="width: 10%;">Number rows</td>
<td class="padding10" style="width: 10%;">Ex for grep</td>
<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_hour1" readonly class="time-range">:<input type="text" id="time_range_out_minut1" readonly class="time-range">
</td>

1
install.sh

@ -418,6 +418,7 @@ sudo mkdir /var/www/$HOME_HAPROXY_WI/configs/kp_config/
sudo mkdir /var/www/$HOME_HAPROXY_WI/log/
sudo sudo chmod +x /var/www/$HOME_HAPROXY_WI/app/*.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
./create_db.py

2
requirements.txt

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

18
update.sh

@ -1,6 +1,6 @@
#!/bin/bash
cp app/haproxy-webintarface.config /tmp/
cp app/haproxy-wi.cfg /tmp/
git reset --hard
git pull https://github.com/Aidaho12/haproxy-wi.git
@ -22,24 +22,14 @@ cd app/
pip3 install -r ../requirements.txt
pip3.5 install -r ../requirements.txt
chmod +x ../update.sh
echo ""
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 ""
mv /tmp/haproxy-wi.cfg app/haproxy-wi.cfg
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 ""

Loading…
Cancel
Save