1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

2338 Commits

Author SHA1 Message Date
Jeremy Stretch
93c95fdfa8 Post-release version bump 2018-12-10 10:29:51 -05:00
Jeremy Stretch
acbe5f6418 Release v2.5.0 2018-12-10 10:22:32 -05:00
Jeremy Stretch
7d4fa69595 Fixes #2657: Fix typo 2018-12-10 09:54:30 -05:00
Jeremy Stretch
44a2919a29 Django 2.1 requires Python 3.5+ 2018-12-07 14:44:36 -05:00
Jeremy Stretch
77fbc42f75 Relax Python version requirement to 3.4 2018-12-07 14:29:17 -05:00
Jeremy Stretch
65edffea63 Merge v2.5 work 2018-12-07 10:51:28 -05:00
Jeremy Stretch
869194354c Release v2.4.9 2018-12-07 10:19:57 -05:00
Jeremy Stretch
aa8c836b94 Closes #2611: Fix error handling when assigning a clustered device to a different site 2018-12-07 09:57:55 -05:00
Jeremy Stretch
9689ba2c4f Fix representation of connected_endpoint_type for non-connected components 2018-12-06 16:39:03 -05:00
Jeremy Stretch
703be259fd Normalize connection_status for non-connected device components during migration 2018-12-06 16:32:42 -05:00
Jeremy Stretch
45a1dfbd8a Closes #2649: Add connected_endpoint_type to connectable device component API representations 2018-12-06 16:14:03 -05:00
Jeremy Stretch
360303f86c Closes #2474: Add cabled and connection_status filters for device components 2018-12-06 12:39:12 -05:00
Jeremy Stretch
64d37cd450 Closes #2648: Include the connection_status field in nested represenations of connectable device components 2018-12-06 12:14:54 -05:00
Jeremy Stretch
71dee2758b Simplified filter_device() for Interfaces 2018-12-06 11:33:24 -05:00
Jeremy Stretch
870edbb44a Fixes #2626: Remove extraneous permissions generated from proxy models 2018-12-05 16:53:58 -05:00
Jeremy Stretch
2a07e8f3f0 Move queryset_to_csv() utility into ObjectListView to allow overriding by individual views 2018-12-05 16:35:59 -05:00
Jeremy Stretch
686a65880e Closes #2495: Enable deep-merging of config context data 2018-12-05 14:34:49 -05:00
Jeremy Stretch
d3d6c83fbb Fixes #2634: Enforce consistent representation of unnamed devices in rack view 2018-12-04 15:29:58 -05:00
Jeremy Stretch
f0874f4be0 Add missing choices for new cable and rack fields 2018-12-04 15:15:40 -05:00
Jeremy Stretch
dffa2d3556 Closes #2632: Change representation of null values from 0 to 'null' 2018-12-04 15:09:07 -05:00
Jeremy Stretch
7bbf33ee39 Don't force the docs to open in a new window 2018-12-04 09:44:25 -05:00
John Anderson
0dcab07519 fixes #2623 - model class being passed to rqworker 2018-12-04 00:40:54 -05:00
Jeremy Stretch
a3ade01224 Fixes #2639: Fix preservation of length/dimensions unit for racks and cables 2018-12-03 11:13:37 -05:00
Jeremy Stretch
d1cd366dc9 Fixes #2616: Convert Rack outer_unit and Cable length_unit to integer-based choice fields 2018-11-30 12:26:28 -05:00
Jeremy Stretch
ca0248c3a2 Closes #2089: Add SONET interface form factors 2018-11-30 09:28:56 -05:00
Jeremy Stretch
a43fc0d3d3 Closes #2560: Add slug to DeviceType UI view 2018-11-28 16:19:05 -05:00
Jeremy Stretch
08b4b24296 Fixes #2622: Enable filtering cables by multiple types/colors 2018-11-28 14:22:55 -05:00
Jeremy Stretch
5acd429c55 Fixes #2624: Delete associated content type and permissions when removing InterfaceConnection model 2018-11-28 13:45:02 -05:00
Jeremy Stretch
6c2a9107dd Closes #2597: Add FibreChannel SFP28 (32GFC) interface form factor 2018-11-28 09:56:48 -05:00
Jeremy Stretch
c6d048ca51 Fixes #2576: Correct type for count_* fields in site API representation 2018-11-27 16:27:47 -05:00
Tatsushi Demachi
c3cdf8e97e Fix type mismatches in API view (#2429)
* Fix tags field to be shown as array in API view

`tags` field in serializers is defineded as `TagListSerializerField`.
It should be shown as an array value in API view but actually, it is a
simple string value.

This fixes it by introducing a new `FieldInspector` to handle
`TagListSerializerField` type field as an array. It doesn't affects any
other type fields.

* Fix SerializedPKRelatedField type API expression

A field definded as `SerializedPKRelatedField` should be shown as an
array of child serializer objects in a response value definition in API
view but it is shown as an array of primary key values (usually
`integer` type) of a child serializer.

This fixes it by introducing a new `FieldInspector` to handle the field.
It doesn't affect any other type fields.

* Fix request parameter representation in API view

In API view, representation of a parameter defined as a sub class of
`WritableNestedSerializer` should be vary between a request and a
response. For example, `tenant` field in `IPAddressSerializer` should be
shown like following as a request body:

```
tenant: integer ...
```

while it should be shown like following as a response body:

```
tenant: {
    id: integer ...,
    url: string ...,
    name: string ...,
    slug: string ...
}
```

But in both cases, it is shown as a response body type expression. This
causes an error at sending an API request with that type value.

It is only an API view issue, API can handle a request if a request
parameter is structured as an expected request body by ignoring the
wrong expression.

This fixes the issue by replacing an implicitly used default auto schema
generator class by its sub class and returning a pseudo serializer with
'Writable' prefix at generating a request body. The reason to introduce
a new generator class is that there is no other point which can
distinguish a request and a response. It is not enough to distinguish
POST, PUT, PATCH methods from GET because former cases may return a JSON
object as a response but it is also represented as same as a request
body, causes another mismatch.

This also fixes `SerializedPKRelatedField` type field representation. It
should be shown as an array of primary keys in a request body.

Fixed #2400
2018-11-27 16:14:45 -05:00
Jeremy Stretch
d2744700c6 Fixes #2615: Tweak live search widget to use brief format for API requests 2018-11-27 12:41:00 -05:00
Jeremy Stretch
5d07a5a670 Fixes #2613: Decrease live search minimum characters to three 2018-11-27 12:20:52 -05:00
Jeremy Stretch
4da755e75f Formatting cleanup 2018-11-27 11:57:29 -05:00
Jeremy Stretch
bd7aee7c1f Closes #2614: Simplify calls of super() for Python 3 2018-11-27 10:52:24 -05:00
Jeremy Stretch
3f1b42d466 Release v2.5-beta2 2018-11-26 16:27:57 -05:00
Daniel Sheppard
7346083b26 Fixes #2606 - Added MultipleChoiceFilter for form_factor (#2610)
* Fixes #2606 - Added MultipleChoiceFilter for form_factor

* Fixes #2606 - Add MultipleChoiceField for form_factor
Fixes error with too many lines.
2018-11-26 14:19:05 -05:00
Tyler Bigler
f052bbc36e Refactor Extras Migration Version Check (#2604)
* Add constant for DB_MINIMUM_VERSION

* Refactor verify_postgresql_version to use Django connection pg_version method for comparing versions.

* Remove StrictVersion import

* Remove DB_MINIMUM_VERSION as not necessary in constants.

* Define DB_MINIMUM_VERSION locally to freeze to migration.

* Refactor database version verification to use django builtin methods.
2018-11-26 14:16:37 -05:00
Jeremy Stretch
7d8ae5e763 Fixes #2609: Fixed exception when ChoiceField integer value is passed as a string 2018-11-26 14:05:57 -05:00
Jeremy Stretch
2bae50f501 Enforce consistent ordering of value/label keys for ChoiceField 2018-11-26 14:02:38 -05:00
Jeremy Stretch
a46f68c6e4 Fixes #2608: Fixed null outer_unit error on rack import 2018-11-26 13:41:35 -05:00
Jeremy Stretch
d59be2912e Closes #2601: Added a description field to pass-through ports 2018-11-20 21:28:19 -05:00
Jeremy Stretch
240d22696f Strip annotations from queryset when retrieving object count for API pagination 2018-11-20 21:02:06 -05:00
Jeremy Stretch
89622f1ddf Fixes #2602: Return HTTP 204 when no new IPs/prefixes are available for provisioning 2018-11-20 13:03:59 -05:00
Jeremy Stretch
874acab90f Merge v2.4.8 2018-11-20 12:28:24 -05:00
Jeremy Stretch
34bfb899d1 Post-release version bump 2018-11-20 11:58:19 -05:00
Jeremy Stretch
55c153c5a9 Release v2.4.8 2018-11-20 11:56:14 -05:00
Jeremy Stretch
c29ae9b785 Added missing import buttons to cables list 2018-11-20 09:41:38 -05:00
Jeremy Stretch
5ce955a719 Fixed toggling of connection status for cable path endpoints 2018-11-20 09:23:30 -05:00
Jeremy Stretch
8c3a294384 Standardized behavior and display of connection_status 2018-11-19 15:26:06 -05:00