mydnshost / mydnshost-api

API Backend for mydnshost
Other
2 stars 1 forks source link

Allow renaming & reordering of labels #65

Open tsumaru720 opened 5 years ago

tsumaru720 commented 5 years ago

Off the back of #56 it would be nice to rename a label from the UI and that'd in turn change the label for all domains it applies to - this would be useful if you have a load of domains under a customer label and needed to change the name it displays, for example.

As a side note, it'd be nice to dictate ordering of labels without having to use prefixes such as z_ to define their placement (user-configurable weight maybe?)

ShaneMcC commented 5 years ago

Labels are a weird construct - the backend doesn't really know they exist. It knows that a bunch of domains have a customdata value for the key "uk.co.mydnshost.www/domain/label" or so.

The frontend can probably fake a rename by finding all the domains with a given label value then changing them one by one. Or maybe a way to bulk set a customdata value for a bunch of domains in one go.

Not sure how weights would work without labels being a top-level construct, so probably won't do that bit at least not initially.