juanfont / headscale

An open source, self-hosted implementation of the Tailscale control server
BSD 3-Clause "New" or "Revised" License
23.72k stars 1.3k forks source link

Changed all the html into go using go-elem #2161

Closed amha-mersha closed 1 month ago

amha-mersha commented 2 months ago

Created templates package in ./hscontrol/templates. Moved the registerWebAPITemplate into the templates package as a function to be called.

Replaced the apple and windows html files with go-elem.

kradalby commented 2 months ago

@nblock if you have some time, can you do a quick skim of the content for windows and apple?

kradalby commented 2 months ago

@amha-mersha can you delete the HTML templates so we are sure noone will update them in error?

nblock commented 2 months ago

@nblock if you have some time, can you do a quick skim of the content for windows and apple?

Sure, but I got this on nix build:

error: hash mismatch in fixed-output derivation '/nix/store/xj7li14vnd7v6rnmlj5k7v2rqgm7hxw7-headscale-1e8fc3e-go-modules.drv':
         specified: sha256-+8dOxPG/Q+wuHgRwwWqdphHOuop0W9dVyClyQuh7aRc=
            got:    sha256-U5u4tRcCQ+aRIFzOOm0KWRX4BitWKwiHtq5m2DadNtA=
error: 1 dependencies of derivation '/nix/store/f2ds1pcql2haf3s2z3m68mfikcga7lix-headscale-1e8fc3e.drv' failed to build

I manually fixed the checksum in flake.nix, but this is probably not the correct fix?

amha-mersha commented 2 months ago

@nblock I think it is now fixed

nblock commented 1 month ago

@nblock I think it is now fixed

That was quick, thx!

Found one additional location where the space is lost:

image

amha-mersha commented 1 month ago

how about now @nblock . sorry to take your time for this things

kradalby commented 1 month ago

Linter and TestAuthKeyLogoutAndRelogin is expected, but can you have a look at updating the build flake sha?

kradalby commented 1 month ago

A rebase should also fix the failing integration tests.

amha-mersha commented 1 month ago

So should I first rebase and commit

kradalby commented 1 month ago

yep that sounds best

amha-mersha commented 1 month ago

I have rebased and pushed again

kradalby commented 1 month ago

Think the nix flake needs to be update again, haha, we are very close!

amha-mersha commented 1 month ago

do I update that and how

kradalby commented 1 month ago

In the failing build there is a new hash that needs to replace the old one one flake.nix, so a search replace should be good. Sent from Proton Mail for iOS On Thu, Oct 3, 2024 at 13:44, Amha Mersha @.> wrote: do I update that and how — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because your review was requested.Message ID: @.>

kradalby commented 1 month ago

I fixed it up and will merge it when the test runs :) Thanks @amha-mersha, if you feel like more challenges there is one linked in the issue for OIDC page that is trickier because it has more CSS.

amha-mersha commented 1 month ago

Thank you @kradalby for taking the time and guiding me. And for the other one, sure I look into it and get back to you

amha-mersha commented 1 month ago

Could you share me the issue, I couldn't find it.

kradalby commented 1 month ago

https://github.com/juanfont/headscale/issues/2115 @amha-mersha