panel icon indicating copy to clipboard operation
panel copied to clipboard

Add UI for setting container labels on the Panel

Open matthewpi opened this issue 3 years ago • 7 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

UI for specifying label key-values to go along with https://github.com/pterodactyl/panel/issues/3100

Describe the solution you'd like.

.

Additional context to this request.

No response

matthewpi avatar Oct 17 '22 00:10 matthewpi

@matthewpi is there any update regarding this? I could really use this feature.

Attacler avatar Mar 24 '23 10:03 Attacler

@matthewpi is there any update regarding this? I could really use this feature.

Same here

Svenum avatar Aug 12 '23 09:08 Svenum

(I think) I understand that support for Labels was implemented in the codebase for Wings, but not in the UI yet. I had a look at the PR, but can not figure out from where Wings is pulling the label information. Of course it is not available in the UI yet, but since Labels are "supported" now, how do you provide them? Customize the Egg? Put a .yml or .json file somewhere for Wings to read and use it?

kladderadeng avatar Oct 03 '23 12:10 kladderadeng

(I think) I understand that support for Labels was implemented in the codebase for Wings, but not in the UI yet. I had a look at the PR, but can not figure out from where Wings is pulling the label information. Of course it is not available in the UI yet, but since Labels are "supported" now, how do you provide them? Customize the Egg? Put a .yml or .json file somewhere for Wings to read and use it?

Labels are returned by the Panel when Wings fetches the server's configuration from the Panel.

The associated code is https://github.com/pterodactyl/panel/blob/1.0-develop/app/Services/Servers/ServerConfigurationStructureService.php#L43. To statically add labels to all servers you would just need to add the following code to the existing array.

'labels' => [
  'key' => 'value',
],

There is not a way to configure labels on servers except by modifying the Panel's code.

matthewpi avatar Oct 04 '23 02:10 matthewpi

Thank you very much @matthewpi for your reply. Unfortunately modifying code is out of my league (I can barely read / understand the code, so I am of not much help). But this makes it clear to me that I can stop searching for a hack to get labels into the containers until it is actually implemented. Thanks for working on this project and make life easier for many out there :-)

kladderadeng avatar Oct 04 '23 07:10 kladderadeng

bump?

Rattlyy avatar Jul 18 '24 23:07 Rattlyy

(I think) I understand that support for Labels was implemented in the codebase for Wings, but not in the UI yet. I had a look at the PR, but can not figure out from where Wings is pulling the label information. Of course it is not available in the UI yet, but since Labels are "supported" now, how do you provide them? Customize the Egg? Put a .yml or .json file somewhere for Wings to read and use it?

Labels are returned by the Panel when Wings fetches the server's configuration from the Panel.

The associated code is https://github.com/pterodactyl/panel/blob/1.0-develop/app/Services/Servers/ServerConfigurationStructureService.php#L43. To statically add labels to all servers you would just need to add the following code to the existing array.

'labels' => [
  'key' => 'value',
],

There is not a way to configure labels on servers except by modifying the Panel's code.

First of all, since this my first time writing in this repo, I want to thank you for the work you put into this software, it's amazing to see how bit by bit I can self-host and organize my way into heaven with tools like Pterodactyl.

Great to see it's possible, but the issue is that by changing code a user would need to fork the repo and keep merging their edit into changes from upstream OR manually patch the PHP file continuously, neither of which are a good user experience if the point is to avoid manually assigning the label on the host through docker commands.

A UI solution would help greatly, ESPECIALLY for those of us who would like to use labels to manage their containers, either by assigning Uptime Kuma watches or by tagging containers for SWAG reverse proxy to automagically pick them up.

GlassedSilver avatar Jan 14 '25 00:01 GlassedSilver