<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi all,</div>
<div><br>
</div>
<div>I recently started looking into properly implementing breadcrumbs to make navigation clearer, especially around nested resources (Subnets Detail page, for example). The idea is to use the request.path to form a logical breadcrumb that isn’t dependent on
 browser history ( <a href="https://review.openstack.org/#/c/129985/3/horizon/browsers/breadcrumb.py">https://review.openstack.org/#/c/129985/3/horizon/browsers/breadcrumb.py</a> ). Unfortunately, this breaks down quite quickly because we use odd patterns like
 `<resources>/<resource_id>/detail`, and `<resources>/<resource_id>` doesn’t exist.</div>
<div><br>
</div>
<div>This made me realise how much of an inconsistent mess the URL patterns are.  I’ve started cleaning them up, so we move from these patterns:</div>
<div><br>
</div>
<div>`/admin/networks/<network_id>/detail` - Detail page for a Network</div>
<div>`/admin/networks/<network_id>/addsubnet` - Create page for a Subnet</div>
<div><br>
</div>
<div>To patterns in line with usual CRUD usages, such as:</div>
<div><br>
</div>
<div>`/admin/networks/<network_id>` - Detail page for a Network</div>
<div>`/admin/networks/<network_id>/subnets/create` - Create page for a Subnet</div>
<div><br>
</div>
<div>This is mostly trivial, just removing extraneous words and adding consistency, with end goal being every panel following patterns like:</div>
<div><br>
</div>
<div>`/<resources>` - Index page</div>
<div>`/<resources>/<resource_id>` - Detail page for a single resource</div>
<div>`/<resources>/create` - Create new resource</div>
<div>`/<resources>/<resource_id>/update` - Update a resource </div>
<div><br>
</div>
<div>This gets a little complex around nested items. Should a Port for example, which has a unique ID, be reachable in Horizon by just its ID? Ports must always be attached to a network as I understand it. There are multiple ways to express this:</div>
<div><br>
</div>
<div>`/networks/ports/<port_id>` - Current implementation</div>
<div>`/networks/<network_id>/ports/<port_id>` - My preferred structure</div>
<div>`/ports/<port_id>` - Another option</div>
<div><br>
</div>
<div>Does anyone have any opinions on how to handle this structuring, or if it’s even necessary?</div>
<div><br>
</div>
<div>Regards,</div>
<div>Rob</div>
</body>
</html>