mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
4
.env
4
.env
@@ -2,5 +2,9 @@
|
||||
APP_DATA_LOCATION=/path/to/docker_appdata
|
||||
APP_CONFIG_LOCATION=/path/to/docker_config
|
||||
LOGS_LOCATION=/path/to/docker_logs
|
||||
TZ=Europe/Paris
|
||||
HOST_USER_ID=1000
|
||||
HOST_USER_GID=1000
|
||||
PORT=20211
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ ENV USER=pi USER_ID=1000 USER_GID=1000 TZ=Europe/London PORT=20211
|
||||
# Todo, do we still need all these packages? I can already see sudo which isn't needed
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo lighttpd php php-cgi php-fpm php-sqlite3 sqlite3 dnsutils net-tools python iproute2 nmap python-pip -y \
|
||||
&& apt-get install --no-install-recommends ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo lighttpd php php-cgi php-fpm php-sqlite3 sqlite3 dnsutils net-tools python iproute2 nmap python-pip zip -y \
|
||||
&& pip install requests \
|
||||
&& apt-get clean autoclean \
|
||||
&& apt-get autoremove \
|
||||
@@ -29,8 +29,7 @@ RUN groupadd --gid "${USER_GID}" "${USER}" && \
|
||||
COPY . /home/pi/pialert
|
||||
|
||||
# Pi.Alert
|
||||
RUN sed -ie "s|TIMEZONE|${TZ}|g" /home/pi/pialert/install/pialert.cron \
|
||||
&& python /home/pi/pialert/back/pialert.py update_vendors \
|
||||
RUN python /home/pi/pialert/back/pialert.py update_vendors \
|
||||
&& sed -ie 's/= 80/= '${PORT}'/g' /etc/lighttpd/lighttpd.conf \
|
||||
&& (crontab -l 2>/dev/null; cat /home/pi/pialert/install/pialert.cron) | crontab -
|
||||
|
||||
|
||||
39
README.md
39
README.md
@@ -4,25 +4,26 @@
|
||||
WIFI / LAN intruder detector.
|
||||
|
||||
Scan the devices connected to your WIFI / LAN and alert you the connection of
|
||||
unknown devices. It also warns the disconnection of "always connected" devices.
|
||||
unknown devices. It also warns if a "always connected" devices disconnects.
|
||||
|
||||
![Main screen][main]
|
||||
*(Apologies for my English and my limited knowledge of Python, php and
|
||||
JavaScript)*
|
||||
|
||||
# Docker image :whale:
|
||||
# Docker image 🐳
|
||||
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker.yml)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
<a href="https://hub.docker.com/r/jokobsk/pi.alert">
|
||||
<img src="https://img.shields.io/docker/pulls/jokobsk/pi.alert?logo=docker&color=0aa8d2&logoColor=fff" alt="Docker Pulls">
|
||||
</a>
|
||||
|
||||
All credit for Pi.Alert goes to: [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert).
|
||||
A pre-built image is available on :whale: Docker Hub: [jokobsk/Pi.Alert](https://registry.hub.docker.com/r/jokobsk/pi.alert).
|
||||
The source :page_facing_up: Dockerfile is available [here](https://github.com/jokob-sk/Pi.Alert/blob/main/Dockerfile) with a detailed :books: [readme](https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md) included.
|
||||
🥇 Pi.Alert credit goes to [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert). <br/>
|
||||
🐳 Docker Image: [jokobsk/Pi.Alert](https://registry.hub.docker.com/r/jokobsk/pi.alert). <br/>
|
||||
📄 [Dockerfile](https://github.com/jokob-sk/Pi.Alert/blob/main/Dockerfile) <br/>
|
||||
📚 [Dockerfile instructions](https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md).
|
||||
|
||||
![Main screen dark][main_dark]
|
||||
Optional Darkmode (and 12H activity chart) within this fork courtesy of [leiweibau](https://github.com/leiweibau/Pi.Alert)
|
||||
Dark mode (and Device presence over time) within this fork courtesy of [leiweibau](https://github.com/leiweibau/Pi.Alert)
|
||||
|
||||
## How it works
|
||||
The system continuously scans the network for:
|
||||
@@ -54,14 +55,18 @@ In charge of:
|
||||
- Scan the network searching connected devices using the scanning methods
|
||||
described
|
||||
- Store the information in the DB
|
||||
- Report the changes detected by e-mail
|
||||
- Report the changes detected by e-mail and/or other services (Pushsafer, NTFY, Gotify)
|
||||
- Optional speedtest for Device "Internet"
|
||||
|
||||
| ![Report 1][report1] | ![Report 2][report2] |
|
||||
| -------------------- | -------------------- |
|
||||
|
||||
### Front
|
||||
A web frontal that allows:
|
||||
There is a configurable login to prevent unauthorized use.
|
||||
|
||||
> * Set `PIALERT_WEB_PROTECTION = True` in `pialert.conf` to enable
|
||||
|
||||
A web frontend that allows:
|
||||
- Manage the devices inventory and the characteristics
|
||||
- Display in a visual way all the information collected by the back
|
||||
- Sessions
|
||||
@@ -72,7 +77,7 @@ A web frontal that allows:
|
||||
- Concurrent devices
|
||||
- Down alerts
|
||||
- IP's
|
||||
- manuel nmap scans
|
||||
- Manual Nmap scans
|
||||
- Optional speedtest for Device "Internet"
|
||||
- ...
|
||||
|
||||
@@ -98,9 +103,9 @@ Initially designed to run on a Raspberry Pi, probably it can run on many other
|
||||
Linux distributions.
|
||||
|
||||
- One-step Automated Install:
|
||||
#### `curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_install.sh | bash`
|
||||
#### `curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install.sh | bash`
|
||||
|
||||
- One-step Automated Install (forked) without Webserver:
|
||||
- One-step Automated Install without Webserver if another Webserver is already installed. (not recommended):
|
||||
#### `curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install_no_webserver.sh | bash`
|
||||
|
||||
- [Installation Guide (step by step)](docs/INSTALL.md)
|
||||
@@ -109,7 +114,7 @@ Linux distributions.
|
||||
# Update
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
- One-step Automated Update:
|
||||
#### `curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_update.sh | bash`
|
||||
#### `curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh | bash`
|
||||
|
||||
# Uninstall process
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
@@ -159,6 +164,16 @@ Linux distributions.
|
||||
|
||||
***Suggestions and comments are welcome***
|
||||
|
||||
### Special thanks 🥇
|
||||
|
||||
This code is a collaborative body of work, with special thanks to:
|
||||
|
||||
- [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and Last X scans activity chart)
|
||||
- [Macleykun](https://github.com/Macleykun): Help with Dockerfile clean-up
|
||||
- [Final-Hawk](https://github.com/Final-Hawk): Help with NTFY, styling and other fixes
|
||||
- [terorero](https://github.com/terorero): Spanish translation
|
||||
- [jokob-sk](https://github.com/jokob-sk/Pi.Alert): DB Maintenance tools
|
||||
- Please see the [Git commit history](https://github.com/jokob-sk/Pi.Alert/commits/main) for a full list of people and their contributions to the project
|
||||
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
[main]: ./docs/img/1_devices.jpg "Main screen"
|
||||
|
||||
113
back/pialert.py
113
back/pialert.py
@@ -1230,21 +1230,21 @@ def email_reporting ():
|
||||
mail_text = mail_text.replace ('<SERVER_NAME>', socket.gethostname() )
|
||||
mail_html = mail_html.replace ('<SERVER_NAME>', socket.gethostname() )
|
||||
|
||||
mail_text = mail_text.replace ('<PIALERT_VERSION>', VERSION )
|
||||
mail_html = mail_html.replace ('<PIALERT_VERSION>', VERSION )
|
||||
# mail_text = mail_text.replace ('<PIALERT_VERSION>', VERSION )
|
||||
# mail_html = mail_html.replace ('<PIALERT_VERSION>', VERSION )
|
||||
|
||||
mail_text = mail_text.replace ('<PIALERT_VERSION_DATE>', VERSION_DATE )
|
||||
mail_html = mail_html.replace ('<PIALERT_VERSION_DATE>', VERSION_DATE )
|
||||
# mail_text = mail_text.replace ('<PIALERT_VERSION_DATE>', VERSION_DATE )
|
||||
# mail_html = mail_html.replace ('<PIALERT_VERSION_DATE>', VERSION_DATE )
|
||||
|
||||
mail_text = mail_text.replace ('<PIALERT_YEAR>', VERSION_YEAR )
|
||||
mail_html = mail_html.replace ('<PIALERT_YEAR>', VERSION_YEAR )
|
||||
# mail_text = mail_text.replace ('<PIALERT_YEAR>', VERSION_YEAR )
|
||||
# mail_html = mail_html.replace ('<PIALERT_YEAR>', VERSION_YEAR )
|
||||
|
||||
# Compose Internet Section
|
||||
print (' Formating report...')
|
||||
mail_section_Internet = False
|
||||
mail_text_Internet = ''
|
||||
mail_html_Internet = ''
|
||||
text_line_template = '{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n\n'
|
||||
text_line_template = '{} \t{}\t{}\t{}\n'
|
||||
html_line_template = '<tr>\n'+ \
|
||||
' <td> <a href="{}{}"> {} </a> </td>\n <td> {} </td>\n'+ \
|
||||
' <td style="font-size: 24px; color:#D02020"> {} </td>\n'+ \
|
||||
@@ -1273,7 +1273,7 @@ def email_reporting ():
|
||||
mail_section_new_devices = False
|
||||
mail_text_new_devices = ''
|
||||
mail_html_new_devices = ''
|
||||
text_line_template = '{}\t{}\n\t{}\t{}\n\t{}\t{}\n\t{}\t{}\n\t{}\t{}\n\n'
|
||||
text_line_template = '{}\t{}\n\t{}\t{}\n\t{}\t{}\n\t{}\t{}\n\t{}\t{}\n\n'
|
||||
html_line_template = '<tr>\n'+ \
|
||||
' <td> <a href="{}{}"> {} </a> </td>\n <td> {} </td>\n'+\
|
||||
' <td> {} </td>\n <td> {} </td>\n <td> {} </td>\n</tr>\n'
|
||||
@@ -1286,8 +1286,8 @@ def email_reporting ():
|
||||
for eventAlert in sql :
|
||||
mail_section_new_devices = True
|
||||
mail_text_new_devices += text_line_template.format (
|
||||
'Name:', eventAlert['dev_Name'], 'MAC:', eventAlert['eve_MAC'], 'IP:', eventAlert['eve_IP'],
|
||||
'Time:', eventAlert['eve_DateTime'], 'More Info:', eventAlert['eve_AdditionalInfo'])
|
||||
'Name: ', eventAlert['dev_Name'], 'MAC: ', eventAlert['eve_MAC'], 'IP: ', eventAlert['eve_IP'],
|
||||
'Time: ', eventAlert['eve_DateTime'], 'More Info: ', eventAlert['eve_AdditionalInfo'])
|
||||
mail_html_new_devices += html_line_template.format (
|
||||
REPORT_DEVICE_URL, eventAlert['eve_MAC'], eventAlert['eve_MAC'],
|
||||
eventAlert['eve_DateTime'], eventAlert['eve_IP'],
|
||||
@@ -1300,7 +1300,7 @@ def email_reporting ():
|
||||
mail_section_devices_down = False
|
||||
mail_text_devices_down = ''
|
||||
mail_html_devices_down = ''
|
||||
text_line_template = '{}\t{}\n\t{}\t{}\n\t{}\t{}\n\t{}\t{}\n\n'
|
||||
text_line_template = '{}\t{}\n\t{}\t{}\n\t{}\t{}\n\t{}\t{}\n\n'
|
||||
html_line_template = '<tr>\n'+ \
|
||||
' <td> <a href="{}{}"> {} </a> </td>\n <td> {} </td>\n'+ \
|
||||
' <td> {} </td>\n <td> {} </td>\n</tr>\n'
|
||||
@@ -1313,8 +1313,8 @@ def email_reporting ():
|
||||
for eventAlert in sql :
|
||||
mail_section_devices_down = True
|
||||
mail_text_devices_down += text_line_template.format (
|
||||
'Name:', eventAlert['dev_Name'], 'MAC:', eventAlert['eve_MAC'],
|
||||
'Time:', eventAlert['eve_DateTime'],'IP:', eventAlert['eve_IP'])
|
||||
'Name: ', eventAlert['dev_Name'], 'MAC: ', eventAlert['eve_MAC'],
|
||||
'Time: ', eventAlert['eve_DateTime'],'IP: ', eventAlert['eve_IP'])
|
||||
mail_html_devices_down += html_line_template.format (
|
||||
REPORT_DEVICE_URL, eventAlert['eve_MAC'], eventAlert['eve_MAC'],
|
||||
eventAlert['eve_DateTime'], eventAlert['eve_IP'],
|
||||
@@ -1342,9 +1342,9 @@ def email_reporting ():
|
||||
for eventAlert in sql :
|
||||
mail_section_events = True
|
||||
mail_text_events += text_line_template.format (
|
||||
'Name:', eventAlert['dev_Name'],'Event:', eventAlert['eve_EventType'],
|
||||
'MAC:', eventAlert['eve_MAC'], 'IP:', eventAlert['eve_IP'],
|
||||
'Time:', eventAlert['eve_DateTime'],'More Info:', eventAlert['eve_AdditionalInfo'])
|
||||
'Name: ', eventAlert['dev_Name'], 'MAC: ', eventAlert['eve_MAC'],
|
||||
'IP: ', eventAlert['eve_IP'],'Time: ', eventAlert['eve_DateTime'],
|
||||
'Event: ', eventAlert['eve_EventType'],'More Info: ', eventAlert['eve_AdditionalInfo'])
|
||||
mail_html_events += html_line_template.format (
|
||||
REPORT_DEVICE_URL, eventAlert['eve_MAC'], eventAlert['eve_MAC'],
|
||||
eventAlert['eve_DateTime'], eventAlert['eve_IP'],
|
||||
@@ -1372,8 +1372,14 @@ def email_reporting ():
|
||||
send_ntfy (mail_text)
|
||||
else :
|
||||
print (' Skip NTFY...')
|
||||
if REPORT_PUSHSAFER :
|
||||
print (' Sending report by PUSHSAFER...')
|
||||
send_pushsafer (mail_text)
|
||||
else :
|
||||
print (' Skip PUSHSAFER...')
|
||||
else :
|
||||
print (' No changes to report...')
|
||||
|
||||
|
||||
|
||||
# Clean Pending Alert Events
|
||||
@@ -1400,6 +1406,36 @@ def send_ntfy (_Text):
|
||||
"Priority": "urgent",
|
||||
"Tags": "warning"
|
||||
})
|
||||
|
||||
def send_pushsafer (_Text):
|
||||
url = 'https://www.pushsafer.com/api'
|
||||
post_fields = {
|
||||
"t" : 'Pi.Alert Message',
|
||||
"m" : _Text,
|
||||
"s" : 11,
|
||||
"v" : 3,
|
||||
"i" : 148,
|
||||
"c" : '#ef7f7f',
|
||||
"d" : 'a',
|
||||
"u" : REPORT_DASHBOARD_URL,
|
||||
"ut" : 'Open Pi.Alert',
|
||||
"k" : PUSHSAFER_TOKEN,
|
||||
}
|
||||
requests.post(url, data=post_fields)
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def send_ntfy (_Text):
|
||||
requests.post("https://ntfy.sh/{}".format(NTFY_TOPIC),
|
||||
data=_Text,
|
||||
headers={
|
||||
"Title": "Pi.Alert Notification",
|
||||
"Click": REPORT_DASHBOARD_URL,
|
||||
"Priority": "urgent",
|
||||
"Tags": "warning"
|
||||
})
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def format_report_section (pActive, pSection, pTable, pText, pHTML):
|
||||
global mail_text
|
||||
@@ -1470,27 +1506,51 @@ def send_email (pText, pHTML):
|
||||
# Send mail
|
||||
smtp_connection = smtplib.SMTP (SMTP_SERVER, SMTP_PORT)
|
||||
smtp_connection.ehlo()
|
||||
smtp_connection.starttls()
|
||||
smtp_connection.ehlo()
|
||||
smtp_connection.login (SMTP_USER, SMTP_PASS)
|
||||
# smtp_connection.starttls()
|
||||
# smtp_connection.ehlo()
|
||||
# smtp_connection.login (SMTP_USER, SMTP_PASS)
|
||||
if not SafeParseGlobalBool("SMTP_SKIP_TLS"):
|
||||
smtp_connection.starttls()
|
||||
smtp_connection.ehlo()
|
||||
if not SafeParseGlobalBool("SMTP_SKIP_LOGIN"):
|
||||
smtp_connection.login (SMTP_USER, SMTP_PASS)
|
||||
smtp_connection.sendmail (REPORT_FROM, REPORT_TO, msg.as_string())
|
||||
smtp_connection.quit()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def SafeParseGlobalBool(boolVariable):
|
||||
if boolVariable in globals():
|
||||
return eval(boolVariable)
|
||||
return False
|
||||
|
||||
#===============================================================================
|
||||
# DB
|
||||
#===============================================================================
|
||||
def upgradeDB ():
|
||||
def upgradeDB ():
|
||||
|
||||
openDB()
|
||||
|
||||
# check if table exists
|
||||
listOfTables = sql.execute(
|
||||
"""SELECT name FROM sqlite_master WHERE type='table'
|
||||
AND name='Online_History'; """).fetchall()
|
||||
# indicates, if Online_History table is available
|
||||
onlineHistoryAvailable = sql.execute("""
|
||||
SELECT name FROM sqlite_master WHERE type='table'
|
||||
AND name='Online_History';
|
||||
""").fetchall() != []
|
||||
|
||||
# Check if it is incompatible (Check if table has all required columns)
|
||||
isIncompatible = False
|
||||
|
||||
if listOfTables == []:
|
||||
print_log ('Upgrading DB (creating Online_History table)')
|
||||
if onlineHistoryAvailable :
|
||||
isIncompatible = sql.execute ("""
|
||||
SELECT COUNT(*) AS CNTREC FROM pragma_table_info('Online_History') WHERE name='Archived_Devices'
|
||||
""").fetchone()[0] == 0
|
||||
|
||||
# Drop table if available, but incompatible
|
||||
if onlineHistoryAvailable and isIncompatible:
|
||||
print_log ('Table is incompatible, Dropping the Online_History table)')
|
||||
sql.execute("DROP TABLE Online_History;")
|
||||
onlineHistoryAvailable = False
|
||||
|
||||
if onlineHistoryAvailable == False :
|
||||
sql.execute("""
|
||||
CREATE TABLE "Online_History" (
|
||||
"Index" INTEGER,
|
||||
@@ -1503,6 +1563,7 @@ def upgradeDB ():
|
||||
);
|
||||
""")
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def openDB ():
|
||||
|
||||
@@ -4,18 +4,18 @@ Server: <SERVER_NAME>
|
||||
|
||||
<SECTION_INTERNET>
|
||||
Internet
|
||||
---------------------
|
||||
----------------------
|
||||
<TABLE_INTERNET>
|
||||
</SECTION_INTERNET><SECTION_NEW_DEVICES>
|
||||
New Devices
|
||||
---------------------
|
||||
----------------------
|
||||
<TABLE_NEW_DEVICES>
|
||||
</SECTION_NEW_DEVICES><SECTION_DEVICES_DOWN>
|
||||
Devices Down
|
||||
---------------------
|
||||
----------------------
|
||||
<TABLE_DEVICES_DOWN>
|
||||
</SECTION_DEVICES_DOWN><SECTION_EVENTS>
|
||||
Events
|
||||
---------------------
|
||||
----------------------
|
||||
<TABLE_EVENTS>
|
||||
</SECTION_EVENTS>
|
||||
|
||||
@@ -7,38 +7,51 @@
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
PIALERT_PATH = '/home/pi/pialert'
|
||||
DB_PATH = PIALERT_PATH + '/db/pialert.db'
|
||||
LOG_PATH = PIALERT_PATH + '/log'
|
||||
VENDORS_DB = '/usr/share/arp-scan/ieee-oui.txt'
|
||||
PRINT_LOG = False
|
||||
PIALERT_PATH = '/home/pi/pialert'
|
||||
DB_PATH = PIALERT_PATH + '/db/pialert.db'
|
||||
LOG_PATH = PIALERT_PATH + '/log'
|
||||
VENDORS_DB = '/usr/share/arp-scan/ieee-oui.txt'
|
||||
PRINT_LOG = False
|
||||
TIMEZONE = 'Europe/Berlin'
|
||||
PIALERT_WEB_PROTECTION = False
|
||||
PIALERT_WEB_PASSWORD = '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92'
|
||||
|
||||
SMTP_SERVER = 'smtp.gmail.com'
|
||||
SMTP_PORT = 587
|
||||
SMTP_USER = 'user@gmail.com'
|
||||
SMTP_PASS = 'password'
|
||||
# EMAIL settings
|
||||
SMTP_SERVER = 'smtp.gmail.com'
|
||||
SMTP_PORT = 587
|
||||
SMTP_USER = 'user@gmail.com'
|
||||
SMTP_PASS = 'password'
|
||||
SMTP_SKIP_TLS = False
|
||||
SMTP_SKIP_LOGIN = False
|
||||
|
||||
REPORT_MAIL = False
|
||||
REPORT_FROM = 'Pi.Alert <' + SMTP_USER +'>'
|
||||
REPORT_TO = 'user@gmail.com'
|
||||
REPORT_DEVICE_URL = 'http://pi.alert/deviceDetails.php?mac='
|
||||
REPORT_MAIL = False
|
||||
REPORT_FROM = 'Pi.Alert <' + SMTP_USER +'>'
|
||||
REPORT_TO = 'user@gmail.com'
|
||||
REPORT_DEVICE_URL = 'http://pi.alert/deviceDetails.php?mac='
|
||||
REPORT_DASHBOARD_URL = 'http://pi.alert/'
|
||||
|
||||
REPORT_NTFY = False
|
||||
REPORT_DASHBOARD_URL = 'http://pi.alert/'
|
||||
NTFY_TOPIC = 'replace-my-secure-topicname-91h889f28'
|
||||
# NTFY (https://ntfy.sh/) settings
|
||||
REPORT_NTFY = False
|
||||
NTFY_TOPIC = 'replace_my_secure_topicname_91h889f28'
|
||||
REPORT_DASHBOARD_URL = 'http://pi.alert/'
|
||||
|
||||
# QUERY_MYIP_SERVER = 'https://diagnostic.opendns.com/myip'
|
||||
QUERY_MYIP_SERVER = 'http://ipv4.icanhazip.com'
|
||||
DDNS_ACTIVE = False
|
||||
DDNS_DOMAIN = 'your_domain.freeddns.org'
|
||||
DDNS_USER = 'dynu_user'
|
||||
DDNS_PASSWORD = 'A0000000B0000000C0000000D0000000'
|
||||
DDNS_UPDATE_URL = 'https://api.dynu.com/nic/update?'
|
||||
# PUSHSAFER (https://www.pushsafer.com/) settings
|
||||
REPORT_PUSHSAFER = False
|
||||
PUSHSAFER_TOKEN = 'ApiKey'
|
||||
|
||||
PIHOLE_ACTIVE = False
|
||||
PIHOLE_DB = '/etc/pihole/pihole-FTL.db'
|
||||
DHCP_ACTIVE = False
|
||||
DHCP_LEASES = '/etc/pihole/dhcp.leases'
|
||||
# QUERY_MYIP_SERVER = 'https://diagnostic.opendns.com/myip'
|
||||
QUERY_MYIP_SERVER = 'http://ipv4.icanhazip.com'
|
||||
DDNS_ACTIVE = False
|
||||
DDNS_DOMAIN = 'your_domain.freeddns.org'
|
||||
DDNS_USER = 'dynu_user'
|
||||
DDNS_PASSWORD = 'A0000000B0000000C0000000D0000000'
|
||||
DDNS_UPDATE_URL = 'https://api.dynu.com/nic/update?'
|
||||
|
||||
# PIHOLE settings
|
||||
PIHOLE_ACTIVE = False
|
||||
PIHOLE_DB = '/etc/pihole/pihole-FTL.db'
|
||||
DHCP_ACTIVE = False
|
||||
DHCP_LEASES = '/etc/pihole/dhcp.leases'
|
||||
|
||||
# arp-scan options & samples
|
||||
#
|
||||
@@ -51,4 +64,4 @@ DHCP_LEASES = '/etc/pihole/dhcp.leases'
|
||||
# Scan using interface eth0
|
||||
# SCAN_SUBNETS = '--localnet --interface=eth0'
|
||||
|
||||
SCAN_SUBNETS = '--localnet'
|
||||
SCAN_SUBNETS = '--localnet'
|
||||
|
||||
7
config/reset_password.sh
Normal file
7
config/reset_password.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
cp pialert.conf pialert.conf.bak
|
||||
PIA_PASS=$1
|
||||
echo "The password '$1' is hashed"
|
||||
PIA_PASS_HASH=$(echo -n $PIA_PASS | sha256sum | awk '{print $1}')
|
||||
echo "The hashed password is: $PIA_PASS_HASH"
|
||||
sed -i "/PIALERT_WEB_PASSWORD/c\PIALERT_WEB_PASSWORD = '$PIA_PASS_HASH'" pialert.conf
|
||||
echo "The hash was saved in the configuration file"
|
||||
@@ -10,7 +10,7 @@ services:
|
||||
- ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
- ${LOGS_LOCATION}/tmp:/home/pi/pialert/log
|
||||
environment:
|
||||
- TZ=Europe/London
|
||||
- PORT=20211
|
||||
- HOST_USER_ID=1000
|
||||
- HOST_USER_GID=1000
|
||||
- TZ=${TZ}
|
||||
- PORT=${PORT}
|
||||
- HOST_USER_ID=${HOST_USER_ID}
|
||||
- HOST_USER_GID=${HOST_USER_GID}
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
<img src="https://img.shields.io/docker/pulls/jokobsk/pi.alert?logo=docker&color=0aa8d2&logoColor=fff" alt="Docker Pulls">
|
||||
</a>
|
||||
|
||||
# :whale: A docker image for Pi.Alert
|
||||
# 🐳 A docker image for Pi.Alert
|
||||
|
||||
All credit for Pi.Alert goes to: [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert).
|
||||
A pre-built image is available on :whale: Docker Hub: [jokobsk/Pi.Alert](https://registry.hub.docker.com/r/jokobsk/pi.alert).
|
||||
The source :page_facing_up: Dockerfile is available [here](https://github.com/jokob-sk/Pi.Alert/blob/main/Dockerfile) with a detailed :books: [readme](https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md) included.
|
||||
🥇 Pi.Alert credit goes to [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert). <br/>
|
||||
🐳 Docker Image: [jokobsk/Pi.Alert](https://registry.hub.docker.com/r/jokobsk/pi.alert). <br/>
|
||||
📄 [Dockerfile](https://github.com/jokob-sk/Pi.Alert/blob/main/Dockerfile) <br/>
|
||||
📚 [Dockerfile instructions](https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md).
|
||||
|
||||
Big thanks to <a href="https://github.com/Macleykun">@Macleykun</a> for help and tips&tricks for Dockerfile(s):
|
||||
|
||||
@@ -16,20 +17,20 @@ Big thanks to <a href="https://github.com/Macleykun">@Macleykun</a> for help and
|
||||
<img src="https://avatars.githubusercontent.com/u/26381427?size=50">
|
||||
</a>
|
||||
|
||||
## :information_source: Usage
|
||||
## ℹ Usage
|
||||
|
||||
Network
|
||||
- You will have to probably run the container on the host network, e.g: `sudo docker run --rm --net=host jokobsk/pi.alert`
|
||||
- You will have to run the container on the host network, e.g: `sudo docker run --rm --net=host jokobsk/pi.alert`
|
||||
|
||||
Default Port
|
||||
- The app is accessible on the port `:20211`.
|
||||
|
||||
> Please note - the cronjob is executed every 1, 5 and 15 minutes so wait that long for all of the scans to run.
|
||||
> Please note - the cronjob is executed every 3 and 5 minutes so wait that long for all of the scans to run.
|
||||
|
||||
## :floppy_disk: Setup and Backups
|
||||
## 💾 Setup and Backups
|
||||
|
||||
1. (**required**) Download `pialert.conf` and `version.conf` from [here](https://github.com/jokob-sk/Pi.Alert/tree/main/config).
|
||||
2. (**required**) In `pialert.config` specify your network adapter (will probably be `eth0` or `eth1`) and the network filter (which **significantly** speeds up the scan process), e.g. if your DHCP server assigns IPs in the 192.168.1.0 to 192.168.1.255 range specify it the following way:
|
||||
2. (**required**) In `pialert.conf` specify your network adapter (will probably be `eth0` or `eth1`) and the network filter (which **significantly** speeds up the scan process), e.g. if your DHCP server assigns IPs in the 192.168.1.0 to 192.168.1.255 range specify it the following way:
|
||||
* `SCAN_SUBNETS = '192.168.1.0/24 --interface=eth0'`
|
||||
3. (**required**) Use your configuration by:
|
||||
* Mapping the container folder `/home/pi/pialert/config` to a persistent folder containing `pialert.conf` and `version.conf`,
|
||||
@@ -37,14 +38,12 @@ Default Port
|
||||
4. Set the `TZ` environment variable to your current time zone (e.g.`Europe/Paris`). Find your time zone [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
5. Database backup
|
||||
* The DB is stored under `/home/pi/pialert/db/pialert.db`. Map this file to a persistent location (see [Examples](https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#page_facing_up-examples) for details). If facing issues (AJAX errors, can't write to DB, etc, make sure permissions are set correctly, alternatively check the logs under `/home/pi/pialert/log`)
|
||||
* Automated copy
|
||||
The docker image copies the DB once every 30 min to `/home/pi/pialert/config/pialert.db_bak`. If you have a backup already available, make sure you rename this file if you want to keep older backups before starting a new container. To restore the DB run: `cp /home/pi/pialert/config/pialert.db_bak /home/pi/pialert/db/pialert.db`
|
||||
6. The container supports mapping to local User nad Group IDs. Specify the enviroment variables `HOST_USER_ID` and `HOST_USER_GID` if needed.
|
||||
7. You can override the port by specifying the `PORT` env variable.
|
||||
|
||||
Config examples can be found below.
|
||||
|
||||
## :page_facing_up: Examples
|
||||
## 📄 Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
@@ -61,22 +60,25 @@ services:
|
||||
volumes:
|
||||
- ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||
- ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
- ${LOGS_LOCATION}/:/home/pi/pialert/log
|
||||
- ${LOGS_LOCATION}/tmp:/home/pi/pialert/log
|
||||
environment:
|
||||
- TZ=Europe/London
|
||||
- PORT=20211
|
||||
- HOST_USER_ID=1000
|
||||
- HOST_USER_GID=1000
|
||||
- TZ=${TZ}
|
||||
- PORT=${PORT}
|
||||
- HOST_USER_ID=${HOST_USER_ID}
|
||||
- HOST_USER_GID=${HOST_USER_GID}
|
||||
```
|
||||
|
||||
`.env` file
|
||||
|
||||
```yaml
|
||||
|
||||
#GLOBAL
|
||||
APP_DATA_LOCATION=/path/to/docker_appdata
|
||||
APP_CONFIG_LOCATION=/path/to/docker_config
|
||||
LOGS_LOCATION=/path/to/docker_logs
|
||||
|
||||
TZ=Europe/Paris
|
||||
HOST_USER_ID=1000
|
||||
HOST_USER_GID=1000
|
||||
PORT=20211
|
||||
```
|
||||
|
||||
To run the container execute: `sudo docker-compose --env-file /path/to/.env up`
|
||||
@@ -102,7 +104,7 @@ Courtesy of [pbek](https://github.com/pbek). The volume `pialert_db` is used by
|
||||
- ./pialert/version.conf:/home/pi/pialert/config/version.conf
|
||||
```
|
||||
|
||||
## :coffee: Support
|
||||
## ☕ Support
|
||||
|
||||
> Disclaimer: This is my second container and I might have used unconventional hacks so if anyone is more experienced, feel free to fork/create pull requests. Also, please only donate if you don't have any debt yourself. Support yourself first, then others.
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
# if custom variables not set we do not need to do anything
|
||||
if [ -n "${TZ}" ]; then
|
||||
sed -ie "s|Europe/London|${TZ}|g" /home/pi/pialert/install/pialert.cron
|
||||
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/install/pialert.cron
|
||||
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/config/pialert.conf
|
||||
crontab < /home/pi/pialert/install/pialert.cron
|
||||
fi
|
||||
if [ -n "${PORT}" ]; then
|
||||
|
||||
@@ -672,6 +672,19 @@ input[type="password"]::-webkit-caps-lock-indicator {
|
||||
.table-responsive {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.login-page {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.login-logo a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.login-box-body {
|
||||
color: #bec5cb;
|
||||
background-color: #272c30;
|
||||
}
|
||||
/* Add border radius to bottom of the status boxes*/
|
||||
.pa-small-box-footer {
|
||||
border-bottom-left-radius: 10px;
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
header('Location: /pialert/index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require 'php/templates/header.php';
|
||||
?>
|
||||
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
header('Location: /pialert/index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/graph.php';
|
||||
?>
|
||||
@@ -106,7 +114,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="clients">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $pia_lang['Device_Shortcut_OnlineChart_a'];?> <span class="maxlogage-interval">12</span> <?php echo $pia_lang['Device_Shortcut_OnlineChart_b'];?></h3>
|
||||
<h3 class="box-title"><?php echo $pia_lang['Device_Shortcut_OnlineChart'];?> </h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart">
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
header('Location: /pialert/index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require 'php/templates/header.php';
|
||||
?>
|
||||
|
||||
|
||||
160
front/index.php
160
front/index.php
@@ -1,5 +1,159 @@
|
||||
<?php
|
||||
header('Location: /pialert/devices.php', TRUE, 302);
|
||||
// or die();
|
||||
exit();
|
||||
session_start();
|
||||
|
||||
if ($_REQUEST['action'] == 'logout') {
|
||||
session_destroy();
|
||||
header('Location: /pialert/index.php');
|
||||
}
|
||||
// ##################################################
|
||||
// ## Login Processing start
|
||||
// ##################################################
|
||||
$config_file = "../config/pialert.conf";
|
||||
$config_file_lines = file($config_file);
|
||||
|
||||
// ###################################
|
||||
// ## PIALERT_WEB_PROTECTION FALSE
|
||||
// ###################################
|
||||
|
||||
$config_file_lines_bypass = array_values(preg_grep('/^PIALERT_WEB_PROTECTION\s.*/', $config_file_lines));
|
||||
$protection_line = explode("=", $config_file_lines_bypass[0]);
|
||||
$Pia_WebProtection = strtolower(trim($protection_line[1]));
|
||||
|
||||
if ($Pia_WebProtection == 'false')
|
||||
{
|
||||
header('Location: /pialert/devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
exit;
|
||||
}
|
||||
|
||||
// ###################################
|
||||
// ## PIALERT_WEB_PROTECTION TRUE
|
||||
// ###################################
|
||||
|
||||
$config_file_lines = array_values(preg_grep('/^PIALERT_WEB_PASSWORD\s.*/', $config_file_lines));
|
||||
$password_line = explode("'", $config_file_lines[0]);
|
||||
$Pia_Password = $password_line[1];
|
||||
|
||||
if ($Pia_Password == hash('sha256',$_POST["loginpassword"]))
|
||||
{
|
||||
header('Location: /pialert/devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
}
|
||||
|
||||
if ($_SESSION["login"] == 1)
|
||||
{
|
||||
header('Location: /pialert/devices.php');
|
||||
}
|
||||
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
if (file_exists('../db/setting_darkmode')) {$ENABLED_DARKMODE = True;}
|
||||
if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {$login_info = 'Defaultpassword "123456" is still active';
|
||||
}
|
||||
|
||||
// ##################################################
|
||||
// ## Login Processing end
|
||||
// ##################################################
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Pi-Alert | Log in</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<link rel="stylesheet" href="lib/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="lib/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="lib/AdminLTE/bower_components/Ionicons/css/ionicons.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="lib/AdminLTE/dist/css/AdminLTE.min.css">
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="lib/AdminLTE/plugins/iCheck/square/blue.css">
|
||||
|
||||
<!-- Dark-Mode Patch -->
|
||||
<?php
|
||||
if ($ENABLED_DARKMODE === True) {
|
||||
echo '<link rel="stylesheet" href="css/dark-patch.css">';
|
||||
$BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/boxed-bg-dark.png\');"';
|
||||
} else { $BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/background.png\');"';}
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="/front/css/offline-font.css">
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="/pialert/index2.php">Pi.<b>Alert</b></a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Sign in to start your session</p>
|
||||
|
||||
<form action="/pialert/index.php" method="post">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" class="form-control" placeholder="Password" name="loginpassword">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="checkbox icheck">
|
||||
<label>
|
||||
<input type="checkbox" disabled> Remember Me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
|
||||
<div class="box-body" style="margin-top: 50px;">
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i>Password Alert!</h4>
|
||||
<p><?php echo $login_info;?></p>
|
||||
<p>To set a new password run:<br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh yournewpassword</span><br>in the config folder.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
|
||||
<!-- jQuery 3 -->
|
||||
<script src="lib/AdminLTE/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="lib/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<!-- iCheck -->
|
||||
<script src="lib/AdminLTE/plugins/iCheck/icheck.min.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' /* optional */
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
header('Location: /pialert/index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Pi.Alert
|
||||
// Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
@@ -209,9 +217,9 @@ if (submit && isset($_POST['langselector_set'])) {
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_Settings" data-toggle="tab">Settings</a></li>
|
||||
<li><a href="#tab_DBTools" data-toggle="tab">DB Tools</a></li>
|
||||
<li><a href="#tab_BackupRestore" data-toggle="tab">Backup / Restore</a></li>
|
||||
<li class="active"><a href="#tab_Settings" data-toggle="tab"><?php echo $pia_lang['Maintenance_Tools_Tab_Settings'];?></a></li>
|
||||
<li><a href="#tab_DBTools" data-toggle="tab"><?php echo $pia_lang['Maintenance_Tools_Tab_Tools'];?></a></li>
|
||||
<li><a href="#tab_BackupRestore" data-toggle="tab"><?php echo $pia_lang['Maintenance_Tools_Tab_BackupRestore'];?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_Settings">
|
||||
@@ -321,13 +329,13 @@ if (submit && isset($_POST['langselector_set'])) {
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnUpgadeDatabase" style="border-top: solid 3px #dd4b39;" onclick="askUpgradeDatabase()"><?php echo $pia_lang['Maintenance_Tool_upgrade_database_noti'];?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaPurgeDBBackups" onclick="askPiaPurgeDBBackups()"><?php echo $pia_lang['Maintenance_Tool_purgebackup'];?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo $pia_lang['Maintenance_Tool_upgrade_database_text'];?></div>
|
||||
<div class="db_tools_table_cell_b"><?php echo $pia_lang['Maintenance_Tool_purgebackup_text'];?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -433,8 +441,22 @@ function PiaRestoreDBfromArchive()
|
||||
});
|
||||
}
|
||||
|
||||
// Restore DB from Archive
|
||||
function askPiaEnableDarkmode () {
|
||||
// Purge Backups
|
||||
function askPiaPurgeDBBackups() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_purgebackup_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_purgebackup_noti_text'];?>',
|
||||
'Cancel', 'Purge', 'PiaPurgeDBBackups');
|
||||
}
|
||||
function PiaPurgeDBBackups()
|
||||
{
|
||||
// Execute
|
||||
$.get('php/server/devices.php?action=PiaPurgeDBBackups', function(msg) {
|
||||
showMessage (msg);
|
||||
});
|
||||
}
|
||||
|
||||
// Switch Darkmode
|
||||
function askPiaEnableDarkmode() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_darkmode_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_darkmode_noti_text'];?>',
|
||||
'Cancel', 'Switch', 'PiaEnableDarkmode');
|
||||
@@ -461,20 +483,6 @@ function PiaToggleArpScan()
|
||||
});
|
||||
}
|
||||
|
||||
// upgrade DB
|
||||
function askUpgradeDatabase () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_upgrade_database_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_upgrade_database_noti_text'];?>',
|
||||
'Cancel', 'Upgrade', 'upgradeDatabase');
|
||||
}
|
||||
function upgradeDatabase()
|
||||
{
|
||||
// Upgrade DB
|
||||
$.get('php/server/devices.php?action=upgradeDatabase', function(msg) {
|
||||
showMessage (msg);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
|
||||
case 'getDeviceData': getDeviceData(); break;
|
||||
case 'setDeviceData': setDeviceData(); break;
|
||||
case 'deleteDevice': deleteDevice(); break;
|
||||
case 'deleteAllWithEmptyMACs': deleteAllWithEmptyMACs(); break;
|
||||
case 'upgradeDatabase': upgradeDB(); break;
|
||||
case 'deleteAllWithEmptyMACs': deleteAllWithEmptyMACs(); break;
|
||||
case 'createBackupDB': createBackupDB(); break;
|
||||
case 'restoreBackupDB': restoreBackupDB(); break;
|
||||
case 'deleteAllDevices': deleteAllDevices(); break;
|
||||
@@ -46,6 +45,7 @@ if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
|
||||
case 'deleteEvents': deleteEvents(); break;
|
||||
case 'PiaBackupDBtoArchive': PiaBackupDBtoArchive(); break;
|
||||
case 'PiaRestoreDBfromArchive': PiaRestoreDBfromArchive(); break;
|
||||
case 'PiaPurgeDBBackups': PiaPurgeDBBackups(); break;
|
||||
case 'PiaEnableDarkmode': PiaEnableDarkmode(); break;
|
||||
case 'PiaToggleArpScan': PiaToggleArpScan(); break;
|
||||
|
||||
@@ -212,36 +212,6 @@ function deleteAllWithEmptyMACs() {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Upgrade the database to enable new functionality
|
||||
//------------------------------------------------------------------------------
|
||||
function upgradeDB() {
|
||||
global $db;
|
||||
global $pia_lang;
|
||||
|
||||
// sql
|
||||
$sql = '
|
||||
-- Online_History definition
|
||||
|
||||
CREATE TABLE "Online_History" (
|
||||
"Index" INTEGER,
|
||||
"Scan_Date" TEXT,
|
||||
"Online_Devices" INTEGER,
|
||||
"Down_Devices" INTEGER,
|
||||
"All_Devices" INTEGER,
|
||||
PRIMARY KEY("Index" AUTOINCREMENT)
|
||||
);';
|
||||
// execute sql
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result == TRUE) {
|
||||
echo $pia_lang['BackDevices_DBTools_Upgrade'];
|
||||
} else {
|
||||
echo $pia_lang['BackDevices_DBTools_UpgradeError']."\n\n$sql \n\n". $db->lastErrorMsg();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete all devices with empty MAC addresses
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -262,8 +232,6 @@ function deleteUnknownDevices() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete all devices
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -361,6 +329,37 @@ function PiaRestoreDBfromArchive() {
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purge Backups
|
||||
//------------------------------------------------------------------------------
|
||||
function PiaPurgeDBBackups() {
|
||||
global $pia_lang;
|
||||
|
||||
$Pia_Archive_Path = '../../../db';
|
||||
$Pia_Backupfiles = array();
|
||||
$files = array_diff(scandir($Pia_Archive_Path, SCANDIR_SORT_DESCENDING), array('.', '..', 'pialert.db', 'pialertdb-reset.zip'));
|
||||
|
||||
foreach ($files as &$item)
|
||||
{
|
||||
$item = $Pia_Archive_Path.'/'.$item;
|
||||
if (stristr($item, 'setting_') == '') {array_push($Pia_Backupfiles, $item);}
|
||||
}
|
||||
|
||||
if (sizeof($Pia_Backupfiles) > 3)
|
||||
{
|
||||
rsort($Pia_Backupfiles);
|
||||
unset($Pia_Backupfiles[0], $Pia_Backupfiles[1], $Pia_Backupfiles[2]);
|
||||
$Pia_Backupfiles_Purge = array_values($Pia_Backupfiles);
|
||||
for ($i = 0; $i < sizeof($Pia_Backupfiles_Purge); $i++)
|
||||
{
|
||||
unlink($Pia_Backupfiles_Purge[$i]);
|
||||
}
|
||||
}
|
||||
echo $pia_lang['BackDevices_DBTools_Purge'];
|
||||
echo("<meta http-equiv='refresh' content='1'>");
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Toggle Dark/Light Themes
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -217,9 +217,9 @@ function getDeviceSessions() {
|
||||
|
||||
// Disconnection DateTime
|
||||
if ($row['ses_StillConnected'] == true) {
|
||||
$end = '...';
|
||||
$end = '...';
|
||||
} elseif ($row['ses_EventTypeDisconnection'] == '<missing event>') {
|
||||
$end = $row['ses_EventTypeDisconnection'];
|
||||
$end = $row['ses_EventTypeDisconnection'];
|
||||
} else {
|
||||
$end = formatDate ($row['ses_DateTimeDisconnection']);
|
||||
}
|
||||
@@ -267,7 +267,7 @@ function getDevicePresence() {
|
||||
|
||||
// SQL
|
||||
$SQL = 'SELECT ses_EventTypeConnection, ses_DateTimeConnection,
|
||||
ses_EventTypeDisconnection, ses_DateTimeDisconnection, ses_IP, ses_AdditionalInfo,
|
||||
ses_EventTypeDisconnection, ses_DateTimeDisconnection, ses_IP, ses_AdditionalInfo, ses_StillConnected,
|
||||
|
||||
CASE
|
||||
WHEN ses_EventTypeConnection = "<missing event>" THEN
|
||||
@@ -292,10 +292,13 @@ function getDevicePresence() {
|
||||
// Event color
|
||||
if ($row['ses_EventTypeConnection'] == '<missing event>' || $row['ses_EventTypeDisconnection'] == '<missing event>') {
|
||||
$color = '#f39c12';
|
||||
} elseif ($row['ses_StillConnected'] == 1 ) {
|
||||
$color = '#00a659';
|
||||
} else {
|
||||
$color = '#0073b7';
|
||||
}
|
||||
|
||||
|
||||
// tooltip
|
||||
$tooltip = 'Connection: ' . formatEventDate ($row['ses_DateTimeConnection'], $row['ses_EventTypeConnection']) . chr(13) .
|
||||
'Disconnection: ' . formatEventDate ($row['ses_DateTimeDisconnection'], $row['ses_EventTypeDisconnection']) . chr(13) .
|
||||
@@ -331,9 +334,9 @@ function getEventsCalendar() {
|
||||
$startDate = '"'. $_REQUEST ['start'] .'"';
|
||||
$endDate = '"'. $_REQUEST ['end'] .'"';
|
||||
|
||||
// SQL
|
||||
// SQL
|
||||
$SQL = 'SELECT ses_MAC, ses_EventTypeConnection, ses_DateTimeConnection,
|
||||
ses_EventTypeDisconnection, ses_DateTimeDisconnection, ses_IP, ses_AdditionalInfo,
|
||||
ses_EventTypeDisconnection, ses_DateTimeDisconnection, ses_IP, ses_AdditionalInfo, ses_StillConnected,
|
||||
|
||||
CASE
|
||||
WHEN ses_EventTypeConnection = "<missing event>" THEN
|
||||
@@ -357,6 +360,8 @@ function getEventsCalendar() {
|
||||
// Event color
|
||||
if ($row['ses_EventTypeConnection'] == '<missing event>' || $row['ses_EventTypeDisconnection'] == '<missing event>') {
|
||||
$color = '#f39c12';
|
||||
} elseif ($row['ses_StillConnected'] == 1 ) {
|
||||
$color = '#00a659';
|
||||
} else {
|
||||
$color = '#0073b7';
|
||||
}
|
||||
|
||||
@@ -8,7 +8,23 @@
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<?php
|
||||
// ###################################
|
||||
// ## TimeZone processing start
|
||||
// ###################################
|
||||
$config_file = "../config/pialert.conf";
|
||||
$config_file_lines = file($config_file);
|
||||
$config_file_lines_timezone = array_values(preg_grep('/^TIMEZONE\s.*/', $config_file_lines));
|
||||
$timezone_line = explode("'", $config_file_lines_timezone[0]);
|
||||
$Pia_TimeZone = $timezone_line[1];
|
||||
date_default_timezone_set($Pia_TimeZone);
|
||||
// ###################################
|
||||
// ## TimeZone processing end
|
||||
// ###################################
|
||||
|
||||
|
||||
// ###################################
|
||||
// ## GUI settings processing start
|
||||
// ###################################
|
||||
if (file_exists('../db/setting_darkmode')) {
|
||||
$ENABLED_DARKMODE = True;
|
||||
}
|
||||
@@ -22,7 +38,9 @@ foreach (glob("../db/setting_language*") as $filename) {
|
||||
}
|
||||
if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
|
||||
require 'php/templates/language/'.$pia_lang_selected.'.php';
|
||||
|
||||
// ###################################
|
||||
// ## GUI settings processing end
|
||||
// ###################################
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -84,12 +102,7 @@ if ($ENABLED_DARKMODE === True) {
|
||||
|
||||
<!-- Servertime to the right of the hostname -->
|
||||
<script>
|
||||
<?php
|
||||
$conf_file = '../config/version.conf';
|
||||
$conf_data = parse_ini_file($conf_file);
|
||||
# set timezone for server time in header
|
||||
date_default_timezone_set($conf_data['TZ']);
|
||||
?>
|
||||
|
||||
var pia_servertime = new Date(<?php echo date("Y, n, j, G, i, s") ?>);
|
||||
|
||||
function show_pia_servertime() {
|
||||
@@ -152,9 +165,9 @@ function show_pia_servertime() {
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- The user image in the menu -->
|
||||
<li class="user-header">
|
||||
<img src="img/pialertLogoWhite.png" class="img-circle" alt="Pi.Alert Logo" style="border-color:transparent">
|
||||
<p>
|
||||
<li class="user-header" style=" height: 100px;">
|
||||
<img src="img/pialertLogoWhite.png" class="img-circle" alt="Pi.Alert Logo" style="border-color:transparent; height: 50px; width: 50px; margin-top:15px;">
|
||||
<p style="float: right; width: 200px">
|
||||
Open Source Network Guard
|
||||
<small>Designed for Raspberry Pi</small>
|
||||
</p>
|
||||
@@ -162,27 +175,11 @@ function show_pia_servertime() {
|
||||
|
||||
<!-- Menu Body -->
|
||||
|
||||
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-center">
|
||||
<a target="_blank" href="https://github.com/pucherot/Pi.Alert">GitHub Pi.Alert</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="mailto:pi.alert.application@gmail.com">email Support</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a target="_blank" href="https://github.com/pucherot/Pi.Alert/blob/main/LICENSE.txt">GNU GPLv3</a>
|
||||
</div>
|
||||
<!--
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Updates</a>
|
||||
</div>
|
||||
-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-right">
|
||||
<a href="/pialert/index.php?action=logout" class="btn btn-danger">Sign out</a>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -15,8 +15,7 @@ $pia_lang['Device_Shortcut_NewDevices'] = 'Neue Geräte';
|
||||
$pia_lang['Device_Shortcut_DownAlerts'] = 'Down Meldungen';
|
||||
$pia_lang['Device_Shortcut_Archived'] = 'Archiviert';
|
||||
$pia_lang['Device_Shortcut_Devices'] = 'Geräte';
|
||||
$pia_lang['Device_Shortcut_OnlineChart_a'] = 'Netzwerkaktivität über die letzten';
|
||||
$pia_lang['Device_Shortcut_OnlineChart_b'] = 'Stunden';
|
||||
$pia_lang['Device_Shortcut_OnlineChart'] = 'Gerätepräsenz im Laufe der Zeit';
|
||||
$pia_lang['Device_TableHead_Name'] = 'Name';
|
||||
$pia_lang['Device_TableHead_Owner'] = 'Eigentümer';
|
||||
$pia_lang['Device_TableHead_Type'] = 'Typ';
|
||||
@@ -179,6 +178,9 @@ $pia_lang['Maintenance_lang_de_de'] = 'Deutsch (DE)';
|
||||
$pia_lang['Maintenance_lang_es_es'] = 'Spanisch (ES)';
|
||||
$pia_lang['Maintenance_lang_selector_text'] = 'Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.';
|
||||
$pia_lang['Maintenance_lang_selector_apply'] = 'Übernehmen';
|
||||
$pia_lang['Maintenance_Tools_Tab_Settings'] = 'Einstellungen';
|
||||
$pia_lang['Maintenance_Tools_Tab_Tools'] = 'Werkzeuge';
|
||||
$pia_lang['Maintenance_Tools_Tab_BackupRestore'] = 'Sicherg. / Wiederherstellg.';
|
||||
$pia_lang['Maintenance_Tool_darkmode'] = 'Darstellungswechsel (Dunkel/Hell)';
|
||||
$pia_lang['Maintenance_Tool_darkmode_text'] = 'Wechselt zwischen der hellen und der dunklen Darstellung. Wenn der Wechsel nicht richtig funktionieren sollte, versuchen Sie den Browsercache zu löschen. Die Änderung findet serverseitig statt, betrifft also alle verwendeten Geräte.';
|
||||
$pia_lang['Maintenance_Tool_darkmode_noti'] = 'Darstellungswechsel';
|
||||
@@ -214,6 +216,10 @@ $pia_lang['Maintenance_Tool_restore'] = 'DB Wiederherstellung';
|
||||
$pia_lang['Maintenance_Tool_restore_text'] = 'Das neuste Backup kann über diese Funk­tion wiederhergestellt werden. Ältere Sicher­ungen müssen manuell wieder­hergestellt wer­den. Es empfiehlt sich eine Integritäts­prüfung nach der Wieder­her­stellung zu machen, falls die Datenbank bei der Sicherung geöffnet war.';
|
||||
$pia_lang['Maintenance_Tool_restore_noti'] = 'DB Wiederherstellung';
|
||||
$pia_lang['Maintenance_Tool_restore_noti_text'] = 'Sind Sie sicher, dass Sie die Datenbank aus der neusten Sicherung wiederherstellen möchten? Prüfen Sie, dass gerade keine Scans stattfinden.';
|
||||
$pia_lang['Maintenance_Tool_purgebackup'] = 'Sicherungen aufräumen';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_text'] = 'Es werden, bis auf die letzten 3 Backups, alle übrigen Backups gelöscht.';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_noti'] = 'Sicherungen aufräumen';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_noti_text'] = 'Sind Sie sicher, alle Backups, bis auf die letzten 3 löschen möchten?';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
@@ -239,5 +245,6 @@ $pia_lang['BackDevices_DBTools_UpdDev'] = 'Gerät erfolgreich aktualisiert';
|
||||
$pia_lang['BackDevices_DBTools_UpdDevError'] = 'Fehler beim Aktualisieren des Gerätes';
|
||||
$pia_lang['BackDevices_DBTools_Upgrade'] = 'Datenbank erfolgreich aktualisiert';
|
||||
$pia_lang['BackDevices_DBTools_UpgradeError'] = 'Fehler beim Aktualisieren der Datenbank';
|
||||
$pia_lang['BackDevices_DBTools_Purge'] = 'Die ältesten Backups wurden gelöscht';
|
||||
?>
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ $pia_lang['Device_Shortcut_NewDevices'] = 'New Devices';
|
||||
$pia_lang['Device_Shortcut_DownAlerts'] = 'Down Alerts';
|
||||
$pia_lang['Device_Shortcut_Archived'] = 'Archived';
|
||||
$pia_lang['Device_Shortcut_Devices'] = 'Devices';
|
||||
$pia_lang['Device_Shortcut_OnlineChart_a'] = 'Network activity over last';
|
||||
$pia_lang['Device_Shortcut_OnlineChart_b'] = 'hours';
|
||||
$pia_lang['Device_Shortcut_OnlineChart'] = 'Device presence over time';
|
||||
$pia_lang['Device_TableHead_Name'] = 'Name';
|
||||
$pia_lang['Device_TableHead_Owner'] = 'Owner';
|
||||
$pia_lang['Device_TableHead_Type'] = 'Type';
|
||||
@@ -179,6 +178,9 @@ $pia_lang['Maintenance_lang_de_de'] = 'German (DE)';
|
||||
$pia_lang['Maintenance_lang_es_es'] = 'Spanish (ES)';
|
||||
$pia_lang['Maintenance_lang_selector_text'] = 'The change takes place on the server side, so it affects all devices in use.';
|
||||
$pia_lang['Maintenance_lang_selector_apply'] = 'Apply';
|
||||
$pia_lang['Maintenance_Tools_Tab_Settings'] = 'Settings';
|
||||
$pia_lang['Maintenance_Tools_Tab_Tools'] = 'Tools';
|
||||
$pia_lang['Maintenance_Tools_Tab_BackupRestore'] = 'Backup / Restore';
|
||||
$pia_lang['Maintenance_Tool_darkmode'] = 'Toggle Modes (Dark/Light)';
|
||||
$pia_lang['Maintenance_Tool_darkmode_text'] = 'Toggle between dark mode and light mode. If the switch does not work properly, try to clear the browser cache. The change takes place on the server side, so it affects all devices in use.';
|
||||
$pia_lang['Maintenance_Tool_darkmode_noti'] = 'Toggle Modes';
|
||||
@@ -214,6 +216,10 @@ $pia_lang['Maintenance_Tool_restore'] = 'DB Restore';
|
||||
$pia_lang['Maintenance_Tool_restore_text'] = 'The latest backup can be restored via the button, but older backups can only be restored manually. After the restore, make an integrity check on the database for safety, in case the db was currently in write access when the backup was created.';
|
||||
$pia_lang['Maintenance_Tool_restore_noti'] = 'DB Restore';
|
||||
$pia_lang['Maintenance_Tool_restore_noti_text'] = 'Are you sure you want to exectute the the DB Restore? Be sure that no scan is currently running.';
|
||||
$pia_lang['Maintenance_Tool_purgebackup'] = 'Purge Backups';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_text'] = 'All other backups will be deleted except for the last 3 backups.';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_noti'] = 'Purge Backups';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_noti_text'] = 'Are you sure you want to delete all backups except the last 3?';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
@@ -239,5 +245,6 @@ $pia_lang['BackDevices_DBTools_UpdDev'] = 'Device updated successfully';
|
||||
$pia_lang['BackDevices_DBTools_UpdDevError'] = 'Error updating device';
|
||||
$pia_lang['BackDevices_DBTools_Upgrade'] = 'Database upgraded successfully';
|
||||
$pia_lang['BackDevices_DBTools_UpgradeError'] = 'Database upgrade failed';
|
||||
$pia_lang['BackDevices_DBTools_Purge'] = 'The oldest backups were deleted';
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
<?php
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Page - by @TeroRERO 20jul2022
|
||||
// Device Page - by @TeroRERO 23jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Navigation_Devices'] = 'Dispositivos';
|
||||
$pia_lang['Navigation_Presence'] = 'Presencia';
|
||||
$pia_lang['Navigation_Presence'] = 'Historial';
|
||||
$pia_lang['Navigation_Events'] = 'Eventos';
|
||||
$pia_lang['Navigation_Maintenance'] = 'Mantenimiento';
|
||||
$pia_lang['Device_Title'] = 'Dispositivos';
|
||||
$pia_lang['Device_Shortcut_AllDevices'] = 'Todos los dispositivos';
|
||||
$pia_lang['Device_Shortcut_Connected'] = 'Conectada';
|
||||
$pia_lang['Device_Shortcut_Favorites'] = 'Favoritos';
|
||||
$pia_lang['Device_Shortcut_NewDevices'] = 'Nuevos dispositivos';
|
||||
$pia_lang['Device_Shortcut_DownAlerts'] = 'Alertas de caídas';
|
||||
$pia_lang['Device_Shortcut_Archived'] = 'Archivada';
|
||||
$pia_lang['Device_Shortcut_AllDevices'] = 'Todos';
|
||||
$pia_lang['Device_Shortcut_Connected'] = 'Conectado(s)';
|
||||
$pia_lang['Device_Shortcut_Favorites'] = 'Favorito(s)';
|
||||
$pia_lang['Device_Shortcut_NewDevices'] = 'Nuevo(s)';
|
||||
$pia_lang['Device_Shortcut_DownAlerts'] = 'Alerta(s) de caída(s)';
|
||||
$pia_lang['Device_Shortcut_Archived'] = 'Archivado(s)';
|
||||
$pia_lang['Device_Shortcut_Devices'] = 'Dispositivos';
|
||||
$pia_lang['Device_Shortcut_OnlineChart_a'] = 'Actividad de la red durante el último';
|
||||
$pia_lang['Device_Shortcut_OnlineChart_b'] = 'horas';
|
||||
$pia_lang['Device_Shortcut_OnlineChart'] = 'Presencia del dispositivo a lo largo del tiempo';
|
||||
$pia_lang['Device_TableHead_Name'] = 'Nombre';
|
||||
$pia_lang['Device_TableHead_Owner'] = 'Propietario';
|
||||
$pia_lang['Device_TableHead_Type'] = 'Tipo';
|
||||
$pia_lang['Device_TableHead_Favorite'] = 'Favorito';
|
||||
$pia_lang['Device_TableHead_Group'] = 'Grupo';
|
||||
$pia_lang['Device_TableHead_FirstSession'] = 'Primera sesión';
|
||||
$pia_lang['Device_TableHead_FirstSession'] = '1ra. sesión';
|
||||
$pia_lang['Device_TableHead_LastSession'] = 'Última sesión';
|
||||
$pia_lang['Device_TableHead_LastIP'] = 'Última IP';
|
||||
$pia_lang['Device_TableHead_MAC'] = 'MAC';
|
||||
@@ -32,21 +31,21 @@ $pia_lang['Device_TableHead_Status'] = 'Estado';
|
||||
$pia_lang['Device_Searchbox'] = 'Búsqueda';
|
||||
$pia_lang['Device_Tablelenght'] = 'Mostrar _MENU_ entradas';
|
||||
$pia_lang['Device_Tablelenght_all'] = 'Todos';
|
||||
$pia_lang['Device_Table_info'] = 'Mostrando el _INICIO_ hasta el _FINAL_ de las entradas del _TOTAL';
|
||||
$pia_lang['Device_Table_info'] = 'Mostrando el INICIO y el FINAL de TODAS las entradas';
|
||||
$pia_lang['Device_Table_nav_next'] = 'Siguiente';
|
||||
$pia_lang['Device_Table_nav_prev'] = 'Anterior';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Presence Page - by @TeroRERO 20jul2022
|
||||
// Presence Page - by @TeroRERO 23jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Presence_Title'] = 'Presencia por dispositivo';
|
||||
$pia_lang['Presence_Shortcut_AllDevices'] = 'Todos los dispositivos';
|
||||
$pia_lang['Presence_Shortcut_Connected'] = 'Conectada';
|
||||
$pia_lang['Presence_Shortcut_Favorites'] = 'Favoritos';
|
||||
$pia_lang['Presence_Shortcut_NewDevices'] = 'Nuevos dispositivos';
|
||||
$pia_lang['Presence_Shortcut_DownAlerts'] = 'Alertas de caídas';
|
||||
$pia_lang['Presence_Shortcut_Archived'] = 'Archivada';
|
||||
$pia_lang['Presence_Title'] = 'Historial por dispositivo';
|
||||
$pia_lang['Presence_Shortcut_AllDevices'] = 'Todos';
|
||||
$pia_lang['Presence_Shortcut_Connected'] = 'Conectado(s)';
|
||||
$pia_lang['Presence_Shortcut_Favorites'] = 'Favorito(s)';
|
||||
$pia_lang['Presence_Shortcut_NewDevices'] = 'Nuevo(s)';
|
||||
$pia_lang['Presence_Shortcut_DownAlerts'] = 'Alerta(s) de caída(s)';
|
||||
$pia_lang['Presence_Shortcut_Archived'] = 'Archivado(s)';
|
||||
$pia_lang['Presence_Shortcut_Devices'] = 'Dispositivos';
|
||||
|
||||
// Localizationfiles under pialert/front/lib/AdminLTE/bower_components/fullcalendar/dist/locale
|
||||
@@ -58,7 +57,7 @@ $pia_lang['Presence_CalHead_month'] = 'mes';
|
||||
$pia_lang['Presence_CalHead_week'] = 'semana';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Events Page - by @TeroRERO 20jul2022
|
||||
// Events Page - by @TeroRERO 23jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Events_Title'] = 'Eventos';
|
||||
@@ -71,8 +70,8 @@ $pia_lang['Events_Shortcut_AllEvents'] = 'Todos los eventos';
|
||||
$pia_lang['Events_Shortcut_Sessions'] = 'Sesiones';
|
||||
$pia_lang['Events_Shortcut_MissSessions'] = 'Sesiones faltantes';
|
||||
$pia_lang['Events_Shortcut_VoidSessions'] = 'Sesiones anuladas';
|
||||
$pia_lang['Events_Shortcut_NewDevices'] = 'Nuevos dispositivos';
|
||||
$pia_lang['Events_Shortcut_DownAlerts'] = 'Alertas de caídas';
|
||||
$pia_lang['Events_Shortcut_NewDevices'] = 'Nuevo(s)';
|
||||
$pia_lang['Events_Shortcut_DownAlerts'] = 'Alerta(s) de caída(s)';
|
||||
$pia_lang['Events_Shortcut_Events'] = 'Eventos';
|
||||
$pia_lang['Events_TableHead_Order'] = 'Ordenar';
|
||||
$pia_lang['Events_TableHead_Device'] = 'Dispositivo';
|
||||
@@ -83,18 +82,18 @@ $pia_lang['Events_TableHead_Connection'] = 'Conexión';
|
||||
$pia_lang['Events_TableHead_Disconnection'] = 'Desconexión';
|
||||
$pia_lang['Events_TableHead_Duration'] = 'Duración';
|
||||
$pia_lang['Events_TableHead_DurationOrder'] = 'Orden de duración';
|
||||
$pia_lang['Events_TableHead_IP'] = 'IP';
|
||||
$pia_lang['Events_TableHead_IP'] = 'Dirección IP';
|
||||
$pia_lang['Events_TableHead_IPOrder'] = 'Orden de IP';
|
||||
$pia_lang['Events_TableHead_AdditionalInfo'] = 'Información adicional';
|
||||
$pia_lang['Events_Searchbox'] = 'Búsqueda';
|
||||
$pia_lang['Events_Tablelenght'] = 'Montras entradas del _MENU';
|
||||
$pia_lang['Events_Tablelenght'] = 'Mostrando entradas del MENÚ';
|
||||
$pia_lang['Events_Tablelenght_all'] = 'Todos';
|
||||
$pia_lang['Events_Table_info'] = 'Mostrando el _INICIO_ hasta el _FIN_ del _TOTAL';
|
||||
$pia_lang['Events_Table_info'] = 'Mostrando el INICIO y el FINAL de TODAS las entradas';
|
||||
$pia_lang['Events_Table_nav_next'] = 'Siguiente';
|
||||
$pia_lang['Events_Table_nav_prev'] = 'Anterior';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Details Page - by @TeroRERO 20jul2022
|
||||
// Device Details Page - by @TeroRERO 23jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['DevDetail_Periodselect_today'] = 'Hoy';
|
||||
@@ -104,12 +103,12 @@ $pia_lang['DevDetail_Periodselect_LastYear'] = 'El año pasado';
|
||||
$pia_lang['DevDetail_Periodselect_All'] = 'Toda la información';
|
||||
$pia_lang['DevDetail_Shortcut_CurrentStatus'] = 'Estado actual';
|
||||
$pia_lang['DevDetail_Shortcut_Sessions'] = 'Sesiones';
|
||||
$pia_lang['DevDetail_Shortcut_Presence'] = 'Presencia';
|
||||
$pia_lang['DevDetail_Shortcut_DownAlerts'] = 'Alertas de caídas';
|
||||
$pia_lang['DevDetail_Shortcut_Presence'] = 'Historial';
|
||||
$pia_lang['DevDetail_Shortcut_DownAlerts'] = 'Alerta(s) de caída(s)';
|
||||
$pia_lang['DevDetail_Tab_Details'] = 'Detalles';
|
||||
$pia_lang['DevDetail_Tab_Nmap'] = 'Nmap';
|
||||
$pia_lang['DevDetail_Tab_Sessions'] = 'Sesiones';
|
||||
$pia_lang['DevDetail_Tab_Presence'] = 'Presencia';
|
||||
$pia_lang['DevDetail_Tab_Presence'] = 'Historial';
|
||||
$pia_lang['DevDetail_Tab_Events'] = 'Eventos';
|
||||
$pia_lang['DevDetail_MainInfo_Title'] = 'Información principal';
|
||||
$pia_lang['DevDetail_MainInfo_mac'] = 'MAC';
|
||||
@@ -123,7 +122,7 @@ $pia_lang['DevDetail_MainInfo_Location'] = 'Ubicación';
|
||||
$pia_lang['DevDetail_MainInfo_Comments'] = 'Comentario';
|
||||
$pia_lang['DevDetail_SessionInfo_Title'] = 'Información de sesión';
|
||||
$pia_lang['DevDetail_SessionInfo_Status'] = 'Estado';
|
||||
$pia_lang['DevDetail_SessionInfo_FirstSession'] = 'Primera sesión';
|
||||
$pia_lang['DevDetail_SessionInfo_FirstSession'] = '1ra. sesión';
|
||||
$pia_lang['DevDetail_SessionInfo_LastSession'] = 'Última sesión';
|
||||
$pia_lang['DevDetail_SessionInfo_LastIP'] = 'Última IP';
|
||||
$pia_lang['DevDetail_SessionInfo_StaticIP'] = 'IP estática';
|
||||
@@ -135,8 +134,8 @@ $pia_lang['DevDetail_EveandAl_Skip'] = 'Omitir notificaciones repetidas durante'
|
||||
$pia_lang['DevDetail_EveandAl_NewDevice'] = 'Nuevo dispositivo';
|
||||
$pia_lang['DevDetail_EveandAl_Archived'] = 'Archivada';
|
||||
$pia_lang['DevDetail_EveandAl_RandomMAC'] = 'MAC al azar';
|
||||
$pia_lang['DevDetail_EveandAl_ScanCycle_a'] = 'Scan Device (1 min)';
|
||||
$pia_lang['DevDetail_EveandAl_ScanCycle_z'] = 'Don't Scan Device (0 min)';
|
||||
$pia_lang['DevDetail_EveandAl_ScanCycle_a'] = 'Escanear Dispositivo (1 min)';
|
||||
$pia_lang['DevDetail_EveandAl_ScanCycle_z'] = 'No Escanear Dispositivo (0 min)';
|
||||
$pia_lang['DevDetail_button_Delete'] = 'Eliminar dispositivo';
|
||||
$pia_lang['DevDetail_button_Reset'] = 'Restablecer cambios';
|
||||
$pia_lang['DevDetail_button_Save'] = 'Guardar';
|
||||
@@ -144,7 +143,7 @@ $pia_lang['DevDetail_SessionTable_Order'] = 'Ordenar';
|
||||
$pia_lang['DevDetail_SessionTable_Connection'] = 'Conexión';
|
||||
$pia_lang['DevDetail_SessionTable_Disconnection'] = 'Desconexión';
|
||||
$pia_lang['DevDetail_SessionTable_Duration'] = 'Duración';
|
||||
$pia_lang['DevDetail_SessionTable_IP'] = 'IP';
|
||||
$pia_lang['DevDetail_SessionTable_IP'] = 'Dirección IP';
|
||||
$pia_lang['DevDetail_SessionTable_Additionalinfo'] = 'Información adicional';
|
||||
$pia_lang['DevDetail_Events_CheckBox'] = 'Ocultar eventos de conexión';
|
||||
$pia_lang['DevDetail_Nmap_buttonFast'] = 'Exploración rápida';
|
||||
@@ -155,37 +154,40 @@ $pia_lang['DevDetail_Nmap_buttonDefault_text'] = 'Escaneo predeterminado: NMAP e
|
||||
$pia_lang['DevDetail_Nmap_buttonDetail_text'] = 'Escaneo detallado: escaneo predeterminado con detección de sistema operativo habilitado, detección de versiones, escaneo de script y traceroute (hasta 30 segundos o más)';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page - by @TeroRERO 20jul2022
|
||||
// Maintenance Page - by @TeroRERO 23jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Maintenance_Title'] = 'Herramientas de mantenimiento';
|
||||
$pia_lang['Maintenance_database_path'] = 'Ruta de la base de datos';
|
||||
$pia_lang['Maintenance_database_size'] = 'Tamaño de base de datos';
|
||||
$pia_lang['Maintenance_database_lastmod'] = 'última modificación';
|
||||
$pia_lang['Maintenance_database_backup'] = 'DB Respaldos';
|
||||
$pia_lang['Maintenance_database_backup_found'] = 'copias de seguridad donde se encuentran';
|
||||
$pia_lang['Maintenance_database_path'] = 'Ruta de la base de datos:';
|
||||
$pia_lang['Maintenance_database_size'] = 'Tamaño de base de datos:';
|
||||
$pia_lang['Maintenance_database_lastmod'] = 'Última modificación:';
|
||||
$pia_lang['Maintenance_database_backup'] = 'Copias de seguridad de la BD:';
|
||||
$pia_lang['Maintenance_database_backup_found'] = 'copia(s) de seguridad encontrada(s)';
|
||||
$pia_lang['Maintenance_database_backup_total'] = 'Uso total de disco';
|
||||
$pia_lang['Maintenance_arp_status'] = 'Estado de escaneo';
|
||||
$pia_lang['Maintenance_arp_status'] = 'Estado de escaneo:';
|
||||
$pia_lang['Maintenance_arp_status_off'] = 'está actualmente deshabilitado';
|
||||
$pia_lang['Maintenance_arp_status_on'] = 'escaneo(s) actualmente en ejecución';
|
||||
$pia_lang['Maintenance_themeselector_lable'] = 'Seleccionar Skin';
|
||||
$pia_lang['Maintenance_themeselector_empty'] = 'Elige un Skin';
|
||||
$pia_lang['Maintenance_themeselector_empty'] = 'Elija un Skin';
|
||||
$pia_lang['Maintenance_themeselector_text'] = 'El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.';
|
||||
$pia_lang['Maintenance_themeselector_apply'] = 'Apply';
|
||||
$pia_lang['Maintenance_lang_selector_lable'] = 'Seleccione el idioma';
|
||||
$pia_lang['Maintenance_lang_selector_empty'] = 'Elija el idioma';
|
||||
$pia_lang['Maintenance_themeselector_apply'] = 'Aplicar';
|
||||
$pia_lang['Maintenance_lang_selector_lable'] = 'Seleccione su idioma';
|
||||
$pia_lang['Maintenance_lang_selector_empty'] = 'Elija un idioma';
|
||||
$pia_lang['Maintenance_lang_en_us'] = 'English (US)';
|
||||
$pia_lang['Maintenance_lang_de_de'] = 'German (DE)';
|
||||
$pia_lang['Maintenance_lang_es_es'] = 'Spanish (ES)';
|
||||
$pia_lang['Maintenance_lang_selector_text'] = 'El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.';
|
||||
$pia_lang['Maintenance_lang_selector_apply'] = 'Apply';
|
||||
$pia_lang['Maintenance_lang_selector_apply'] = 'Aplicar';
|
||||
$pia_lang['Maintenance_Tools_Tab_Settings'] = 'Ajustes';
|
||||
$pia_lang['Maintenance_Tools_Tab_Tools'] = 'Tools';
|
||||
$pia_lang['Maintenance_Tools_Tab_BackupRestore'] = 'Respaldo / Restaurar';
|
||||
$pia_lang['Maintenance_Tool_darkmode'] = 'Cambiar Modo (Dark/Light)';
|
||||
$pia_lang['Maintenance_Tool_darkmode_text'] = 'Alternar entre el modo oscuro y el modo de luz. Si el interruptor no funciona correctamente, intente borrar el caché del navegador. El cambio tiene lugar en el lado del servidor, por lo que afecta todos los dispositivos en uso.';
|
||||
$pia_lang['Maintenance_Tool_darkmode_noti'] = 'Cambiar Modo';
|
||||
$pia_lang['Maintenance_Tool_darkmode_noti_text'] = 'Después del cambio de tema, la página intenta volver a cargar para activar el cambio. Si es necesario, el caché debe ser eliminado.';
|
||||
$pia_lang['Maintenance_Tool_arpscansw'] = 'Alternar arp-scan (on/off)';
|
||||
$pia_lang['Maintenance_Tool_arpscansw'] = 'Activar arp-scan (on/off)';
|
||||
$pia_lang['Maintenance_Tool_arpscansw_text'] = 'Encender o desactivar el arp-scan. Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente. Los escaneos activos no se cancelan.';
|
||||
$pia_lang['Maintenance_Tool_arpscansw_noti'] = 'Alternar arp-scan on or off';
|
||||
$pia_lang['Maintenance_Tool_arpscansw_noti'] = 'Activar arp-scan on or off';
|
||||
$pia_lang['Maintenance_Tool_arpscansw_noti_text'] = 'Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente.';
|
||||
$pia_lang['Maintenance_Tool_del_empty_macs'] = 'Eliminar dispositivos con MACs vacíos';
|
||||
$pia_lang['Maintenance_Tool_del_empty_macs_text'] = 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos sin Mac se eliminarán de la base de datos.';
|
||||
@@ -202,29 +204,33 @@ $pia_lang['Maintenance_Tool_del_unknowndev'] = 'Eliminar dispositivos (desconoci
|
||||
$pia_lang['Maintenance_Tool_del_unknowndev_text'] = 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Todos los dispositivos nombrados (desconocidos) se eliminarán de la base de datos.';
|
||||
$pia_lang['Maintenance_Tool_del_unknowndev_noti'] = 'Eliminar dispositivos (desconocidos)';
|
||||
$pia_lang['Maintenance_Tool_del_unknowndev_noti_text'] = '¿Estás seguro de que quieres eliminar todos los dispositivos (desconocidos)?';
|
||||
$pia_lang['Maintenance_Tool_del_allevents'] = 'Eliminar todos los eventos (Restablecer presencia)';
|
||||
$pia_lang['Maintenance_Tool_del_allevents'] = 'Eliminar todo (Restablecer historial)';
|
||||
$pia_lang['Maintenance_Tool_del_allevents_text'] = 'Antes de usar esta función, haga una copia de seguridad. La eliminación no se puede deshacer. Se eliminarán todos los eventos en la base de datos. En ese momento se restablecerá la presencia de todos los dispositivos. Esto puede conducir a sesiones no válidas. Esto significa que los dispositivos se muestran como "presentes", aunque están fuera de línea. Un escaneo mientras el dispositivo en cuestión está en línea resuelve el problema.';
|
||||
$pia_lang['Maintenance_Tool_del_allevents_noti'] = 'Eliminar eventos';
|
||||
$pia_lang['Maintenance_Tool_del_allevents_noti_text'] = '¿Estás seguro de que quieres eliminar todos los eventos? Esto restablece la presencia de todos los dispositivos.';
|
||||
$pia_lang['Maintenance_Tool_backup'] = 'DB Respaldo';
|
||||
$pia_lang['Maintenance_Tool_backup'] = 'Respaldar DB';
|
||||
$pia_lang['Maintenance_Tool_backup_text'] = 'Las copias de seguridad de la base de datos se encuentran en el directorio de la base de datos como una Zip-Archive, nombrada con la fecha de creación. No hay un número máximo de copias de seguridad.';
|
||||
$pia_lang['Maintenance_Tool_backup_noti'] = 'DB Respaldo';
|
||||
$pia_lang['Maintenance_Tool_backup_noti'] = 'Respaldar DB';
|
||||
$pia_lang['Maintenance_Tool_backup_noti_text'] = '¿Estás seguro de que quieres exactos la copia de seguridad de DB? Asegúrese de que ningún escaneo se esté ejecutando actualmente.';
|
||||
$pia_lang['Maintenance_Tool_restore'] = 'DB Restaurar';
|
||||
$pia_lang['Maintenance_Tool_restore'] = 'Restaurar DB';
|
||||
$pia_lang['Maintenance_Tool_restore_text'] = 'La última copia de seguridad se puede restaurar a través del botón, pero las copias de seguridad anteriores solo se pueden restaurar manualmente. Después de la restauración, realice una verificación de integridad en la base de datos por seguridad, en caso de que el DB estuviera actualmente en acceso de escritura cuando se creó la copia de seguridad.';
|
||||
$pia_lang['Maintenance_Tool_restore_noti'] = 'DB Restaurar';
|
||||
$pia_lang['Maintenance_Tool_restore_noti'] = 'Restaurar DB';
|
||||
$pia_lang['Maintenance_Tool_restore_noti_text'] = '¿Estás seguro de que quieres hacer exactos la restauración de DB? Asegúrese de que ningún escaneo se esté ejecutando actualmente.';
|
||||
$pia_lang['Maintenance_Tool_purgebackup'] = 'Purge Backups';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_text'] = 'All other backups will be deleted except for the last 3 backups.';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_noti'] = 'Purge Backups';
|
||||
$pia_lang['Maintenance_Tool_purgebackup_noti_text'] = 'Are you sure you want to delete all backups except the last 3?';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page - by @TeroRERO 20jul2022
|
||||
// Maintenance Page - by @TeroRERO 23jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['BackDevices_Arpscan_disabled'] = 'Arp-Scan Desactivada';
|
||||
$pia_lang['BackDevices_Arpscan_enabled'] = 'Arp-Scan Activada';
|
||||
$pia_lang['BackDevices_Arpscan_disabled'] = 'Arp-Scan Desactivado';
|
||||
$pia_lang['BackDevices_Arpscan_enabled'] = 'Arp-Scan Activado';
|
||||
$pia_lang['BackDevices_darkmode_disabled'] = 'Darkmode Desactivado';
|
||||
$pia_lang['BackDevices_darkmode_enabled'] = 'Darkmode Activado';
|
||||
$pia_lang['BackDevices_Restore_CopError'] = 'La base de datos original no se pudo guardar.';
|
||||
$pia_lang['BackDevices_Restore_okay'] = 'Restaurar ejecutado con éxito.';
|
||||
$pia_lang['BackDevices_Restore_okay'] = 'Restauración ejecutado con éxito.';
|
||||
$pia_lang['BackDevices_Restore_Failed'] = 'La restauración falló. Restaurar la copia de seguridad manualmente.';
|
||||
$pia_lang['BackDevices_Backup_CopError'] = 'La base de datos original no se pudo guardar.';
|
||||
$pia_lang['BackDevices_Backup_okay'] = 'La copia de seguridad ejecutada con éxito con el nuevo archivo';
|
||||
@@ -239,5 +245,6 @@ $pia_lang['BackDevices_DBTools_UpdDev'] = 'Dispositivo actualizado con éxito';
|
||||
$pia_lang['BackDevices_DBTools_UpdDevError'] = 'Error al actualizar el dispositivo';
|
||||
$pia_lang['BackDevices_DBTools_Upgrade'] = 'Base de datos actualizada correctamente';
|
||||
$pia_lang['BackDevices_DBTools_UpgradeError'] = 'Falló la actualización de la base de datos';
|
||||
$pia_lang['BackDevices_DBTools_Purge'] = 'The oldest backups were deleted';
|
||||
?>
|
||||
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
header('Location: /pialert/index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/graph.php';
|
||||
?>
|
||||
@@ -106,7 +114,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="clients">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $pia_lang['Device_Shortcut_OnlineChart_a'];?> <span class="maxlogage-interval">12</span> <?php echo $pia_lang['Device_Shortcut_OnlineChart_b'];?></h3>
|
||||
<h3 class="box-title"><?php echo $pia_lang['Device_Shortcut_OnlineChart'];?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart">
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
TZ=TIMEZONE
|
||||
TZ=Europe/Berlin
|
||||
|
||||
0 3 * * 1 python /home/pi/pialert/back/pialert.py update_vendors >/home/pi/pialert/log/pialert.vendors.log 2>&1
|
||||
*/3 * * * * python /home/pi/pialert/back/pialert.py internet_IP >/home/pi/pialert/log/pialert.IP.log 2>&1
|
||||
*/5 * * * * python /home/pi/pialert/back/pialert.py 1 >/home/pi/pialert/log/pialert.1.log 2>&1
|
||||
*/30 * * * * cp /home/pi/pialert/db/pialert.db /home/pi/pialert/config/pialert.db_bak
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user