Commit Graph

263 Commits

Author SHA1 Message Date
RD WebDesign
b44a07446d Small desing adjustment and simplify selector
- use class to style buttons and info icons (move style to pi-hole.css)
- add negative margin to avoid small jump when the button is shown
- use the new classes to simplify jquery selectors
2023-11-08 16:52:21 -03:00
DL6ER
e71557a60f Show Reset Zoom button when zoomed in
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-11-08 10:26:49 +01:00
DL6ER
6eb7440a21 Add tooltip explaining you can zoom and pan the graphs
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-11-07 21:48:49 +01:00
DL6ER
27f4a94b48 Add zooming on the dashboard's two main graphs (#2807) 2023-11-07 20:56:31 +01:00
DL6ER
752e37ffac Update scripts/pi-hole/js/index.js
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: DL6ER <DL6ER@users.noreply.github.com>
2023-11-07 19:14:46 +01:00
DL6ER
59809d9959 Remeber original axis limit instead of trying to calculate it
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-11-07 06:43:54 +01:00
Christian König
bb32db9ae8 Suppress no-undef warning
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-06 21:11:55 +01:00
Christian König
a06bbdf589 Fix styling
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-06 21:04:31 +01:00
Christian König
a55167973d Fix chartjs v4 migration: scales[id].grid.drawBorder > scales[id].border.display
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-06 13:34:17 +01:00
Christian König
097a404bf0 Don't show rotation animation for pie chart updates
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-06 13:03:14 +01:00
DL6ER
80971905c4 Fix zooming to the zero axis, panning is still allowed if you want to leave y=0 behind
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-11-06 09:24:35 +01:00
Christian König
5300028f14 Defer chart loading
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-06 00:18:41 +01:00
DL6ER
aa84cb4b9b Add zooming on the dashboard's two main graphs. You can zoom either with [Ctrl] + your mouse wheel (desktop) or the multi-touch "pinch" gesture (mobile). You can then drag with a single click (or finger) to move the graph up or down in case zooming wasn't that accurate
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-11-05 07:42:11 +02:00
Adam Warner
6c815721c4 Update chart.js to 4.4.0 (#2781) 2023-10-28 16:55:14 +01:00
Christian König
7b55ddc5fa No need for second scales
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-25 21:45:29 +02:00
Christian König
5c14641aa2 Remove leftover of line chart option
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-24 23:48:15 +02:00
Christian König
050e1d1056 Fix dashboard when no queries are present
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-24 23:30:29 +02:00
DL6ER
606a1de47a Show total clients in hover title instead
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-10-22 09:28:36 +02:00
DL6ER
ea4ebc3aca Show active clients instead of clients-ever-seen on the dashboard. When the two numbers are different, show both
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-10-21 18:43:42 +02:00
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
86aa24a8e2 Add port to upstream legend key if available
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-27 18:35:34 +02:00
DL6ER
f5666e47e6 Query Log: Simplify specifying "type" via URI parameters (via types pie chart)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-27 14:10:12 +02:00
DL6ER
f454617f9c Add cache content pie chart on settings->system page and move all chart-related code into a shared file pi-hole/js/chart.js
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-11 10:39:38 +02:00
DL6ER
7156cc541f Port PHP to Lua Pages
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-04-26 21:57:11 +02:00
DL6ER
fb64759fdf Merge remote-tracking branch 'origin/devel' into devel-v6
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-04-26 09:18:39 +02:00
RD WebDesign
e40d43e4d9 Fix NaN error message when FTL is offline
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-17 15:22:55 -03:00
RD WebDesign
aa5068bbe9 Using a new function to retrieve CSS values from classes
- create a new function to access CSS values, even if not directly used on the page;
- remove the empty harcoded HTML `<span>` placeholders used only to source the colors from CSS classes

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-02-11 19:52:13 -03:00
DL6ER
ccced4c1a8 Fix "undefined" hit counts on the dashboard
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-02 20:57:10 +01:00
DL6ER
4eb9a4cf29 Port dashboard landing page to v6.0 API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-31 20:41:12 +01:00
Christian König
9f7a04a37c Show two decimals on doughnutTooltip if total share shown is less than 1%
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-01-18 22:29:00 +01:00
Christian König
f841f309a2 Fix doughnutTooltip if total percentage of shown slices is less than 0.1%
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-11-17 14:35:32 +01:00
DL6ER
6367d99560 Update jQuery to v3.6.1. (#2392) 2022-10-28 13:01:34 -04:00
Christian König
c5595903ae Fix quotes
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-22 22:20:57 +02:00
Christian König
abb5c47b58 Set tooltip interaction mode for overtime graphs
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-22 22:14:23 +02:00
Christian König
8abfde2e5c Indicate item share is less than 0.1%
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-14 11:14:27 +02:00
Christian König
8762248454 Go for 0.1 precision
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-13 18:33:30 +02: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
Christian König
fb2635db52 Add comment to explain 99.99 decision
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-13 09:52:09 +02:00
Christian König
4627fba09a Don't show detailed doughnut tooltip if sum is 99.99%
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-13 09:29:35 +02:00
Christian König
c1c4dba1d0 Add minimal rounding to account for internal rounding errors to suppress detailed tooltip on doughnut charts if nothing is hidden
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:55:18 +02:00
Christian König
8979ac3088 Set maintainAspectRatio: true for doughnut charts to resize without margins
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:44:37 +02:00
Christian König
999941ce2f Change tooltip mode for overtime graphs from index to x and set intersect to false
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:03 +02:00
RD WebDesign
5967127c95 Fine tuning legend tootips and links to query log
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-10-05 21:19:03 +02:00
RD WebDesign
62297be1da Use custom legends for doughnut charts
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-10-05 21:19:02 +02:00
Christian König
bbdc4c3d6b Fix doughnut tooltip and legend
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:02 +02:00
Christian König
0245c936d9 Set parsing:false for dashboard graphs
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:02 +02:00
Christian König
958f10c472 Fix line graph reprenstations for overtime* charts
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:01 +02:00
Christian König
624d39df25 Fix OnClickEvent for overtime* charts
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:01 +02:00
Christian König
999295b772 Fix overtime* charts
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:00 +02:00
Christian König
c14c491ea5 Add chartjs-adapter-moment.js
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-10-05 21:19:00 +02:00