Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When adding a new cable, default to the properties of the last added cable #3180

Closed
candlerb opened this issue May 10, 2019 · 4 comments
Closed

Comments

@candlerb
Copy link
Contributor

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5.12

Proposed Functionality

When adding a new cable, there are a number of cable properties which can be selected: Status, Type, Label, Color, Length, Units.

I propose that all the values of these settings apart from Label are retained in the session and used as defaults for the next cable you create.

(Optionally can have a "clear" button to reset them all to empty)

Use Case

I am adding a bunch of cables one by one. When doing this they are often the same type of cable each time: so for example, for each one I need to set Type=Singlemode Fibre, Color=Yellow, Length=100, Units=Centimeters.

Having these default to the value of the previous cable would save a lot of mousing around.

Database Changes

None

External Dependencies

None

@tb-killa
Copy link
Contributor

This sounds like a template function for creating connections.
Nice idea maybe this would be some general function.

@candlerb
Copy link
Contributor Author

I think that's a separate idea. A template would be pretty much a "Cable Type" - in which case you could define cable types and select between them, with the most recently used ones at the top of the list. There is something to be said for this - e.g. if I receive a delivery of 3m blue CAT5e cables, then I could add them as a cable type.

But Netbox doesn't have cable types at the moment; everything is just an attribute of the cable.

@jeremystretch
Copy link
Member

#648 is open to address improvements to the "create and add another" function.

I propose that all the values of these settings apart from Label are retained in the session and used as defaults for the next cable you create.

This would require introducing an entirely new concept (session-based preferences) similar to #492 and #1426. We don't have the development bandwidth to undertake something like that currently, but it may be worth revisiting once support for one or both of those features has been addressed.

@candlerb
Copy link
Contributor Author

candlerb commented Jun 4, 2019

It's not exactly session-based preferences, just a question of defaults based on the last accessed cable.

Actually there are two basic workflows I find particularly painful at the moment:

  1. Creating a bunch of cables, where the cables are all the same type/length/colour
  2. Moving one endpoint of a cable. This involves deleting the cable entirely and then recreating it with exactly the same parameters (so I have to remember, and re-select, the type/colour/length/units).

If the page for creation of a cable were to default to the parameters of the most recently created/edited/deleted cable, then this would smooth things a bit, at least until a more sophisticated UI for adding cables can be made.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants