Skip to content

Add target groups for improved interface#1518

Merged
Eugeny merged 25 commits intowarp-tech:mainfrom
alairock:sky/target-groups
Nov 28, 2025
Merged

Add target groups for improved interface#1518
Eugeny merged 25 commits intowarp-tech:mainfrom
alairock:sky/target-groups

Conversation

@alairock
Copy link
Copy Markdown
Contributor

@alairock alairock commented Oct 1, 2025

This pull request introduces a new "Target Groups" feature to the Warpgate application, allowing targets to be organized into groups with associated metadata (name, description, color). It adds database support, API endpoints for managing target groups, and updates the targets to optionally reference a group. The HTTP protocol and web UI are also updated to expose and utilize this grouping functionality.

Target Groups Feature

  • Added new TargetGroup entity, database migration, and ORM model, including fields for id, name, description, and color. [1] [2]
  • Created REST API endpoints for listing, creating, retrieving, updating, and deleting target groups in target_groups.rs, and registered these endpoints in the main API module. [1] [2] [3]

Targets Integration

  • Extended target models and database schema to include an optional group_id field, and added the relation between targets and target groups. [1] [2] [3] [4] [5] [6] [7]
  • Updated targets API endpoints to support filtering by group, setting group on create/update, and returning group information in responses. [1] [2] [3] [4] [5] [6] [7]

Database Migration

  • Added migration m00020_target_groups to create the target_groups table and add the group_id column to the targets table. [1] [2] [3]

Web UI Integration

  • Registered new routes for target group management in the admin Svelte application.

Other

  • Registered the new entity and migration in the appropriate modules. [1] [2]

These changes collectively enable users to manage target groups, associate targets with groups, and view group information throughout the API and UI.

CleanShot 2025-09-30 at 19 09 15 CleanShot 2025-09-30 at 18 46 46 CleanShot 2025-09-30 at 18 46 39 CleanShot 2025-09-30 at 18 46 34

(Edited: More appropriate screenshots)

@Christian-Little-Tava
Copy link
Copy Markdown

This is a cool idea, we have a lot of targets as well so far and we were wondering on the best ways to organize them to make it easier for the users

@alairock
Copy link
Copy Markdown
Contributor Author

@Eugeny any thoughts on this one?

Eugeny
Eugeny previously requested changes Oct 16, 2025
Copy link
Copy Markdown
Member

@Eugeny Eugeny left a comment

Choose a reason for hiding this comment

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

Sorry for the delay - I'll probably only be able to do a full review next week. I've added come comments from a cursory glance though

@alairock
Copy link
Copy Markdown
Contributor Author

@Eugeny Hope things are well! I've updated my PR per the suggestions you have made.

@alairock
Copy link
Copy Markdown
Contributor Author

alairock commented Nov 17, 2025

Realized I had hard-coded hex numbers for colors, and not used the name of the style itself. Fixed that.

I also updated the target groups edit page to use a visual selection, instead of just having a drop down with the bootstrap names. That way they can see the color they are picking at the time of picking it.

CleanShot 2025-11-17 at 09 42 03

@alairock alairock requested a review from Eugeny November 17, 2025 23:40
@waquidvp
Copy link
Copy Markdown

Looks like an awesome feature! Could it do permissions at the group level? It might be out of scope since it's primarily an interface improvement, but it would be nice to give a role access to a whole group.

@Eugeny
Copy link
Copy Markdown
Member

Eugeny commented Nov 28, 2025

@all-contributors add @alairock for code

@allcontributors
Copy link
Copy Markdown
Contributor

@Eugeny

I've put up a pull request to add @alairock! 🎉

@Eugeny Eugeny merged commit 5baa4a9 into warp-tech:main Nov 28, 2025
13 checks passed
@Eugeny
Copy link
Copy Markdown
Member

Eugeny commented Nov 28, 2025

Thank you!

@alairock
Copy link
Copy Markdown
Contributor Author

Looks like an awesome feature! Could it do permissions at the group level? It might be out of scope since it's primarily an interface improvement, but it would be nice to give a role access to a whole group.

@Eugeny I'm not sure what you mean? Would be happy to look into it to see if I can add that feature :)

@Eugeny
Copy link
Copy Markdown
Member

Eugeny commented Nov 28, 2025

That's not my comment. @waquidvp is asking whether the PR includes support for group role assignments (it doesn't)

@MrWeez
Copy link
Copy Markdown

MrWeez commented Nov 30, 2025

It's a pity that you removed support for custom colors, it would be very convenient for flexible customization. But overall, I like the idea. Updated specifically to organize a bunch of my subhosts

@alairock alairock deleted the sky/target-groups branch December 2, 2025 18:48
SteezyCougar pushed a commit to SteezyCougar/warpgate that referenced this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants