Commit Graph

70 Commits

Author SHA1 Message Date
Adam Warner d59bbd26db php -> lp
There are still a few cases left in debug.js, but as that feature is so far missing, I will leave them for now
2023-07-28 22:55:06 +01:00
DL6ER 3085544001 Do not hide mock MAC addresses int the network table
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-06-10 07:50:17 +02:00
DL6ER 756190b65a Merge remote-tracking branch 'origin/devel' into devel-v6
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-24 20:06:53 +02:00
DL6ER 3b9a677a1f Ported network.lp
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-07 10:58:08 +02:00
Christian König 34e45edbda Fix warnings
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-04-27 20:01:30 +02:00
Christian König 4473955291 Don't use idstring in messages when it's not necessary
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-01-20 16:57:34 +01:00
Christian König d55847013f Fix deprecated warnings of jquery-migrate
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-13 17:53:13 +02:00
yubiuser 5aeb52ee50 Merge pull request #1948 from pi-hole/tweak/datatables
Tweak to datatables column rendering
2021-10-28 20:21:01 +02:00
yubiuser 98ec9ee2fc Set stateDuration to 0 for all saved datatables to store the state indefinitely (#1944)
* Set stateDuration to 0 for all saved datatables to store the state indefinite

Signed-off-by: Christian König <ckoenig@posteo.de>

* Move stateDuration to utils.js

Signed-off-by: Christian König <ckoenig@posteo.de>

* Remove duplicated code as it is already part of utils.stateLoadCallback

Signed-off-by: Christian König <ckoenig@posteo.de>

* Fix function

Signed-off-by: Christian König <ckoenig@posteo.de>

* Revert "Fix function"

This reverts commit 2f54f5f988.

Signed-off-by: Christian König <ckoenig@posteo.de>

* Revert "Move stateDuration to utils.js"

This reverts commit 6a3e7786bc.

Signed-off-by: Christian König <ckoenig@posteo.de>
2021-10-27 20:06:02 +01:00
Adam Warner 0e483a8eea Force all columns in any declared datatable to render using datatables render.text function to prevent possible (very low risk, requiring authenticated dashboard anyway) XSS.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-27 19:49:46 +01:00
yubiuser 98ee67efed Add delete function
Signed-off-by: yubiuser <ckoenig@posteo.de>
2021-10-11 14:46:10 +02:00
yubiuser 84d53985ee Add delete button to network table
Signed-off-by: yubiuser <ckoenig@posteo.de>

Fix styling

Signed-off-by: yubiuser <ckoenig@posteo.de>

Fix xo

Signed-off-by: yubiuser <ckoenig@posteo.de>

Use data.id

Signed-off-by: yubiuser <ckoenig@posteo.de>

Sort by last seen

Signed-off-by: yubiuser <ckoenig@posteo.de>

Use data.id instead of data.ip

Signed-off-by: yubiuser <ckoenig@posteo.de>
2021-10-11 13:47:09 +02:00
a1346054 48c63c0a0b Fix spelling
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-09-15 21:22:59 +00:00
DL6ER 0d0a8dba67 Change prettier option trailingComma from "none" to the new default "es5" (see https://prettier.io/docs/en/options.html#trailing-commas)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-06-23 11:26:43 +02:00
Dan Schaper 2976254bbc unicorn/no-lonely-if
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-01-02 20:53:20 -08:00
Dan Schaper 3bd702563c Date.now() fixes
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-01-02 20:33:14 -08:00
Kurtis d3395a1dd4 Fix symbol for devices that do not use Pi-hole
Signed-off-by: Kurtis <kbohlen@sfu.ca>
2020-10-09 12:54:27 -07:00
DL6ER 1b129bcad0 Merge branch 'release/v5.2' into new/mac_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-07-30 21:56:21 +02:00
XhmikosR 7bfc7cbcd5 network.js: use utils.datetime()
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-06-07 17:03:23 +03:00
DL6ER a901489a96 Merge branch 'devel' into new/mac_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-05 22:24:17 +02:00
DL6ER 4bf018b52c Add missing radix information in parseInt().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-04 16:57:55 +02:00
XhmikosR ff16f4889b network.js: minor consistency changes
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 18:20:18 +03:00
XhmikosR cecb5aa88c Use $(fn)
This is the recommended way in jQuery 3.x.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 10:24:55 +03:00
DL6ER eb3c672545 Show explicitly which hostname belongs to which IP address when hovering over the hostnames. Note that the IP addresses and host names were already in the same order, before.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 19:59:53 +02:00
DL6ER c86515e028 Merge pull request #1372 from pi-hole/indexOf
Always use `!== -1` to check for a string's existence
2020-05-25 20:42:02 +02:00
DL6ER 184c8e47e1 Merge pull request #1332 from pi-hole/tweak/dhcp_save_state
Remember last used sort column/direction on DHCP lease tables
2020-05-25 20:05:45 +02:00
DL6ER 61a3ec1b2b Merge pull request #1298 from pi-hole/XhmikosR-patch-5
Enable `no-zero-fractions` rule
2020-05-25 19:48:01 +02:00
XhmikosR 4356bd5f04 Always use !== -1 to check for a string's existence
`String.indexOf()` returns -1 if the string isn't found so this is consistent with the rest of the codebase.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-25 09:38:47 +03:00
Adam Warner 3957e9eef1 Move some duplicated code to utils.js
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-23 11:04:30 +03:00
XhmikosR 0fa7de82b0 JS: Enforce camelcase.
It's a common convention to use camelcase for variable names.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-23 10:29:44 +03:00
XhmikosR 623087346a Enable no-zero-fractions rule
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-17 15:03:52 +03:00
XhmikosR 0b3371030f network: use Font Awesome
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-17 08:51:07 +03:00
DL6ER 389f1d1ecd Fix failed git auto-merge.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-14 20:29:42 +02:00
DL6ER 3e1a1f59aa Add support for multiple hostnames per client (hardware address).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-14 18:43:35 +02:00
DL6ER b7d74ff772 Reinstall loading overlay on long-term graphs page (shown only if data has been requested).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:50:29 +02:00
DL6ER b5e64653db Update network colors
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:50:29 +02:00
DL6ER 6b47a937fb Add network table theming.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:44:55 +02:00
XhmikosR ae13014565 Adapt to the new rules.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-04-10 18:34:47 +00:00
DL6ER a64810e00e Merge branch 'release/v5.0' into devel
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-08 12:25:18 +02:00
DL6ER a99bfeaa6c Set hostname to italic unknown if not available
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-03-12 19:27:08 +00:00
DL6ER d89b13cf6c Hide mock hardware addresses
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-03-12 19:25:43 +00:00
DL6ER 4228d88336 xo does neither like const nor let. Use var everywhere.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-03 23:16:49 +01:00
DL6ER 86f56ee5df Make IP addresses links that send to the Query Log.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-03 22:51:15 +01:00
Ghalid d93f1a22cb Remove autocorrect in search boxes on groups
Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>
2020-01-19 13:12:57 -05:00
Ghalid 050fdb1c34 Merge branch 'devel' into patch-1
Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>
2020-01-19 12:49:36 -05:00
XhmikosR 704c352277 Format JS code
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-01-02 19:42:18 +02:00
XhmikosR 25af37509e length cannot be negative
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-29 10:13:50 +02:00
Ghalid 1df9c4049b There should only be one search input on each page so there doesn't need to be an array anyway, remove arrow functions as per https://github.com/pi-hole/AdminLTE/pull/1100\#pullrequestreview-335618314
Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>

Remove const

Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>
2019-12-21 14:51:34 -05:00
Ghalid 40d7e1498e Disable autocorrect in search boxes
Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>
2019-12-21 12:06:48 -05:00
XhmikosR 9c1846885a Clean up JS
* remove unused variables/functions
* use the dot notation
* use explicit coercion
* remove unneeded else
* use `textContent` instead of `innerHTML`
* cache a few `getElementById` calls
* fix a couple of undefined variables
* various assorted lint tweaks

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-16 20:36:40 +02:00