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

304 Commits

Author SHA1 Message Date
a1e42dad10 13653 darken code color to work in light and dark modes (#13827)
* 13653 darken code color to work in light and dark modes

* 13809 changed to use mx-1 on code block
2023-09-20 14:08:12 -04:00
252bf03525 Fixes #13802: Restore 'description' header text for custom fields 2023-09-18 13:35:54 -04:00
6939bf8aed Fixes #12219: Ensure dashboard widget heading text has sufficient contrast (#13753)
* Fixes #12219: Ensure dashboard widget heading text has sufficient contrast in both light & dark modes

* Change foreground color for teal background
2023-09-13 10:56:03 -04:00
39cb9c32d6 Clean up blocktrans template tags (i18n) 2023-09-11 16:17:02 -04:00
2544e2bf18 Fixes #13622: Fix exception when viewing current config and no revisions have been created 2023-08-31 11:11:56 -04:00
eb9a804914 #12591: Add a dedicated view for the active config revision 2023-08-30 11:13:56 -04:00
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
00ebdfe0df adds related models count on custom field #12825 2023-08-28 08:34:33 -04:00
af06510921 Closes #13412: Enable pagination of custom field choice set choices 2023-08-16 11:08:36 -04:00
b96e437e2b #8248: Add bookmarks widget to default dashboard 2023-08-16 10:10:31 -04:00
44f8a777df Merge branch 'develop' into feature 2023-08-15 11:04:03 -04:00
ea107b6b86 adds object view to allow changelog page to be opened #13463 2023-08-14 09:47:58 -04:00
40afe6cf36 Feature - Schema Generation (#13353)
* Schema generation is working

* Added option to either dump to a file or the console

* Moving schema file and utilizing settings definition for file paths

* Cleaning up the imports and fixing a few pythonic issues

* Tweak command flags

* Clean up choices mapping

* Misc cleanup

* Rename & move template file

* Move management command from extras to dcim

* Update release checklist

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-11 11:00:26 -04:00
4bb0388118 Fixes #13362: Limit displayed choice set list to 50 choices 2023-08-08 09:47:34 -04:00
04a2543e68 Fixes #13351: Fix missing text due to incorrectly applied translation tags 2023-08-02 14:53:32 -04:00
1cc78be6ca Adds custom field on webhook model (#13336)
* adds custom field on webhook model #11936

* adds tags on webhook model #11936

* Remove extraneous import; revert change to NetBoxModelForm (no longer needed)

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-01 14:05:47 -04:00
7c17d2e932 Closes #13102: Establish initial translation support in templates
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-28 16:30:25 -04:00
cf1b1a83eb Closes #12194: Add pre-defined custom field choices (#13219)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup

* Initial work on predefined choices for custom fields

* Misc cleanup

* Add IATA airport codes

* #13241: Add support for custom field choice labels

* Restore ArrayColumn

* Misc cleanup

* Change extra_choices back to a nested ArrayField to preserve choice ordering

* Hack to bypass GraphQL API test utility absent support for nested ArrayFields
2023-07-28 11:24:21 -04:00
d52c18ce38 Merge branch 'develop' into feature 2023-07-28 10:36:09 -04:00
0ab3f979e0 Adds faster polling for scripts and reports (#13202)
* adds faster polling for scripts and reports #13097

* changes as per review
2023-07-27 15:59:41 -04:00
96ea0ac9c7 Closes #12988: Introduce custom field choice sets (#13195)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup
2023-07-19 10:26:24 -04:00
837be4d45f Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
f6fcf776a4 Fixes #13061: Fix display of last result for scripts & reports with a custom name defined 2023-07-10 14:13:45 -04:00
cab7b76220 Fixes form rendering when scheduling_enabled is disabled (#13123)
* fixes form rendering when scheduling_enabled is disabled #13096

* Remove requires_input property from BaseScript; render form consistently

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-10 10:30:51 -04:00
3307bd200c Fixes syntax error on reports (#12997)
* fixes syntax error on reports #12842

* remove the extra filter #12842
2023-06-29 16:02:39 -04:00
6e222f8dce Closes #8248: User bookmarks (#13035)
* Initial work on #8248

* Add tests

* Fix tests

* Add feature query for bookmarks

* Add BookmarksWidget

* Correct generic relation name

* Add docs for bookmarks

* Remove inheritance from ChangeLoggedModel
2023-06-29 14:36:11 -04:00
1056e513b1 Closes #11541: Support for limiting tag assignments by object type (#12982)
* Initial work on #11541

* Merge migrations

* Limit tags by object type during assignment

* Add tests for object type validation

* Fix form field parameters
2023-06-23 14:08:14 -04:00
148278a74a 12591 config params admin (#12904)
* 12591 initial commit

* 12591 detail view

* 12591 add/edit view

* 12591 edit button

* 12591 base views and forms

* 12591 form cleanup

* 12591 form cleanup

* 12591 form cleanup

* 12591 review changes

* 12591 move check for restrictedqueryset

* 12591 restore view

* 12591 restore page styling

* 12591 remove admin

* Remove edit view for ConfigRevision instances

* Order ConfigRevisions by creation time

* Correct permission name

* Use RestrictedQuerySet for ConfigRevision

* Fix redirect URL

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-06-22 14:04:24 -04:00
bca9d0fa8a Closes #12599: Apply filter parameters to links in object count dashboard widgets 2023-05-30 16:31:34 -04:00
9909213c0d 12416 warning for missing script file (#12456)
* 12416 warning for missing script file

* 12416 widen exception catching for internal script error

* Update netbox/extras/models/scripts.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 12416 update from review feedback

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-05 09:37:38 -04:00
5036020dc0 12433 update object list widget to correctly parameterize urls (#12434)
* 12433 update object list widget to correctly parameterize urls

* Update netbox/extras/dashboard/widgets.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 12433 fix indent

* Correct per_page query parameter

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-03 09:20:53 -04:00
b14a514b47 Closes 10759: Enable markdown support for custom field descriptions (#12344)
* enable markdown in custom field descriptions

* Closes #10759: Enable markdown support for custom field descriptions

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-02 16:47:22 -04:00
9319cffb1c Fixes #12384: Add a three-second timeout for RSS reader widget 2023-05-01 16:19:39 -04:00
197c6a1cbf Add scheduling_enabled parameter for scripts 2023-04-18 08:45:31 -04:00
7ecf3be33c Clean up script & report job views 2023-04-17 15:27:12 -04:00
90527b799d #9416: Add view to reset user's dashboard 2023-03-30 12:46:06 -04:00
424b336536 Fixes #12061: Improve handling of insufficient permissions for widget content 2023-03-30 10:03:41 -04:00
c4891fe105 Closes #12085: Add a file source view for reports 2023-03-29 16:58:35 -04:00
715592547c #12081: Script & report cleanup (#12091)
* start() and terminate() methods on Job should call save()

* Fix display of associated jobs

* Introduce get_latest_jobs() method on JobsMixin

* Update messaging when no reports/scripts exist

* Catch ImportErrors when rendering report/script lists

* Fix loading of nested modules

* Fix URLs for nested scripts/reports
2023-03-29 16:51:55 -04:00
d2a694a878 Closes #12068: Establish a direct relationship from jobs to objects (#12075)
* Reference database object by GFK when running scripts & reports via UI

* Reference database object by GFK when running scripts & reports via API

* Remove old enqueue_job() method

* Enable filtering jobs by object

* Introduce ObjectJobsView

* Add tabbed views for report & script jobs

* Add object_id to JobSerializer

* Move generic relation to JobsMixin

* Clean up old naming
2023-03-28 15:47:09 -04:00
669cfe8952 Closes #12062: Avoid caching invalid RSS feed content 2023-03-27 09:29:51 -04:00
f7a2eb8aef Closes #11890: Sync/upload reports & scripts (#12059)
* Initial work on #11890

* Consolidate get_scripts() and get_reports() functions

* Introduce proxy models for script & report modules

* Add add/delete views for reports & scripts

* Add deletion links for modules

* Enable resolving scripts/reports from module class

* Remove get_modules() utility function

* Show results in report/script lists

* Misc cleanup

* Fix file uploads

* Support automatic migration for submodules

* Fix module child ordering

* Template cleanup

* Remove ManagedFile views

* Move is_script(), is_report() into extras.utils

* Fix URLs for nested reports & scripts

* Misc cleanup
2023-03-24 21:00:36 -04:00
e176c7d906 #9416: cleanup & widget improvements 2023-03-22 15:44:01 -04:00
3b9fda0169 Merge branch 'develop' into feature 2023-03-20 08:54:22 -04:00
4286d74d44 Add fieldsets functionality to scripts to allow for form field groupings (#11880)
* update script template

* update docs

* introduce default_fieldset

* correct custom script docs

* default to use fieldsets in scripts

* update scripts docs for new behavior

* Misc cleanup

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-14 15:50:49 -04:00
f7150645a1 8749 clone custom fields 2023-03-14 15:44:16 -04:00
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
af63ac693e Closes #11893: Convert ChangeLogWidget for use with all models 2023-03-14 08:39:18 -04:00
697feed257 Add type_job_start & type_job_end to Webhook 2023-03-07 18:01:32 -05:00
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