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

413 Commits

Author SHA1 Message Date
Jeremy Stretch
fdbef8ee71 Closes #2836: Deprecate NullableCharField 2019-02-14 09:39:04 -05:00
John Anderson
613e8f05c2 fixes #2835 - certain model filters did not support the q query param 2019-01-31 13:36:30 -05:00
Jeremy Stretch
dc70fdbe03 Force string formatting of integer values 2019-01-29 13:57:19 -05:00
Jeremy Stretch
14695037da Strip return characters when removing line breaks 2019-01-18 09:24:32 -05:00
John Anderson
17d6584ef4 removed deprecated code 2019-01-10 21:23:22 -05:00
John Anderson
ad4fb3ce8b IPAM Select2 forms and changelog 2019-01-10 21:19:13 -05:00
John Anderson
6dcd48fef1 Virtulization Select2 forms 2019-01-10 17:32:23 -05:00
John Anderson
bf8d57c7d1 DCIM filter forms select2 2019-01-08 15:35:34 -08:00
John Anderson
6d5d9c8af3 implemented #2590 - improved color picker with actual colors 2019-01-05 17:43:42 -05:00
John Anderson
c27cea981c select2 for all create/edit forms in dcim 2019-01-04 14:41:36 -05:00
John Anderson
fca97f9768 Merge branch 'develop' of github.com:digitalocean/netbox into select2-ui 2019-01-04 12:44:41 -05:00
John Anderson
7a5a73ce34 fixed whitespace 2019-01-04 12:44:31 -05:00
John Anderson
81a0889568 initial static select2 fields 2019-01-03 23:02:05 -05:00
Jeremy Stretch
0a820d9c98 Closes #1871: Enable filtering sites by parent region 2019-01-03 16:59:49 -05:00
Jeremy Stretch
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
John Anderson
5285b6926f updated filter-for attr handling 2019-01-03 03:00:27 -05:00
John Anderson
28a02e9943 initial select2 support 2018-12-30 02:35:18 -05:00
Jeremy Stretch
853b1fad15 Fixes #2712: Preserve list filtering after editing objects in bulk 2018-12-20 15:33:53 -05:00
Jeremy Stretch
f4a22e5af3 Introduced fgcolor template filter to render ideal foreground color for any background color 2018-12-19 12:17:40 -05:00
Jeremy Stretch
aca57ec281 Fixes #2698: Remove pagination restriction on bulk component creation for devices/VMs 2018-12-19 10:59:12 -05:00
dansheps
f499f2dd66 Closes #2693 2018-12-14 11:51:20 -06:00
Jeremy Stretch
8364e56e86 Fixes #2676: Fix exception when passing dictionary value to a ChoiceField 2018-12-11 17:00:20 -05:00
Jeremy Stretch
65edffea63 Merge v2.5 work 2018-12-07 10:51:28 -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
08b4b24296 Fixes #2622: Enable filtering cables by multiple types/colors 2018-11-28 14:22:55 -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
bd7aee7c1f Closes #2614: Simplify calls of super() for Python 3 2018-11-27 10:52:24 -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
John Anderson
fd9b2f2fda cleanup component filters and UI filter forms for device and device type - #2583 2018-11-15 00:42:01 -05:00
John Anderson
3c0181ef35 added logic to append &type=physical to interface API query for cable creation - #2585 2018-11-14 23:35:15 -05:00
Jeremy Stretch
63bd48003e Clean up cable termination types 2018-11-14 12:17:18 -05:00
Jeremy Stretch
bc8dbfde7c Merge branch 'develop' into develop-2.5 2018-11-12 16:03:52 -05:00
Jeremy Stretch
0c33af2140 Fixes #2558: Filter on all tags when multiple are passed 2018-11-12 15:48:58 -05:00
Jeremy Stretch
bb5432de7d PEP8 fix 2018-11-08 11:13:03 -05:00
Jeremy Stretch
338ce737c8 Removed deprecated expand_numeric_pattern() 2018-11-06 15:39:38 -05:00
Jeremy Stretch
f41f141130 Removed unused class NullableModelMultipleChoiceField 2018-11-06 15:32:59 -05:00
Jeremy Stretch
9f0169286b Standardize usage of NaturalOrderingManager 2018-11-06 14:05:23 -05:00
Jeremy Stretch
045856c9ac Introduced a placeholder template filter 2018-11-05 13:00:46 -05:00
Juho Juopperi
319869c22e Update django is_safe_url calls to new API (#2546) 2018-11-05 08:52:00 -05:00
Jeremy Stretch
f8a961b568 Cleaned up import statements 2018-11-02 15:20:08 -04:00
Jeremy Stretch
521a989d23 Removed Python2 hack 2018-11-02 14:59:48 -04:00
Jeremy Stretch
b05171b126 Upgraded django-tables2 to v2.0.2 2018-11-02 14:27:17 -04:00
Jeremy Stretch
bb5c0989f3 Fixed compatability with Django REST Framework v3.9.0 2018-11-02 13:16:44 -04:00
Jeremy Stretch
ad03a0925b Fixed cable type filtering 2018-11-01 10:18:37 -04:00
Jeremy Stretch
5e7fccb64e Add blank choice to ColorSelect widget 2018-11-01 10:14:47 -04:00
Jeremy Stretch
849db8fe44 Finished CableCSVForm 2018-11-01 09:59:53 -04:00
Jeremy Stretch
33cdecbc52 Remove errant print() statement 2018-10-26 14:06:27 -04:00
Jeremy Stretch
83dec3b587 Fixed color display 2018-10-26 13:14:12 -04:00