You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficcontrol.apache.org by Hank Beatty <hb...@apache.org> on 2019/04/15 18:15:14 UTC
Cache Group Coordinates
Hello,
When creating a new cache group Traffic Portal 3.0 creates a new set of
coordinates. Why does it not present me with a drop down of coordinates
that are already configured?
To me, this seems like a bug.
Regards,
Hank
Re: Cache Group Coordinates
Posted by Rawlin Peters <ra...@gmail.com>.
Hi Hank,
I would classify that as a feature request rather than a bug. When I
added the Coordinate API to Traffic Ops, I refactored the Cachegroups
API to use Coordinates under the hood instead of changing the
client-facing Cachegroups API contract. Doing that without making a
breaking-API change would require the Cachegroups API to accept all of
these cases:
1. Only lat/long provided, no coordinate ID
2. Both lat/long and coordinate ID provided
3. Only coordinate ID provided
This would complicate the API implementation and make it more
confusing IMO. If we would like the cachegroups 2.0 API to accept a
coordinate ID instead of lat/long, that would probably be best, but I
would steer away from an API accepting both concrete values as well as
an ID to another resource containing the same concrete values.
From a TP usability perspective, we could implement your described
functionality within TP itself if we want:
(in the Cachegroups form view)
- fetch all Coordinates from API
- populate dropdown with all Coordinates to choose from
- user selects a Coordinate
- the lat/long fields get populated with the same lat/long as the Coordinate
That would still create a "duplicate" Coordinate row in the database
instead of linking to the existing Coordinate via its ID, but I would
probably prefer that until we can have the 2.0 cachegroups API just
take a Coordinate ID instead of lat/long and an optional Coordinate
ID.
- Rawlin
On Mon, Apr 15, 2019 at 12:15 PM Hank Beatty <hb...@apache.org> wrote:
>
> Hello,
>
> When creating a new cache group Traffic Portal 3.0 creates a new set of
> coordinates. Why does it not present me with a drop down of coordinates
> that are already configured?
>
> To me, this seems like a bug.
>
> Regards,
> Hank