Commit Graph

601 Commits

Author SHA1 Message Date
Saria Hajjar
7ddc8962fc Fixes #3857: Fix group custom links rendering 2020-01-08 10:14:48 +00:00
Jeremy Stretch
ab7bb5c374 Merge branch 'develop' into develop-2.7 2020-01-02 17:21:15 -05:00
Jeremy Stretch
a7ec448ea3 Merge pull request #3820 from hSaria/3819-cf-boolean-select2
Select2 for custom fields
2020-01-02 10:11:32 -05:00
Saria Hajjar
3398ad9e0e Select2 for custom fields 2020-01-01 23:46:51 +00:00
Jeremy Stretch
0c68630725 Close #2892: Extend admin UI to allow deleting old report results 2019-12-31 16:11:47 -05:00
Jeremy Stretch
56fca9414d Closes #3461: Fail gracefully on custom link rendering exception 2019-12-31 15:04:56 -05:00
Jeremy Stretch
22bb9f42a6 Introduce render_jinja2() convenience function 2019-12-31 14:00:55 -05:00
Saria Hajjar
aa75fd0614 Add datetime widgets 2019-12-28 22:55:00 +00:00
Jeremy Stretch
5041e76d47 Merge pull request #3793 from struppinet/develop
Closes #3663: add Filter Tests
2019-12-27 14:14:55 -05:00
struppi
2940e84346 Closes #3663: improve tests 2019-12-26 22:21:05 +01:00
Jeremy Stretch
62d2a6fb6c Merge pull request #3775 from steffann/3705-make-current-user-available-in-custom-scripts
Add request to Custom Script run, if receiver supports it
2019-12-26 10:04:07 -05:00
struppi
127b54b8b8 Closes #3663: fix PEP errors 2019-12-26 12:26:41 +01:00
struppi
49e1723ca2 Closes #3663: add Filter Tests 2019-12-25 18:41:59 +01:00
Sander Steffann
59b168062a Implement request passing as a property of Script 2019-12-19 23:35:18 +01:00
Jeremy Stretch
0cfc27b58b Fixes #3780: Fix AttributeError exception in API docs 2019-12-19 14:04:18 -05:00
Jeremy Stretch
b1863c6ffd Fixes #2358: Respect custom field default values when creating objects via the REST API 2019-12-13 14:15:48 -05:00
Jeremy Stretch
cfe79dc6e2 Fix bug left over from work on #3569 2019-12-11 16:16:14 -05:00
Jeremy Stretch
a5476108ee Represent and assign ConfigContext tags by their slugs 2019-12-11 16:04:43 -05:00
Jeremy Stretch
5243334508 Cleanup for #3664 2019-12-11 15:55:33 -05:00
Jeremy Stretch
c7232674a1 Introduce is_taggable utility function for identifying taggable models 2019-12-11 15:52:35 -05:00
Jeremy Stretch
2c95b95d67 Merge pull request #3752 from kobayashi/3664
implement 3664
2019-12-11 14:14:48 -05:00
Sander Steffann
e85889a405 Implement storage configuration as suggested by @jeremystretch 2019-12-11 16:09:32 +01:00
Sander Steffann
837db7708a Merge branch '1814-Ability_to_use_object_store_for_images' of github.com:steffann/netbox into 1814-Ability_to_use_object_store_for_images 2019-12-11 15:23:47 +01:00
Sander Steffann
4aeca05ea1 Add support for S3 storage for media 2019-12-11 15:19:32 +01:00
kobayashi
6f4eeaa83a implement 3664 2019-12-11 04:58:42 -05:00
Jeremy Stretch
3eb2c631c7 Closes #3408: Remove WEBHOOKS_ENABLE configuration setting 2019-12-06 11:52:28 -05:00
Jeremy Stretch
ad9d33550f Closes #3731: Change Graph.type to a ContentType foreign key field 2019-12-06 10:32:59 -05:00
Sander Steffann
86261fec08 Don't redefine exception but split the code 2019-12-06 16:32:18 +01:00
Jeremy Stretch
e4ffd4a5cc Merge branch 'develop-2.7' into 3569-api-choice-slugs 2019-12-05 17:43:11 -05:00
Jeremy Stretch
d6557b63f6 Webhook.http_content_type to slug (#3569) 2019-12-05 17:11:59 -05:00
Jeremy Stretch
ef3d772894 ExportTemplate.template_language to slug (#3569) 2019-12-05 17:01:00 -05:00
Jeremy Stretch
b2904050aa Delete obsolete user action types 2019-12-05 16:50:44 -05:00
Jeremy Stretch
b4859d4fcc Remain consistent with original action strings (e.g. 'created' instead of 'create') 2019-12-05 16:42:10 -05:00
Jeremy Stretch
ba17918d01 Fix changelog table action labels 2019-12-05 16:37:22 -05:00
Jeremy Stretch
0a72225ca9 ObjectChange.action to slug (#3569) 2019-12-05 16:30:15 -05:00
Jeremy Stretch
e447a255c2 Extend CustomField migration to update CustomFieldChoice.field.limit_choices_to 2019-12-05 16:02:52 -05:00
Jeremy Stretch
4ffd91d882 Convert BUTTON_CLASS_CHOICES to a ChoiceSet 2019-12-05 15:59:16 -05:00
Sander Steffann
9b9a9bf8f5 822 bulk import of device components (#3711)
Closes #822: CSV import for device components

* Implement CSV import for netbox-community#822

* Comment out default_return_url until there is a proper target

* Fix the default value of `enabled` when not included in the import

* rear_port is definitely required here

* Power Ports don't have a type (yet)

* Add import for console-ports and console-server-ports

* Add import for device-bays
2019-12-05 15:36:11 -05:00
Jeremy Stretch
4a662c437f CustomField.filter_logic to slug 2019-12-04 21:09:02 -05:00
Jeremy Stretch
0e0cdc65c0 CustomField.type to slug 2019-12-04 21:01:50 -05:00
Jeremy Stretch
7e155898d2 Rename CreatedUpdatedFilter to CreatedUpdatedFilterSet 2019-11-14 22:00:12 -05:00
Jeremy Stretch
865d50e5b6 'base_name' deprecated in DRF v3.9.0 2019-11-14 21:58:37 -05:00
struppi
eb03fd7a0f Closes #3663: rename filter class 2019-11-07 22:41:09 +01:00
struppi
3a3e03bdd7 Closes #3663: PEP8 fixes 2019-11-07 22:38:51 +01:00
struppi
0a287420dc Closes #3663: API filter by created, last_updated 2019-11-04 20:51:56 +01:00
Sander Steffann
fb43e92865 Add support for S3 storage for media 2019-11-03 14:16:12 +03:00
Jeremy Stretch
01ac6d560d Merge branch 'develop' into develop-2.7 2019-11-01 16:19:36 -04:00
Jeremy Stretch
d3bfe80326 Closes #3659: Add filtering for objects in admin UI 2019-11-01 12:22:39 -04:00
Jeremy Stretch
6d888421d1 Only use module.name for human-facing display 2019-10-30 09:13:26 -04:00
Jeremy Stretch
36ce1b1c78 Add tests for custom script API 2019-10-29 16:54:27 -04:00
Jeremy Stretch
c34c4f2509 Improve script output serialization 2019-10-29 16:17:59 -04:00
Jeremy Stretch
88d3cc8498 Initial work on #3538: script execution API 2019-10-28 15:02:21 -04:00
Jeremy Stretch
c84e608f8e Merge pull request #3632 from netbox-community/3309-changelog-middleware
Rewrite change logging middleware
2019-10-25 09:47:32 -04:00
Jeremy Stretch
ebde65d1b2 Closes #3594: Add ChoiceVar for custom scripts 2019-10-23 15:59:27 -04:00
Jeremy Stretch
5fd9b27f9b Fix reporting of custom fields in webhook data on object deletion 2019-10-22 16:12:25 -04:00
Jeremy Stretch
b6beb37e36 Rewrote ObjectChangeMiddleware to remove the curried handle_deleted_object() function 2019-10-22 15:10:49 -04:00
Jeremy Stretch
bf54bb682e Merge pull request #3604 from netbox-community/3282-seperate-redis-config
implements #3282 - seperate webhooks and caching redis configs
2019-10-17 16:03:26 -04:00
Jeremy Stretch
c7d6f6e1c9 Rebase schema migrations 2019-10-17 15:53:10 -04:00
Jeremy Stretch
e65570dd48 Merge branch 'develop' into develop-2.7 2019-10-17 15:51:33 -04:00
Jeremy Stretch
c741e0dc43 Deleted errant import of graphviz 2019-10-17 15:43:49 -04:00
John Anderson
8d8ad02831 implemented #3445 - Add support for additional user defined headers to be added to webhook requests 2019-10-13 03:09:58 -04:00
John Anderson
8895c415ed implements #3282 - seperate webhooks and caching redis configs 2019-10-13 02:49:54 -04:00
John Anderson
214c976b22 Merge branch 'develop' into develop-2.7 2019-10-13 02:03:16 -04:00
John Anderson
45806c312a implemented #3499 - Add to Webhook model to support user supplied CA certificate verrification of webhook requests 2019-10-13 01:43:08 -04:00
Jeremy Stretch
5d179d54d1 Merge branch 'develop' into develop-2.7 2019-10-10 13:41:10 -04:00
Jeremy Stretch
e705f4c3e4 Fixes #3588: Enforce object-form JSON for local context data on devices and VMs 2019-10-10 10:41:08 -04:00
Jeremy Stretch
46eb858a26 Closes #3581: Introduce commit_default custom script attribute to not commit changes by default 2019-10-09 15:16:50 -04:00
Jeremy Stretch
644b793b0a Closes #3545: Add MultiObjectVar for custom scripts 2019-10-09 15:06:00 -04:00
Jeremy Stretch
ce1c894c8b Closes #3580: Render text and URL fields as textareas in the custom link form 2019-10-09 09:40:24 -04:00
Jeremy Stretch
b4acade70d Miscellaneous cleanup 2019-10-04 12:59:10 -04:00
Jeremy Stretch
e861c984c7 Merge branch 'develop' into develop-2.7 2019-09-25 13:44:29 -04:00
Jeremy Stretch
ee0865478e Closes #3515: Enable export templates for inventory items 2019-09-25 12:07:41 -04:00
Jeremy Stretch
b87689cf27 Closes #3352: Enable filtering changelog API by changed_object_id 2019-09-25 10:11:41 -04:00
Jeremy Stretch
429fe9223a Merged v2.6.4 2019-09-20 08:35:14 -04:00
Jeremy Stretch
f426334c2e Closes #3485: Enable embedded graphs for devices 2019-09-18 15:59:52 -04:00
Jeremy Stretch
7f641c77f5 Fixes #3514: Label TextVar fields when rendering custom script forms 2019-09-18 15:39:26 -04:00
Jeremy Stretch
aedffce736 Closes #3510: Add minimum/maximum prefix length enforcement for IPNetworkVar 2019-09-17 16:36:36 -04:00
Jeremy Stretch
796917beac Fixes #3501: Fix rendering of checkboxes on custom script forms 2019-09-13 11:45:35 -04:00
Jeremy Stretch
5dd61562f7 Fixes #3489: Prevent exception triggered by webhook upon object deletion 2019-09-09 15:50:10 -04:00
Daniel Sheppard
7968515af0 Add filter for has local context data (#3159)
* Add filter for has local context data
* Broke out filter and form for re-use
* Fix missing StaticSelect2 import
* Fix missing BOOLEAN_WITH_BLANK_CHOICES import
* Fix class resolution
* Fix field ordering
* Fix PEP8 errors
2019-09-06 11:42:56 -05:00
Jeremy Stretch
f9cd812837 Renumber remove_topology_maps migration 2019-09-05 10:25:44 -04:00
Jeremy Stretch
212252d0ea Merge v2.6.3 2019-09-04 16:45:33 -04:00
Jeremy Stretch
3f87bdf5c4 Closes #3456: Enable bulk editing of tag color 2019-08-28 11:56:00 -04:00
Jeremy Stretch
0294f803a1 Fixes #3392: Add database index for ObjectChange time 2019-08-28 10:48:19 -04:00
Jeremy Stretch
21c196444e Simplify changelog cleanup logic 2019-08-28 10:44:05 -04:00
Jeremy Stretch
45f5ec7e60 Add tests for changelog 2019-08-28 10:18:37 -04:00
Jeremy Stretch
c251f32fbc Fixes #3452: Queue deletion ObjectChanges until after response is sent 2019-08-26 16:52:05 -04:00
Jeremy Stretch
0a18c86bfa Merge pull request #3423 from netbox-community/3415-custom-scripts
Add custom scripting
2019-08-26 14:06:22 -04:00
Jeremy Stretch
15a0240df0 Fix errant changelog entries when executing a script without committing 2019-08-26 11:59:38 -04:00
John Anderson
68c6c8b642 Merge branch 'develop' into 3428-cache-invalidation 2019-08-20 17:35:54 -04:00
Jeremy Stretch
ed6dc806a0 Introduce BaseScript for extending Script without creating a new executable script 2019-08-19 14:40:08 -04:00
Jeremy Stretch
1afa97f454 Import Django User model automatically when running nbshell 2019-08-19 11:47:50 -04:00
Jeremy Stretch
9d1516cadc Add tests for Script Variables 2019-08-19 10:41:44 -04:00
John Anderson
8bd1a48973 fixes #3428 - caching invalidation issues
Mitgate invalidation issues by using prefetch_related instead of select_related.
Also use invalidated_update instead of just update.
2019-08-19 01:53:39 -04:00
Jeremy Stretch
c8c6c783b2 Add FileVar for file uploads 2019-08-16 15:27:58 -04:00
Jeremy Stretch
bfd73db5b6 Change fields to field_order 2019-08-15 16:19:25 -04:00
Jeremy Stretch
f4b2015f1d Add TextVar for large text entry 2019-08-14 16:20:52 -04:00
Jeremy Stretch
9931d4d1a0 Add markdown rendering for log mesages 2019-08-14 14:38:11 -04:00
Jeremy Stretch
502e745509 Include stack trace when catching an exception 2019-08-14 14:26:13 -04:00
Jeremy Stretch
f0ec068650 Use TreeNodeChoiceField for MPTT objects 2019-08-14 14:03:11 -04:00
Jeremy Stretch
81bb6a59e2 Add convenience functions for loading YAML/JSON data from file 2019-08-14 13:08:21 -04:00
Jeremy Stretch
500eb63d9f Fix notice when form does not require user input 2019-08-14 10:18:25 -04:00
Jeremy Stretch
ce43e5f6ea Record script execution time 2019-08-14 10:12:30 -04:00
Jeremy Stretch
52de9d227a Tweak form display (cosmetic) 2019-08-14 09:40:23 -04:00
Jeremy Stretch
a0d181728a Add IPNetworkVar 2019-08-13 09:48:51 -04:00
Jeremy Stretch
f1e12213e7 Allow user to override module name 2019-08-13 09:09:12 -04:00
Jeremy Stretch
fc9a5c5cd1 Meta.fields should be optional 2019-08-12 16:59:09 -04:00
Jeremy Stretch
90bb0d47df Add option to commit database changes 2019-08-12 14:28:06 -04:00
Jeremy Stretch
ab16af1265 Implemented run_script() wrapper 2019-08-12 13:51:25 -04:00
Jeremy Stretch
eeacd04483 Move script attributes under a Meta class 2019-08-12 13:16:18 -04:00
Jeremy Stretch
cad46f81e6 Implemented permissions for scripts 2019-08-12 11:39:36 -04:00
Jeremy Stretch
8312a23056 BooleanVar cannot be required 2019-08-12 11:13:16 -04:00
Jeremy Stretch
1331072d92 Fix form field ordering 2019-08-12 11:13:16 -04:00
Jeremy Stretch
49a23f1fe9 Add options for script vars; include script output 2019-08-12 11:13:16 -04:00
Jeremy Stretch
f602ffbca7 Initial work on custom scripts (#3415) 2019-08-12 11:13:16 -04:00
Jeremy Stretch
0674e9572f Closes #2745: Remove topology maps 2019-08-08 21:33:20 -04:00
Jeremy Stretch
99d60dbfbd Closes #3314: Paginate object changelog entries 2019-07-18 21:40:36 -04:00
Jeremy Stretch
ad21710114 Fixes #3317: Fix permissions for ConfigContextBulkDeleteView 2019-07-02 09:39:26 -04:00
Jeremy Stretch
fa284c1ade Closes #3281: Hide custom links which render as empty text 2019-06-24 12:20:09 -04:00
Jeremy Stretch
5081486a1f Fixes #3279: Reset the PostgreSQL sequence for Tag and TaggedItem IDs 2019-06-21 17:34:06 -04:00
Jeremy Stretch
b76ff67de7 Fix test for tags view 2019-06-05 15:05:35 -04:00
Jeremy Stretch
35fb3f599c Add missing PermissionRequiredMixin to TagListView 2019-06-05 14:47:43 -04:00
Jeremy Stretch
31ed16335a Merged v2.5.13 2019-05-31 21:37:41 -04:00
Jeremy Stretch
e5094ca6b4 Remove request.user assertion from ObjectChangeMiddleware 2019-05-30 10:32:09 -04:00
Jeremy Stretch
1c807fa212 Closes #3185: Improve performance for custom field access within templates 2019-05-29 15:04:57 -04:00
hellerve
d264c5f011 urls: fix 3168 by changing url to path 2019-05-26 14:56:00 +02:00
Jeremy Stretch
53257a5838 Fixes #3190: Fix custom field rendering for Jinja2 export templates 2019-05-16 19:45:36 -04:00
Jeremy Stretch
9c597d7a96 Cleanup from #2931 2019-05-09 14:32:49 -04:00
dansheps
92f18d9076 Merge branch 'develop' of https://github.com/digitalocean/netbox into 2813-addtenantgroupfilter 2019-04-30 10:01:29 -05:00
Jeremy Stretch
d907037461 Fix erroneous merge conflict resolution from v2.5.11 2019-04-29 14:57:28 -04:00
Jeremy Stretch
c89a155f67 Merge v2.5.11 2019-04-29 14:40:18 -04:00
Jeremy Stretch
365825af5f Fixes #3116: Fix tagged_items count in tags API endpoint 2019-04-26 16:54:13 -04:00
John Anderson
5489f42681 closes #3104 - add support for exposing prometheus metrics 2019-04-25 01:09:19 -04:00
Jeremy Stretch
5f597c12de Cleanup from earlier work on caching 2019-04-22 14:49:31 -04:00
Jeremy Stretch
879cfb6a8f Increase length of CustomLink text and url fields 2019-04-19 14:58:55 -04:00
Jeremy Stretch
94837647d7 Misc cleanup 2019-04-19 14:56:40 -04:00
John Anderson
cf64c21cac Merge pull request #3080 from digitalocean/2647-cacheops
change cacheing to use cacheops
2019-04-19 01:41:59 -04:00
Jeremy Stretch
3fef0a1d2b Improve the logic for gathering models from all apps 2019-04-17 14:33:26 -04:00
Jeremy Stretch
7fd56d9a06 Clean up, update Webhook models 2019-04-17 14:19:57 -04:00
Jeremy Stretch
9c7074c529 Clean up limit_to for ForeignKeys referencing ContentType 2019-04-17 13:36:05 -04:00
John Anderson
65f357ff85 change cacheing to use cacheops 2019-04-17 12:29:21 -04:00
Jeremy Stretch
5f103e6aab Add limit_choices_to to CustomLink.content_type field 2019-04-15 21:53:22 -04:00
Jeremy Stretch
489d0f809c Merge pull request #3074 from digitalocean/969-custom-links
969 custom links
2019-04-15 21:43:17 -04:00
Jeremy Stretch
c7a70e3821 Add custom links to templates 2019-04-15 21:38:04 -04:00
Jeremy Stretch
ebb384f395 Custom link cleanup 2019-04-15 21:29:02 -04:00
Jeremy Stretch
c20028cb69 Initial work on #969: Custom links 2019-04-15 17:12:41 -04:00
John Anderson
0596a9a160 move caching to views 2019-04-15 14:41:04 -04:00
John Anderson
aae36cdce2 intial work on #2647 - caching 2019-04-15 03:55:33 -04:00
Jeremy Stretch
10f6b96b02 Enforce view permissions for UI views 2019-04-11 17:27:38 -04:00
dansheps
e0f27656b5 Move Filter and Form to new file, update all files 2019-04-10 08:37:12 -05:00