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

1621 Commits

Author SHA1 Message Date
Arthur
f7150645a1 8749 clone custom fields 2023-03-14 15:44:16 -04:00
Jeremy Stretch
8bd0a2ef9d Closes #11826: RSS feed widget (#11976)
* Add feedparser as a dependency

* Introduce RSSFeedWidget

* Clean up widget templates
2023-03-14 11:59:27 -04:00
jeremystretch
af63ac693e Closes #11893: Convert ChangeLogWidget for use with all models 2023-03-14 08:39:18 -04:00
jeremystretch
2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
jeremystretch
a71a59c088 Fixes #11631: Fix filtering changelog & journal entries by multiple content type IDs 2023-03-13 10:00:05 -04:00
jeremystretch
267a14264b Fixes #11927: Correct loading of plugin resources with custom paths 2023-03-13 08:52:38 -04:00
Aron Bergur Jóhannsson
fa60f9d2a8 Closes #11294: Markdown Preview (#11894)
* MarkdownWidget

* Change border and color of active markdown tab

* Fix template name typo

* Add render markdown endpoint

* Static assets for markdown widget

* widget style fix and unique ids based on name

* Replace SmallTextArea with SmallMarkdownWidget

* Clear innerHTML before swapping

* render markdown directly in template

* change render markdown view path

* remove small markdown widget

* Simplify rendering logic

* Use a form to clean input Markdown data

---------

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-03-09 08:21:13 -05:00
jeremystretch
e015da9e4c Undo change to default status for object type_* fields on Webhook 2023-03-07 18:01:32 -05:00
jeremystretch
4de64d783e Add trigger_webhooks() to JobResult 2023-03-07 18:01:32 -05:00
jeremystretch
a8c331f88a Replace JobResult.set_status() with terminate() 2023-03-07 18:01:32 -05:00
jeremystretch
697feed257 Add type_job_start & type_job_end to Webhook 2023-03-07 18:01:32 -05:00
jeremystretch
c44eb65993 Closes #11325: Move help_texts from model forms to models 2023-03-01 17:31:54 -05:00
Jeremy Stretch
5517963b24 Closes #10729: Add date & time custom field type (#11857)
* Add datetime custom field type

* Update custom field tests
2023-02-28 13:33:40 -05:00
Rafael Ganascim
0744ff2fa0 Fixes #11758 - replace unsafe chars in menu label (#11831)
* Fixes #11758 - replace unsafe chars in menu label

* Fixes #11758 - replace unsafe chars in menu label
2023-02-27 11:42:30 -05:00
Jeremy Stretch
084a2cc52c Closes #9416: Dashboard widgets (#11823)
* Replace masonry with gridstack

* Initial work on dashboard widgets

* Implement function to save dashboard layout

* Define a default dashboard

* Clean up widgets

* Implement widget configuration views & forms

* Permit merging dict value with existing dict in user config

* Add widget deletion view

* Enable HTMX for widget configuration

* Implement view to add dashboard widgets

* ObjectCountsWidget: Identify models by app_label & name

* Add color customization to dashboard widgets

* Introduce Dashboard model to store user dashboard layout & config

* Clean up utility functions

* Remove hard-coded API URL

* Use fixed grid cell height

* Add modal close button

* Clean up dashboard views

* Rebuild JS
2023-02-24 16:04:00 -05:00
Arthur Hanson
36771e821c 10520 remove Napalm code references (#11768)
* 10520 remove all Napalm code references

* 10520 remove lldp

* 10520 remove config, status - rebuild js

* 10520 re-add config parameters

* 10520 re-add serializer

* 10520 update docs
2023-02-24 15:38:50 -05:00
jeremystretch
5a4d8a7107 Closes #11787: Rebuild any missing search cache entires after upgrade 2023-02-20 09:49:13 -05:00
jeremystretch
c109daf1d8 Clean up the application registry 2023-02-19 20:09:52 -05:00
Jeremy Stretch
73a7a2d27a Closes #11559: Implement config template rendering (#11769)
* WIP

* Add config_template field to Device

* Pre-fetch referenced templates

* Correct up_to_date callable

* Add config_template FK to Device

* Update & merge migrations

* Add config_template FK to Platform

* Add tagging support for ConfigTemplate

* Catch exceptions when rendering device templates in UI

* Refactor ConfigTemplate.render()

* Add support for returning plain text content

* Add ConfigTemplate model documentation

* Add feature documentation for config rendering
2023-02-19 20:09:52 -05:00
Jeremy Stretch
b9bd96f0c7 Closes #11765: Remove StaticSelect & StaticSelectMultiple (#11767)
* Remove StaticSelect, StaticSelectMultiple form widgets

* Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
2023-02-19 20:09:51 -05:00
jeremystretch
96a79c2126 Closes #11737: ChangeLoggedModel should inherit WebhooksMixin 2023-02-19 20:09:51 -05:00
jeremystretch
b267cbae36 Merge migrations 2023-02-19 20:09:51 -05:00
jeremystretch
ac87ce733d Closes #11693: Enable remote data synchronization for export templates 2023-02-19 20:09:51 -05:00
Jeremy Stretch
678a7d17df Closes #9073: Remote data support for config contexts (#11692)
* WIP

* Add bulk sync view for config contexts

* Introduce 'sync' permission for synced data models

* Docs & cleanup

* Remove unused method

* Add a REST API endpoint to synchronize config context data
2023-02-19 20:09:51 -05:00
Jeremy Stretch
d8784d4155 Closes #11558: Add support for remote data sources (#11646)
* WIP

* WIP

* Add git sync

* Fix file hashing

* Add last_synced to DataSource

* Build out UI & API resources

* Add status field to DataSource

* Add UI control to sync data source

* Add API endpoint to sync data sources

* Fix display of DataSource job results

* DataSource password should be write-only

* General cleanup

* Add data file UI view

* Punt on HTTP, FTP support for now

* Add DataSource URL validation

* Add HTTP proxy support to git fetcher

* Add management command to sync data sources

* DataFile REST API endpoints should be read-only

* Refactor fetch methods into backend classes

* Replace auth & git branch fields with general-purpose parameters

* Fix last_synced time

* Render discrete form fields for backend parameters

* Enable dynamic edit form for DataSource

* Register DataBackend classes in application registry

* Add search indexers for DataSource, DataFile

* Add single & bulk delete views for DataFile

* Add model documentation

* Convert DataSource to a primary model

* Introduce pre_sync & post_sync signals

* Clean up migrations

* Rename url to source_url

* Clean up filtersets

* Add API & filterset tests

* Add view tests

* Add initSelect() to HTMX refresh handler

* Render DataSourceForm fieldsets dynamically

* Update compiled static resources
2023-02-19 20:09:51 -05:00
jeremystretch
cd09501d4d #11685: Omit no-op migration 2023-02-19 20:08:57 -05:00
jeremystretch
e635e3e959 Fixes #11658: Remove reindex command call from search migration 2023-02-19 18:57:27 -05:00
kkthxbye-code
fc7cb106c1 Address feedback 2023-02-19 18:50:24 -05:00
kkthxbye-code
18ea7d1e13 pep8 fixes 2023-02-19 18:50:24 -05:00
kkthxbye-code
eed1b8f412 Create CachedValueField to contain search specific lookups 2023-02-19 18:50:24 -05:00
kkthxbye-code
ce166b12ce Proof of concept for showing containing prefixes when searching for ip-addresses. 2023-02-19 18:50:24 -05:00
jeremystretch
315371bf7c Fixes #11786: List only applicable object types in form widget when filtering custom fields 2023-02-19 16:17:57 -05:00
kkthxbye-code
c78022a74c Change the way we invalidate the module cache to support reloading code from subpackages 2023-02-16 10:50:38 -05:00
Jeremy Stretch
9f91b89467 #11711: Use CSVModelChoiceField for custom object fields during CSV import 2023-02-13 17:53:01 -05:00
kkthxbye
d748851027 Fixes #11711 - Use CSVModelMultipleChoiceField when importing custom multiple object fields (#11712)
* Fixes #11711 - Use CSVModelMultipleChoiceField when importing custom multiple object fields

* Fix pep8

---------

Co-authored-by: kkthxbye-code <>
2023-02-13 17:49:08 -05:00
kkthxbye
df499ea8ac Fixes #11459 - Allow using null in conditions (#11722)
* Fixes #11459 - Allow using null in conditions
- Update docs to reflect this
- Change docs example from primary_ip to primary_ip4 as computed properties are not serialized when queuing webhooks

* Update netbox/extras/conditions.py

---------

Co-authored-by: Simon Toft <SITO@telenor.dk>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-02-13 17:44:35 -05:00
jeremystretch
edbd597bf2 Update housekeeping command docs 2023-02-07 16:52:54 -05:00
Maximilian Wilhelm
699edd049c Closes #11152: Add support to abort custom script gracefully (#11621)
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2023-02-02 15:22:55 -05:00
Abhimanyu Saharan
fb2771370c handled scripts error when only interval is used 2023-02-02 10:25:19 -05:00
jeremystretch
e7ad6eeb74 Fixes #11613: Correct plugin import logic fix from #11267 2023-01-27 19:56:12 -05:00
Jeremy Stretch
fbc9fea0a5 Fixes #11267: Avoid catching ImportError exceptions when loading plugins (#11566)
* Avoid catching ImportErrors when loading plugin URLs

* Avoid catching ImportErrors when loading plugin resources
2023-01-27 16:44:10 -05:00
jeremystretch
55b1549895 Closes #10762: Permit selection custom fields to have only one choice 2023-01-25 10:27:05 -05:00
kkthxbye-code
fb3d1ef399 Check for the extras.run_script permission when running scripts via. the API 2023-01-17 10:13:18 -05:00
kkthxbye
1354947434 Get the queue from QUEUE_MAPPINGS when deleting JobResults 2023-01-09 08:22:40 -05:00
jeremystretch
0669fda1fd Fixes #11384: Correct current time display on script & report forms 2023-01-06 09:42:13 -05:00
Renato Almeida de Oliveira
35273cc87f Add ExportTemplatesMixin to JournalEntry model (#11251)
* Add ExportTemplatesMixin to JournalEntry model

* Move mixin ahead of base class

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-01-05 16:26:48 -05:00
Robin Schneider
07df622b59 NetBox should always be referred to as NetBox [DATALAD RUNCMD]
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "git ls-files -z . | xargs --null -I '()' find './()' -type f -not -name 'style-guide.md' -print0 | xargs --null sed --in-place --regexp-extended 's/\\bNetbox\\b/NetBox/g;'",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
2023-01-05 16:06:00 -05:00
kkthxbye-code
39985ebdd1 Fix exception when scheduling a job in the past 2023-01-05 13:52:07 -05:00
Alef Burzmali
b7cdbd3d41 Fixes #11248 - Reindex only NetBox apps 2022-12-28 16:35:05 -05:00
Alef Burzmali
ae440c9edf Fixes #11223 - Accept app_label for reindex 2022-12-28 16:35:05 -05:00