Increment/Decrement Integer on Site AS Number Does not Function (Chrome/Safari) #3137

Closed
opened 2025-12-29 18:26:02 +01:00 by adam · 4 comments
Owner

Originally created by @jvanderaa on GitHub (Jan 9, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: v2.7 beta1 & v2.7 beta2

Steps to Reproduce

A. Open Google Chrome 79.0.3945.88 (MacOS)

  1. Go to sites
  2. Edit a site
  3. Click on the integer increment button

Firefox works just fine. Safari has a whole different issue (report coming soon). Not sure if this is a browser function or a function of a library Netbox uses?

Expected Behavior

Expected to have the integers increment and decrement based on number of mouse clicks.

Observed Behavior

The number stays the same

Originally created by @jvanderaa on GitHub (Jan 9, 2020). ### Environment * Python version: 3.6.8 * NetBox version: v2.7 beta1 & v2.7 beta2 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a wrapper like pynetbox. --> ### Steps to Reproduce A. Open Google Chrome 79.0.3945.88 (MacOS) 1. Go to sites 2. Edit a site 3. Click on the integer increment button Firefox works just fine. Safari has a whole different issue (report coming soon). Not sure if this is a browser function or a function of a library Netbox uses? <!-- What did you expect to happen? --> ### Expected Behavior Expected to have the integers increment and decrement based on number of mouse clicks. <!-- What happened instead? --> ### Observed Behavior The number stays the same
adam added the type: bugstatus: accepted labels 2025-12-29 18:26:02 +01:00
adam closed this issue 2025-12-29 18:26:02 +01:00
Author
Owner

@hSaria commented on GitHub (Jan 9, 2020):

This currently happens on the latest stable version, v2.6.11.

@hSaria commented on GitHub (Jan 9, 2020): This currently happens on the latest stable version, v2.6.11.
Author
Owner

@hSaria commented on GitHub (Jan 9, 2020):

This seems to be caused by the min and max attributes being set to absurdly high numbers due to the ASNField inheriting from models.BigIntegerField.

<input type="number" name="asn" min="-9223372036854775808" max="9223372036854775807" class="form-control" placeholder="ASN" id="id_asn">
@hSaria commented on GitHub (Jan 9, 2020): This seems to be caused by the `min` and `max` attributes being set to absurdly high numbers due to the `ASNField` inheriting from `models.BigIntegerField`. ```html <input type="number" name="asn" min="-9223372036854775808" max="9223372036854775807" class="form-control" placeholder="ASN" id="id_asn"> ```
Author
Owner

@jeremystretch commented on GitHub (Jan 9, 2020):

absurdly high numbers

Well excuse me for future-proofing! 😛

The root issue is that we use a BigInt for the field (dcim.fields.ASNField) to hold a 32-bit value, which does have intelligent min/max values defined, however they aren't getting replicated to the field's widget. We should be able to set these widget attributes directly on ASNField.

@jeremystretch commented on GitHub (Jan 9, 2020): > absurdly high numbers Well excuse me for future-proofing! :stuck_out_tongue: The root issue is that we use a `BigInt` for the field (`dcim.fields.ASNField`) to hold a 32-bit value, which does have intelligent min/max values defined, however they aren't getting replicated to the field's widget. We should be able to set these widget attributes directly on `ASNField`.
Author
Owner

@hSaria commented on GitHub (Jan 9, 2020):

No need to set them via the widget. Check out #3879.

Well excuse me for future-proofing!

Yeah, just accounting for the day we start handing out ASNs to every household.

@hSaria commented on GitHub (Jan 9, 2020): No need to set them via the widget. Check out #3879. > Well excuse me for future-proofing! Yeah, just accounting for the day we start handing out ASNs to every household.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3137