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

426 Commits

Author SHA1 Message Date
c8cccc30d1 Merge branch 'develop' into develop-2.6 2019-04-02 13:12:34 -04:00
d23ca041cf Ensure fallback to default serializer when attempting to load nested serializer 2019-04-02 11:17:14 -04:00
fc76c8eb0f FieldChoicesViewSet should infer field choices from serializer, not model 2019-03-22 16:24:53 -04:00
0b95016e00 Merge branch 'develop' into develop-2.6 2019-03-11 21:01:18 -04:00
7e70bfaacc Fixes #2985: Fix pagination page length for rack elevations 2019-03-11 12:51:03 -04:00
1995091169 Changelog & renaming for #2065 2019-03-07 13:58:34 -05:00
ef089d3722 Merge pull request #2957 from axnsan12/ref-name
Resolve drf-yasg `ref_name` conflicts
2019-03-07 13:52:29 -05:00
ab02f26a0e Fixes #2972: Improve ContentTypeField serializer to elegantly handle invalid data 2019-03-06 12:42:47 -05:00
c52d077f92 Merge branch 'develop' into develop-2.6 2019-03-05 13:39:00 -05:00
3a62e9a322 Resolve drf-yasg ref_name conflicts
This solves the problem of distinct serializers being confused because they have the same class name (e.g. `InterfaceSerializer`)

Fixes #2065.
2019-03-04 03:49:26 +02:00
f2471aedb2 Fixes #2781: Fixes filter by regions on site and device list 2019-02-27 11:41:12 -06:00
fc2bb724fa initial pass on migrating to custom tag model with color and comments fields 2019-02-20 03:52:47 -05:00
7a0ab3aa15 Fixes #2895: Fix filtering of nullable character fields 2019-02-14 09:43:56 -05:00
fdbef8ee71 Closes #2836: Deprecate NullableCharField 2019-02-14 09:39:04 -05:00
613e8f05c2 fixes #2835 - certain model filters did not support the q query param 2019-01-31 13:36:30 -05:00
dc70fdbe03 Force string formatting of integer values 2019-01-29 13:57:19 -05:00
14695037da Strip return characters when removing line breaks 2019-01-18 09:24:32 -05:00
17d6584ef4 removed deprecated code 2019-01-10 21:23:22 -05:00
ad4fb3ce8b IPAM Select2 forms and changelog 2019-01-10 21:19:13 -05:00
6dcd48fef1 Virtulization Select2 forms 2019-01-10 17:32:23 -05:00
bf8d57c7d1 DCIM filter forms select2 2019-01-08 15:35:34 -08:00
6d5d9c8af3 implemented #2590 - improved color picker with actual colors 2019-01-05 17:43:42 -05:00
c27cea981c select2 for all create/edit forms in dcim 2019-01-04 14:41:36 -05:00
fca97f9768 Merge branch 'develop' of github.com:digitalocean/netbox into select2-ui 2019-01-04 12:44:41 -05:00
7a5a73ce34 fixed whitespace 2019-01-04 12:44:31 -05:00
81a0889568 initial static select2 fields 2019-01-03 23:02:05 -05:00
0a820d9c98 Closes #1871: Enable filtering sites by parent region 2019-01-03 16:59:49 -05:00
6ca045e1a9 Merge pull request #2694 from DanSheps/2693-fiber-cable-colors
Closes #2693 - Adds additional colors for cables & roles
2019-01-03 15:24:36 -05:00
5285b6926f updated filter-for attr handling 2019-01-03 03:00:27 -05:00
28a02e9943 initial select2 support 2018-12-30 02:35:18 -05:00
853b1fad15 Fixes #2712: Preserve list filtering after editing objects in bulk 2018-12-20 15:33:53 -05:00
f4a22e5af3 Introduced fgcolor template filter to render ideal foreground color for any background color 2018-12-19 12:17:40 -05:00
aca57ec281 Fixes #2698: Remove pagination restriction on bulk component creation for devices/VMs 2018-12-19 10:59:12 -05:00
f499f2dd66 Closes #2693 2018-12-14 11:51:20 -06:00
8364e56e86 Fixes #2676: Fix exception when passing dictionary value to a ChoiceField 2018-12-11 17:00:20 -05:00
65edffea63 Merge v2.5 work 2018-12-07 10:51:28 -05:00
2a07e8f3f0 Move queryset_to_csv() utility into ObjectListView to allow overriding by individual views 2018-12-05 16:35:59 -05:00
686a65880e Closes #2495: Enable deep-merging of config context data 2018-12-05 14:34:49 -05:00
08b4b24296 Fixes #2622: Enable filtering cables by multiple types/colors 2018-11-28 14:22:55 -05:00
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
bd7aee7c1f Closes #2614: Simplify calls of super() for Python 3 2018-11-27 10:52:24 -05:00
7d8ae5e763 Fixes #2609: Fixed exception when ChoiceField integer value is passed as a string 2018-11-26 14:05:57 -05:00
2bae50f501 Enforce consistent ordering of value/label keys for ChoiceField 2018-11-26 14:02:38 -05:00
fd9b2f2fda cleanup component filters and UI filter forms for device and device type - #2583 2018-11-15 00:42:01 -05:00
3c0181ef35 added logic to append &type=physical to interface API query for cable creation - #2585 2018-11-14 23:35:15 -05:00
63bd48003e Clean up cable termination types 2018-11-14 12:17:18 -05:00
bc8dbfde7c Merge branch 'develop' into develop-2.5 2018-11-12 16:03:52 -05:00
0c33af2140 Fixes #2558: Filter on all tags when multiple are passed 2018-11-12 15:48:58 -05:00
bb5432de7d PEP8 fix 2018-11-08 11:13:03 -05:00
338ce737c8 Removed deprecated expand_numeric_pattern() 2018-11-06 15:39:38 -05:00