Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include FTL's DNS port in web status and give the temperature its own line #2031

Merged
merged 11 commits into from
Dec 29, 2021

Conversation

yubiuser
Copy link
Member

@yubiuser yubiuser commented Dec 26, 2021

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)
  • I have Signed Off all commits. (git commit --signoff)

What does this PR aim to accomplish?:

Reports if FTL is running on another port than 53 in the user-panel in the web interface. Additionally, the temperature info got its own line in the user-panel

Fixes #2030

Needs: pi-hole/pi-hole#4485

Bildschirmfoto zu 2021-12-26 18-25-01

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Copy link
Member

@DL6ER DL6ER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo "<span id=\"temperature\"><i class=\"fa fa-fire ";

is now duplicated code. I'd rather put the if ($celsius >= -273.15) { further down to reduce duplication. Unfortunately, Github doesn't support suggestions if there are also lines deleted in a segment.

I imagine something like

<?php $tempcolor = "text-vivid-blue";
if ($celsius > $temperaturelimit) {
    $tempcolor = "text-red";
?><span id="temperature"><i class="fa fa-fire <? echo $tempcolor; ?>"></i> 
<?php if ($celsius >= -273.15) { ?>
  Temp:&nbsp;<span id="rawtemp" hidden><?php echo $celsius;?></span><span id="tempdisplay"></span>
<?php } else ?>
  No temp sensor found<span id="tempdisplay"></span>
<?php } ?></span>

(give or take some typos maybe)

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
@yubiuser yubiuser requested a review from DL6ER December 27, 2021 15:50
DL6ER
DL6ER previously requested changes Dec 27, 2021
scripts/pi-hole/php/header.php Show resolved Hide resolved
scripts/pi-hole/php/header.php Outdated Show resolved Hide resolved
Signed-off-by: Christian König <[email protected]>
@yubiuser yubiuser requested a review from DL6ER December 27, 2021 19:02
@DL6ER DL6ER dismissed their stale review December 27, 2021 21:14

Changes addressed

@DL6ER
Copy link
Member

DL6ER commented Dec 27, 2021

I will test this once my review comments on the core PR have been discussed.

@rdwebdesign
Copy link
Member

From my point of view, this is fine.

@yubiuser
Copy link
Member Author

@bdoner

We added a new FTL API endpoint to query for the DNS port. If you want to continue to test, please run

pihole checkout ftl new/telnet-dns-port

@svc-user
Copy link

@yubiuser

Checked it out, still running on the tweak/web_status branches for core and web. All seems good :)

@yubiuser yubiuser changed the title Tweak/web status Include FTL's DNS port in web status and give the temperature its own line Dec 28, 2021
DL6ER
DL6ER previously approved these changes Dec 29, 2021
Copy link
Member

@DL6ER DL6ER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ezgif-2-f027916d4e

The icons should be optimized to get class fa-w and more padding but this is another thing for a follow-up PR. T think @rdwebdesign is already at it.

Copy link
Member

@DL6ER DL6ER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$pistatus is never a string

scripts/pi-hole/php/header.php Outdated Show resolved Hide resolved
scripts/pi-hole/php/header.php Outdated Show resolved Hide resolved
scripts/pi-hole/php/header.php Outdated Show resolved Hide resolved
scripts/pi-hole/php/header.php Outdated Show resolved Hide resolved
@rdwebdesign
Copy link
Member

rdwebdesign commented Dec 29, 2021

The icons should be optimized to get class fa-w and more padding but this is another thing for a follow-up PR. T think @rdwebdesign is already at it.

I will look at this after the completion of #2031.

@DL6ER
Copy link
Member

DL6ER commented Dec 29, 2021

@yubiuser Feel free to merge if you are fine with my latest changes.

@yubiuser yubiuser merged commit 64a3675 into devel Dec 29, 2021
@yubiuser yubiuser deleted the tweak/web_status branch December 29, 2021 19:52
@PromoFaux PromoFaux mentioned this pull request Jan 4, 2022
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-13-web-v5-10-and-core-v5-8-released/52254/1

yubiuser pushed a commit that referenced this pull request Jan 6, 2022
* Replicating changes made by other PRs

(#2031 and pi-hole/pi-hole#4485)

Signed-off-by: rdwebdesign <[email protected]>

* Use the same messages used in #2031

Signed-off-by: rdwebdesign <[email protected]>

* Keep the old responses to avoid break things

Signed-off-by: rdwebdesign <[email protected]>

* More comments less variables

Signed-off-by: rdwebdesign <[email protected]>
yubiuser pushed a commit that referenced this pull request Jan 11, 2022
* Replicating changes made by other PRs

(#2031 and pi-hole/pi-hole#4485)

Signed-off-by: rdwebdesign <[email protected]>

* Use the same messages used in #2031

Signed-off-by: rdwebdesign <[email protected]>

* Keep the old responses to avoid break things

Signed-off-by: rdwebdesign <[email protected]>

* More comments less variables

Signed-off-by: rdwebdesign <[email protected]>
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-14-web-v5-11-and-core-v5-9-released/53529/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Approval Required Open Pull Request, needs approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin interface reports "DNS Service not running" when pihole-FTL runs on a non-standard port.
5 participants