feat: show version on dashboard - #170
Conversation
c88c566 to
034b3f2
Compare
| <h2> | ||
| {{if .IsNew}}Add New OIDC Client{{else}}Edit OIDC Client{{end}} | ||
| </h2> | ||
| <a class="btn btn-secondary" href="/">← Back to Clients</a> |
There was a problem hiding this comment.
it looks like your editor is sorting HTML attributes? Would you mind disabling that, or moving these changes to a different commit (on the same PR is fine), so the actual changes related to showing the version are easier to see?
There was a problem hiding this comment.
Thanks @willnorris - I've amended the changes so the attributes are in the same order as it was previously
There was a problem hiding this comment.
Sorry I missed it on the first round, but there are also a bunch of whitespace only edits: https://github.com/tailscale/tsidp/pull/170/changes?w=0 most notably, server/ui-header.html which has only whitespace edits. I'm imagining these were auto-applied by your editor?
I can also just clean these up after with a full pass with prettier or something. But in general, please try to make sure your PRs just includes the necessary changes, not all the extra formatting. Unless of course the formatting is the intent of the PR 😄 ... we do that occasionally, just to get everything consistent with a defined style.
There was a problem hiding this comment.
hey @willnorris thanks again for the review - the whitespace changes were editor-generated, but I think it makes sense to keep them in this case.
Since we're already doing a broader pass on the HTML to make it more composable/template-friendly, it felt consistent to include them here rather than separate them out. It seemed cleaner to include them since these files are already being updated.
Happy to adjust if you'd prefer we separate out formatting changes in the future. 👍
There was a problem hiding this comment.
@willnorris / @tailscale I will be offline the next few weeks so let me know if you want these changes in :)
034b3f2 to
2666810
Compare
Signed-off-by: Arun Philip <arun@corkinc.com>
Signed-off-by: Arun Philip <arun@corkinc.com>
Display release version in dashboard footer via a new ui-footer.html template and a GetAppVersion func map entry that resolves to server.GetVersion. Also strip the leading "v" from GITHUB_REF_NAME in the release workflow's --version check so the expected value matches the CLI output. Signed-off-by: Arun Philip <arun@corkinc.com>
2666810 to
814def7
Compare
|
okay, I've split your change into three commits:
The only difference between these three and your original change is that it now preserves the correct This kind of split between refactoring changes that have no change on the final results and those that actually introduce new behavior are MUCH easier to review and see what's changing. |
Display release version in dashboard footer and includes template optimizations for better reuse.
tested by running
go build -o build/tsidp-server-darwin-arm64-$(shell date +%Y-%m-%d)-$(shell git rev-parse --short=5 HEAD) -ldflags "-X github.com/tailscale/tsidp/server.version=v1.2.3" ./tsidp-server.goand going to the appCloses #157