mirror of https://github.com/Aidaho12/haproxy-wi
parent
8ef0a52d25
commit
43efd1587e
|
@ -3,6 +3,7 @@ import json
|
|||
import http.cookies
|
||||
|
||||
import pika
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
import modules.db.sql as sql
|
||||
import modules.roxywi.common as roxywi_common
|
||||
|
@ -214,6 +215,9 @@ def check_email_alert() -> None:
|
|||
print(f'error: Cannot send a message {e}')
|
||||
|
||||
|
||||
error_mess = 'error: All fields must be completed'
|
||||
|
||||
|
||||
def add_telegram_channel(token: str, channel: str, group: str, page: str) -> None:
|
||||
if token is None or channel is None or group is None:
|
||||
print(error_mess)
|
||||
|
|
|
@ -1777,7 +1777,7 @@ if form.getvalue('ssh_cert'):
|
|||
roxywi_common.logging("Roxy-WI server", f"A new SSH cert has been uploaded {ssh_keys}", roxywi=1, login=1)
|
||||
|
||||
if form.getvalue('newtelegram'):
|
||||
import modules.alerting.alerting as alertin
|
||||
import modules.alerting.alerting as alerting
|
||||
|
||||
token = common.checkAjaxInput(form.getvalue('newtelegram'))
|
||||
channel = common.checkAjaxInput(form.getvalue('chanel'))
|
||||
|
@ -1810,7 +1810,7 @@ if form.getvalue('slackdel') is not None:
|
|||
import modules.alerting.alerting as alerting
|
||||
|
||||
channel_id = common.checkAjaxInput(form.getvalue('slackdel'))
|
||||
slack = sql.select_slack(id=slackdel)
|
||||
slack = sql.select_slack(id=channel_id)
|
||||
|
||||
alerting.delete_slack_channel(telegram, channel_id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue