Skip to content

Commit

Permalink
🔌LUCIRPC - OpenWRT import
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Dec 27, 2024
1 parent 74ec75f commit dda440e
Show file tree
Hide file tree
Showing 11 changed files with 655 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ENV PATH="/opt/venv/bin:$PATH"
COPY . ${INSTALL_DIR}/


RUN pip install graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git \
RUN pip install OpenWrtRpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git \
&& bash -c "find ${INSTALL_DIR} -type d -exec chmod 750 {} \;" \
&& bash -c "find ${INSTALL_DIR} -type f -exec chmod 640 {} \;" \
&& bash -c "find ${INSTALL_DIR} -type f \( -name '*.sh' -o -name '*.py' -o -name 'speedtest-cli' \) -exec chmod 750 {} \;"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN phpenmod -v 8.2 sqlite3
RUN apt-get install -y python3-venv
RUN python3 -m venv myenv

RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros "
RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install OpenWrtRpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros "

# Create a buildtimestamp.txt to later check if a new version was released
RUN date +%s > ${INSTALL_DIR}/front/buildtimestamp.txt
Expand Down
20 changes: 19 additions & 1 deletion front/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,23 @@ input[readonly] {
transition: box-shadow 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

.devicePropAction
{
width: 1.2em;
height: 1.2em;
display: inline-block;
padding: 0.1em;
margin: 0.1em;
}

.devicePropAction:hover
{
font-size: larger;
padding: 0em;
margin: 0em;

}

/* ----------------------------------------------------------------- */
/* MODAL popups */
/* ----------------------------------------------------------------- */
Expand Down Expand Up @@ -1746,7 +1763,8 @@ input[readonly] {

table.dataTable tbody > tr.selected
{
color:red;
/* color:red; */
color: #353c42;
}

/* -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ function renderCustomProps(custProps, mac) {
break;
}

html += `<span class="pointer" onclick="${onClickEvent}" title="${propMap["CUSTPROP_name"]} ${propMap["CUSTPROP_args"]}"> ${atob(propMap["CUSTPROP_icon"])} </span>`;
html += `<div class="pointer devicePropAction" onclick="${onClickEvent}" title="${propMap["CUSTPROP_name"]} ${propMap["CUSTPROP_args"]}"> ${atob(propMap["CUSTPROP_icon"])} </div>`;
}
});

Expand Down
Empty file modified front/php/templates/language/fr_fr.json
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion front/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ Device-detecting plugins insert values into the `CurrentScan` database table. T
| `ARPSCAN` | 🔍 | ARP-scan on current network | | | Script | [arp_scan](/front/plugins/arp_scan/) |
| `AVAHISCAN` | 🆎 | Avahi (mDNS-based) name resolution | | | Script | [avahi_scan](/front/plugins/avahi_scan/) |
| `CSVBCKP` || CSV devices backup | | | Script | [csv_backup](/front/plugins/csv_backup/) |
| `CUSTPROP` || Managing custom device properties values | | Yes | Template | [custom_props](/front/plugins/custom_props/) |
| `DBCLNP` || Database cleanup | | Yes* | Script | [db_cleanup](/front/plugins/db_cleanup/) |
| `DDNS` || DDNS update | | | Script | [ddns_update](/front/plugins/ddns_update/) |
| `DHCPLSS` | 🔍/📥/🆎| Import devices from DHCP leases | | | Script | [dhcp_leases](/front/plugins/dhcp_leases/) |
| `DHCPSRVS` || DHCP servers | | | Script | [dhcp_servers](/front/plugins/dhcp_servers/) |
| `FREEBOX` | 🔍/♻/🆎 | Pull data and names from Freebox/Iliadbox | | | Script | [freebox](/front/plugins/freebox/) |
| `FREEBOX` | 🔍/♻/🆎| Pull data and names from Freebox/Iliadbox | | | Script | [freebox](/front/plugins/freebox/) |
| `ICMP` | 🔍 | ICMP (ping) status checker | | | Script | [icmp_scan](/front/plugins/icmp_scan/) |
| `INTRNT` | 🔍 | Internet IP scanner | | | Script | [internet_ip](/front/plugins/internet_ip/) |
| `INTRSPD` || Internet speed test | | | Script | [internet_speedtest](/front/plugins/internet_speedtest/) |
| `IPNEIGH` | 🔍 | Scan ARP (IPv4) and NDP (IPv6) tables | | | Script | [ipneigh](/front/plugins/ipneigh/) |
| `LUCIRPC` | 🔍 | Import connected devices from OpenWRT | | | Script | [luci_import](/front/plugins/luci_import/) |
| `MAINT` || Maintenance of logs, etc. | | | Script | [maintenance](/front/plugins/maintenance/) |
| `MQTT` | ▶️ | MQTT for synching to Home Assistant | | | Script | [_publisher_mqtt](/front/plugins/_publisher_mqtt/) |
| `NBTSCAN` | 🆎 | Nbtscan (NetBIOS-based) name resolution | | | Script | [nbtscan_scan](/front/plugins/nbtscan_scan/) |
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/custom_props/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

Settings related to the custom properties functionality on a device.
Settings related to the custom properties functionality on a device. A user guide can be found here: [Custom Properties](/docs/CUSTOM_PROPERTIES.md)

### Usage

Expand Down
9 changes: 9 additions & 0 deletions front/plugins/luci_import/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Overview

The plugin is used to import connected devices from OpenWRT

### Other info

- Author : [vaga9938](https://github.com/vaga9938)
- Date : 28-Dec-2024 - version 1.0

Loading

0 comments on commit dda440e

Please sign in to comment.