Commit Graph

2898 Commits

Author SHA1 Message Date
DL6ER
51edb07537 Use titles in notifications.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-17 13:56:32 +00:00
DL6ER
da2d92ebd7 Prevent users from adding empty groups/domains/clients/adlists.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-17 12:57:45 +00:00
DL6ER
d0d1174010 Use bootstrap notify for notifications.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-17 12:48:25 +00:00
DL6ER
232cfdb326 Also show database ID in tooltip.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-17 11:35:57 +00:00
XhmikosR
18cfd8dab1 Reuse variable and make code clearer
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-17 12:19:43 +02:00
XhmikosR
2ba18a1b58 Be explicit about window.location
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-17 12:14:37 +02:00
DL6ER
18682eb61d Also delete assignments form domains, adlists and clients to a group when it is deleted.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-17 09:56:55 +00:00
XhmikosR
ef396ede5b Use var instead of let.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-17 10:47:01 +02:00
XhmikosR
689aa6afd6 Add missing license headers
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-17 10:46:36 +02:00
XhmikosR
7d9e32bac6 Reuse the dateformat variable
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-17 09:59:01 +02:00
XhmikosR
19da9999df New favicons.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-16 23:18:28 +02:00
Adam Warner
d966c7f534 Merge pull request #1073 from XhmikosR/js-2
Assorted JS tweaks
2019-12-16 19:21:42 +00:00
Adam Warner
6864aacca3 Merge pull request #1082 from pi-hole/header
header: hide `hostname` on small devices
2019-12-16 19:21:34 +00:00
XhmikosR
4b06680ba8 header: hide hostname on small devices
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-16 21:15:49 +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
XhmikosR
97bc779299 db_graph.js: Fix IE 11
IE doesn't support `Array.includes()`

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-16 19:29:24 +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
3391580416 Merge pull request #1065 from pkolmann/devel
I have a different service running on FTL default port and so FTL ser…
2019-12-16 12:57:14 +01:00
DL6ER
95c893ded5 Merge branch 'devel' into new/group-management 2019-12-16 10:28:36 +00: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
DL6ER
49be667760 Say explicitly why a "Not allowed" error comes from.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-16 10:08:35 +00:00
DL6ER
7c9d77d694 Run prettier on most recent changes.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-16 09:46:38 +00:00
DL6ER
509574b6ab Show raw response (like "Not allowed") when encountering an error. This is actually not all that unlikely as a user might have the page open for longer time and wants to add(edit/delete a group/client/domain/adlist when their session has already expired.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-16 09:43:22 +00:00
DL6ER
6f3495db7b Send token when adding new group. Otherwise, we get a "Not allowed" response.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-16 09:36:50 +00:00
DL6ER
5388927f52 Merge pull request #1078 from pi-hole/tweak/domainlist_table
Change web interface to use domainlist table
2019-12-16 01:19:41 +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
DL6ER
6bc72d296c Use JS dot-notation as it is less verbose
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-14 20:19:09 +00:00
DL6ER
a75117a584 Use prettier to reformat JS files added in this PR.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-14 20:06:26 +00:00
DL6ER
acf19c0eea Apply PSR-12 style to all new PHP files added in this pull request.
Used command: PHP_CodeSniffer/bin/phpcbf --standard=PSR12 [...].php

Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-14 20:04:26 +00:00
DL6ER
b791c29440 Use single quotes almost everywhere, use !== where appropriate, fix formatting and simplify the code in some places.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-14 12:16:01 +00:00
DL6ER
aa6c4c88f3 Ensure large table is only loaded when groups are known.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 17:54:01 +00:00
DL6ER
aa764ad22d Add CORS and CSRF checks to ensure unauthorized access to the backend is not possible.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 17:39:45 +00:00
DL6ER
3b7e50713f Remove assignment from if-statement to please CodeFactor.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 17:26:02 +00:00
DL6ER
9950ca50fe Correctly interpret toogle value.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 17:23:10 +00:00
DL6ER
a83c9c9828 Add tooltips for creation and modification times for domains and adlists.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 17:22:20 +00:00
DL6ER
cf96bed06a Address stickler complaints.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 16:58:50 +00:00
DL6ER
b62c550ad7 Use toggle for Enabled/Disabled switch
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 16:45:24 +00:00
DL6ER
50f05b9119 Add missing form-control classes for proper element styling.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 16:19:45 +00:00
DL6ER
b025ffd208 Make sure all fields are searchable on all pages (where this is meaningful) and remove ID column from clients group page.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 15:59:46 +00:00
DL6ER
70589fa844 Add Adlists group management
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 15:41:14 +00:00
DL6ER
912e2ddbd9 Add Domain Group Management
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 15:29:42 +00:00
DL6ER
600c16c269 Add Client group management
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 14:40:29 +00:00
DL6ER
3e23aa67a1 Add group management page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 11:55:22 +00:00
DL6ER
99462ec21d Update DataTables from 1.10.12 to 1.10.20
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 11:55:08 +00: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
Philipp Kolmann
87ba9740f1 remove debug output
Signed-off-by: Philipp Kolmann <philipp@kolmann.at>
2019-12-10 21:14:09 +01:00
XhmikosR
7031d19d25 Remove unneeded escape characters
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-09 21:50:42 +02:00
XhmikosR
81357eb5b0 Change the no JavaScript text as per the suggestions
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-09 21:36:58 +02:00
XhmikosR
0cac6dc0b4 Update scripts/pi-hole/php/header.php
Co-Authored-By: Adam Warner <me@adamwarner.co.uk>
2019-12-09 21:36:58 +02:00
XhmikosR
0dc918e2ef loginpage.php: use kbd since it makes more sense
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2019-12-09 21:36:58 +02:00