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

334 Commits

Author SHA1 Message Date
1a56e8e23b 15148 add copy button to config context (#15954)
* 15148 add copy button to config context

* Merge configcontext_format.html into configcontext_data.html

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-09 08:06:53 -04:00
781d932b2a 15789 make sure job completed before including config_form 2024-04-21 13:57:15 -04:00
0f0ab1a3be Closes #15547: Add comments field to CustomField model 2024-04-19 15:10:06 -04:00
77a4300888 Closes #15618: Always use ISO 8601 date & time formatting (#15737)
* Introduce the isodate(), isotime(), and isodatetime() template filters

* Display the relative time on mouse hover

* Render journal entry times in ISO 8601 format

* Use ISO 8601 format when displaying dates & times in a table

* Standardize the use of DateTimeColumn across all tables
2024-04-17 11:46:47 -04:00
489e956d83 Merge branch 'develop' into feature 2024-04-03 08:43:12 -04:00
699dd72597 Adding JSON schema changes to implement and within the generated schema template per issue #15555 2024-03-28 16:34:56 -04:00
744be59a4d Closes #14736: Enable HTMX navigation globally (#15158)
* Enable HTMX boosting

* Refactor HTMX properties for tables

* Fix dashboard object list widget

* Disable scrolling to page content

* Fix initialization of TomSelect dropdowns after HTMX loading

* Replace formaction properties with hx-post

* Fix quick search field on object list view

* Reinitialize copy-to-clipboard buttons upon HTMX load

* Disable scrolling effect for intra-page navigation

* Introduce user preference for toggling HTMX navigation

* Enable HTMX navigation only when selected by user

* Pass htmx_navigation context

* Fix display of confirmation form when deleting an object

* Disable HTMX boosting for rack elevation SVG downloads

* Fix dyanmic form rendering

* Introduce htmx_boost template tag; enable HTMX for user menu

* Use out-of-band sap to update footer stamp

* Fix display of toasts after form submission

* Fix user preference selection

* Misc cleanup

* Rename render_partial() to htmx_partial()

* Add docstring to htmx_boost template tag

* Disable HTMX for user preferences form to force a full page refresh on changes
2024-03-28 11:51:38 -04:00
a83b233341 Closes #15339: Consume entire viewport (#15480)
* Closes #15339: Consume entire viewport, except for object detail views

* Use fluid containers for all views
2024-03-20 08:26:04 -04:00
8f03a19b5f Introduce ObjectAttribute for displaying read-only instance attributes on forms 2024-03-19 13:34:13 -04:00
78dd65219f Closes #15357: Rename CustomField.object_type to related_object_type (#15366) 2024-03-09 06:16:17 -05:00
663bd32464 10587 script pagination (#15343)
* 10587 temp commit

* 10587 temp commit

* 10587 fix migrations

* 10587 pagination

* 10587 pagination

* 10587 pagination

* 10587 review changes
2024-03-07 11:41:34 -05:00
0e89f46601 #15277: Clean up references to object types in templates 2024-03-04 11:49:39 -05:00
ce6b2666a9 Rename SavedFilter.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
bef17e5a95 Rename ExportTemplate.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
e51d71d7e6 Rename EventRule.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
ba514aceac Rename CustomLink.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
ca2ee436a0 Closes #14438: Database representation of scripts
- Introduces the Script model to represent individual Python classes within a ScriptModule file
- Automatically migrates jobs & event rules

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-23 08:27:37 -05:00
11697d19a6 12510 Merge Scripts and Reports (#14976)
* 12510 move reports to use BaseScript

* 12510 merge report into script view

* 12510 add migration for job report to script

* 12510 update templates

* 12510 remove reports

* 12510 cleanup

* 12510 legacy jobs

* 12510 legacy jobs

* 12510 fixes

* 12510 review changes

* 12510 review changes

* 12510 update docs

* 12510 review changes

* 12510 review changes

* 12510 review changes

* 12510 review changes

* 12510 main log results to empty string

* 12510 move migration

* Introduce an internal log level for debug to simplify Script logging

* Misc cleanup

* Remove obsolete is_valid() method

* Reformat script job data (log, output, tests)

* Remove ScriptLogMessageSerializer

* Fix formatting of script logs

* Record a timestamp with script logs

* Rename _current_method to _current_test

* Clean up template

* Remove obsolete runreport management command

* Misc cleanup & refactoring

* Clean up template

* Clean up migration

* Clean up docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-07 12:02:09 -05:00
74e67afa41 Merge branch 'develop' into feature 2024-02-05 14:38:26 -05:00
fd5392563f Fixes #14572 - Constrains JobView (and related views) badge to specific named job (#14754)
* Fixes #14572 - Constrains JobView (and related views) badge to specific named job

* Adjust report views to resolve same problem

* Fixed PEP8 error

* Update netbox/templates/extras/script/base.html

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

* Move function to method on PythonModuleMixin

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update to mixin and view

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-22 14:01:53 -05:00
ef5e10d360 14728 Move installed plugins list from admin UI to NetBox UI (#14768)
* 14728 move plugins view from admin

* 14728 move plugins view from admin

* 14728 remove plugins view from admin

* Update template for #12128

* 14728 review fixes

* 14728 review fixes

* 14728 review fixes

* 14728 review fixes

* 14728 configure table

* Clean up table columns

* Fix app config lookup for plugins referenced by dotted path

* Move template; fix table display

* Fix user table configuration

* Remove nonfunctional quick search

* Limit PluginListView to staff users

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-19 11:27:15 -05:00
073c2dc8ca Closes #12128: Refresh the web UI to employ the Tabler CSS framework (#14833)
* Remove dark mode styling

* Condense & rename light mode stylesheet

* Upgrade to Bootstrap 5.3.2

* Swap out Bootstrap for Tabler; remove custom styling

* Update base page layout for Tabler

* Update login page

* Bump node to v18

* Update button styles

* Update object list view

* Tweak navbar size

* Clean up dashboard widgets

* Ditch separate stylesheet for print media

* Remove simplebar

* Remove obsolete sidebar styling

* Clean up object view template

* Clean up object edit template

* Standardize primary button sizing

* Clean up object list styling

* Add buttons for add & import to navigation menu

* Fix global search bar

* Fix slim-select form widget styling

* Fix toast styling

* Set base fonts

* Clean up paginator styling

* Clean up navigation menu group headings

* Clean up footer links

* Clean up card styles

* Move SVG styles to a designated directory

* Restructure SCSS files

* Remove obsolete/redundant dependencies

* Fix icon spacing

* Update background color classes

* Tweak banner & footer styling and spacing

* Fix badge background colors in table content

* Bump @types/bootstrap to 5.2.10

* Clean up form layouts

* Fix object selector button style

* Fix icon padding inside small buttons

* Fix icon & badge spacing inside buttons and tabs

* Hide paginator for empty pages

* Fix hover color for list items (Tabler bug #1694)

* Fix width of checkbox column in empty tables

* Clean up bulk edit template

* Fix border color of reslug button

* Package & serve Google fonts locally

* Fix tab styling

* Reduce vetical space at top of dashboard

* Remove obsolete content-wrapper template block

* Fix icon spacing in dropdown menu items

* Fix color label sizing

* Separate bulk delete form & object list into tabs

* Fix styling of filter group headings

* Fix styling for object changelog & journal views

* Standardize ordering & styling of action buttons

* Fix designation of active menu item

* Automatically expand menu section containing the active link

* Clean up nav menu styling

* Remove button colors; hide buttons except on hover/active

* Highlight menu group containing the active item

* Update & standardize alert styling

* Refactor base templates to ensure consistent display of header content

* Tweak styling for links inside badges

* Clean up top menu

* Fix JSON/YAML toggles for config context data

* Fix object template header

* Constrain tabs to container-xl; tweak header margins

* Fix object identifier styling

* Fix positioning of card header buttons

* Remove padding from HTMX tables inside cards

* Ensure consistent use of row headings in attribute tables

* Remove padding surrounding tables inside cards

* Remove obsolete CSS classes

* Misc cleanup of old styling

* Refactor 'controls' template block; ditch old classes

* Fix login button sizing

* Limit object edit form width

* Append asterisk to required form field labels

* Remove obsolete styling

* Remove obsolete styling

* Fix position of progress bar outside label

* Fix alignment of delete button in report/script lists

* Fix <pre> styling

* Clean up page headers

* Replace SVG icons with Material Design icons

* Restore dark mode togle functionality

* Fix top navbar background color under dark mode

* Rebuild static assets
2024-01-17 16:25:42 -05:00
deadde8700 #14132: Extend EventRule template 2023-12-04 11:12:20 -05:00
b812a50ca2 Closes #14361: Add a description field to Webhook (#14380) 2023-11-30 17:02:45 -05:00
a38a38218b 14132 Add EventRule - change webhook and add in script processing to events (#14267)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-30 16:36:33 -05:00
975a647d9a Closes #14312: Move ConfigRevision to core (#14328)
* Move ConfigRevision model & write migrations

* Move ConfigRevision resources from extras to core

* Extend migration to update original content type for ConfigRevision
2023-11-27 16:09:05 -05:00
a73ba00aa0 Closes #13299: Improve options for controlling custom field visibility (#14289)
* Add ui_visible and ui_editable fields

* Extend migration to map new visible/editable values

* Remove ui_visibility field

* Update docs
2023-11-20 13:06:34 -05:00
edc4a35296 Initial work on #10244: Protection rules (#14097) 2023-10-30 14:36:56 -04:00
f9ceaad284 #13666: Add is_valid property to Report class 2023-09-26 10:53:38 -04:00
e67624f042 Fixes #13666: Fix behavior for reports without test methods (#13667) 2023-09-26 10:41:09 -04:00
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