UI for device HTTP Tokens#7579
Open
knolleary wants to merge 4 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 7564-device-http-token-crud #7579 +/- ##
============================================================
Coverage 76.95% 76.95%
============================================================
Files 410 410
Lines 21084 21084
Branches 5138 5138
============================================================
Hits 16225 16225
Misses 4859 4859
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
I'm not going to try deduplicating the code. It needs a larger refactor to make the api calls pluggable, or handled via events. |
hardillb
approved these changes
Jun 23, 2026
hardillb
left a comment
Contributor
There was a problem hiding this comment.
Looks good and appears to work (inserts edit and removes tokens)
Just need to remove the commented out return that was obviously the same thing I asked about in slack
| if (!this.device.agentVersion) { | ||
| return false | ||
| } | ||
| // return true |
Contributor
There was a problem hiding this comment.
Suggested change
| // return true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds UI for managing device tokens.
This is largely a copy/paste of the existing UI for Instances. But there is quite a lot of duplication now.
frontend/src/pages/device/Settings/Security.vuefrontend/src/pages/instance/Settings/Security.vueThe Hosted/Remote instance settings files already use a common component for the selection of auth type (
frontend/src/pages/admin/Template/sections/Security.vue). These are generic options that apply to both types.The Tokens table and all associated logic is ripe for making a common component as well; the challenge being the different endpoints needed between the two instance types. All doable, just more work to get right.
There is also duplication in the token create dialogs:
frontend/src/pages/device/Settings/dialogs/TokenDialog.vuefrontend/src/pages/instance/Settings/dialogs/TokenDialog.vuefrontend/src/pages/account/Security/dialogs/TokenDialog.vueAll three dialogs are visually identical - the difference is purely the api endpoint used to create/update the token. Again, ripe for refactoring to make a proper shared dialog.
I'm noting this here to reflect the state of the PR. I will look at how easy any of the above refactorings would be before deciding on this PR's next steps.