Commit Graph

138 Commits

Author SHA1 Message Date
Christian König
0c852a6880 Fix prettier
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-11-21 13:23:54 +01:00
Christian König
cc58104538 Fix DHCP tables button column
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-11-21 13:16:26 +01: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
Adam Warner
e53f7e674e Also set the color of the iframe's font (#1934)
(remove prettier:check from npm test, as the output is not helpful at all - whereas xo's output will tell the user what prettier is complaining about)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-23 19:21:19 +01:00
Adam Warner
7374ce57d4 address prettier complaints
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-07 00:13:33 +01:00
Th3M3
0d24f25f3c Modal Dialog for Teleporter-import
fixes page reload every time the DHCP tab gets active

Signed-off-by: Th3M3 <the_me@outlook.de>
2021-10-07 00:12:33 +01:00
Adam Warner
e3a69aff6a Add background colors on Query log + switchable text coloring (as before) (#1893)
* Add subtle background colour to the rows depending on query status

* Do the same for long term query log (and also apply changes missed on last release

* Add per-browser setting for Query Log colorization

Signed-off-by: DL6ER <dl6er@dl6er.de>

Co-authored-by: DL6ER <dl6er@dl6er.de>
2021-09-21 09:39:49 -07:00
DL6ER
122146fcc6 Update styling of scripts/pi-hole/js/settings.js
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-06-26 15:28:11 +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
DL6ER
6e0e1bbb41 Add button to remove dynamic DHCP leases. They are immediately removed both from FTL and the dhcp.leases file (FTL takes care of updating the file!) WITHOUT the need for a restart of the DHCP/DNS resolver.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-11-23 13:35:40 +01:00
Adam Warner
c42c06be2d Merge pull request #1208 from pi-hole/new/rev-server
Improve conditional forwarding settings
2020-07-02 10:51:41 +01:00
DL6ER
4bf018b52c Add missing radix information in parseInt().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-04 16:57:55 +02:00
DL6ER
540ebddb8c Merge branch 'devel' into new/rev-server
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-04 09:24:49 +02: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
XhmikosR
792abf8624 Update settings.js
* cache variable
* camelcase variable name

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-25 21:27:36 +03:00
DL6ER
b6ad648842 Merge pull request #1329 from pi-hole/new/somepeoplelikecurves
Add checkbox (save state in localstorage) to toggle between bar and smooth
2020-05-25 20:08:42 +02: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
Adam Warner
eb05394b66 Add saveState/loadState callbacks
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-23 10:53:34 +03:00
Adam Warner
6b1340cfdf Add staveSave property bool to DHCP tables to remember last used sort direction/column
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-23 10:53:32 +03:00
XhmikosR
617447e534 Update settings.js
* fix "Pi-hole" case
* remove moot modal class

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-21 15:39:15 +03:00
Adam Warner
c4091a7b3b Add checkbox (save state in localstorage) to toggle between bar and smooth charts
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-18 20:56:21 +01:00
Adam Warner
d47d284ef9 Set default sort on DHCP lease tables to that of Hostname for ease of access
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-18 18:22:34 +01:00
XhmikosR
0e35b415ea JS: test for length explicitly. (#1240)
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-04 10:50:13 +03:00
XhmikosR
ae13014565 Adapt to the new rules.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-04-10 18:34:47 +00:00
DL6ER
373d59f751 Improve conditional forwarding settings so users can specify the subnet according to their needs.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-10 10:54:41 +02: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
43b45d3da7 Merge pull request #1100 from Ghalid/patch-1
Disable text correction features, change types to make input fields easier to type in (especially for mobile devices)
2020-04-07 13:59:44 +02:00
XhmikosR
4af6a0785a Update xo to v0.28.0
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-03-20 10:31:32 +02:00
DL6ER
13b7b3d1a9 Remove redundant adlist management on settings page. This is still using CLI callbacks instead of working directly on the database.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-11 20:07:43 +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
Ghalid
112a5abf80 Merge branch 'devel' into patch-1
Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>
2019-12-29 14:22:12 -05: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
2ba18a1b58 Be explicit about window.location
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-17 12:14:37 +02: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
DL6ER
8c20ac58b9 Merge pull request #1072 from pi-hole/js
settings.js: fix object shorthand
2019-12-16 12:57:45 +01:00
DL6ER
52f5be0c8f Merge pull request #992 from trimalcione/devel
Add DHCP leases export/import from teleporter
2019-12-16 11:22:28 +01:00
trimalcione
03326ebe09 fix DHCP tab syncing after telereporter import
Signed-off-by: trimalcione <okchtioui@gmail.com>
2019-12-16 00:37:23 +01:00
XhmikosR
d91b605563 settings.js: fix object shorthand
This broke IE

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-11 00:30:08 +02:00
XhmikosR
7031d19d25 Remove unneeded escape characters
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-09 21:50:42 +02:00
Adam Warner
8311a0aefc Add ability for user to include comment when adding a blocklist
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2019-10-14 22:59:05 +01:00
DL6ER
72abc5dad4 Add button for pihole arpflush on Pi-hole settings page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-05-30 22:05:13 +02:00
DL6ER
4923a7576c Remove another mentioning of data-mask
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-04-12 16:01:35 +02:00
DL6ER
a692bdea27 Add missing semicolon
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-08-21 18:39:50 +02:00
DL6ER
77efbac43d Show cache info on Settings page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-08-21 15:42:15 +02:00
DL6ER
80017e9b41 Remove auto-dismissal for error messages on the settings page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-06-03 11:19:16 +02:00