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

43 Commits

Author SHA1 Message Date
Arthur Hanson
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
Jeremy Stretch
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
Arthur Hanson
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
Abhimanyu Saharan
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
jeremystretch
197c6a1cbf Add scheduling_enabled parameter for scripts 2023-04-18 08:45:31 -04:00
Jeremy Stretch
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
Jeremy Stretch
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
Ryan Merolle
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
kkthxbye-code
824b4e0923 Add scheduling for reports and scripts 2022-09-18 15:06:28 +02:00
jeremystretch
7c105019d8 Closes #8600: Document built-in template tags & filters 2022-02-09 16:01:58 -05:00
jeremystretch
01e8017265 Clean up template blocks 2022-01-05 09:09:39 -05:00
jeremystretch
aa9e68e121 Tweak preformatted block styling 2021-10-28 10:46:00 -04:00
jeremystretch
3f766ffea8 Fixes #7474: Fix AttributeError exception when rendering a report or custom script 2021-10-07 09:37:21 -04:00
jeremystretch
de58f53f9f Closes #7208: Add navigation breadcrumbs for custom scripts & reports 2021-09-15 15:14:24 -04:00
jeremystretch
9813f3b696 Clean up custom script templates 2021-08-26 15:04:24 -04:00
jeremystretch
a72e23eddf Fix custom script layout 2021-08-13 09:43:23 -04:00
jeremystretch
856956afce Standardize object breadcrumbs 2021-07-20 12:14:01 -04:00
Jeremy Stretch
805892f623 Template cleanup (#6421)
* Clean up & comment base templates

* Clean up login template & form

* Use SVG file for NetBox logo

* Simplify breadcrumbs

* Merge changelog.html into home.html

* Rename title_container block to header

* Move breadcrumbs block to object.html

* Attach names to endblock template tags

* Reorganize root-level templates into base/ and inc/

* Remove obsolete reference to Bootstrap 3.4.1
2021-05-17 16:27:27 -04:00
checktheroads
460a203c29 Add basic support for smaller screens 2021-04-30 15:55:37 -07:00
checktheroads
4b0d5815c0 migrate script job checking to typescript & update templates for bootstrap 5 2021-04-18 14:17:13 -07:00
checktheroads
3c0f4278c7 update extras templates 2021-04-16 14:58:44 -07:00
jeremystretch
46e144f647 Clean up object header 2021-04-13 16:03:07 -04:00
Martin Rødvand
d58291d119 Closes #5953: Adds Markdown rendering of Custom Scripts' descriptions 2021-03-11 22:27:43 +01:00
Jeremy Stretch
867f308027 Replace Font Awesome icons with Material Design 2020-11-06 14:33:20 -05:00
John Anderson
3777fbccc3 Implements #2006 - run reports and scripts in the background 2020-06-29 03:50:05 -04:00
Jeremy Stretch
19a10cee82 Rename base template 2020-04-10 10:21:02 -04:00
Jeremy Stretch
16d3cebf3e Update markdown filter name 2020-03-09 10:42:32 -04:00
Jeremy Stretch
1423fd9024 Rename gfm filter to render_markdown 2020-03-09 10:31:29 -04:00
Jeremy Stretch
3e8799b5c7 Fix script form rendering 2019-08-28 09:20:19 -04:00
Jeremy Stretch
a3d9e633c1 Always include 'commit' option 2019-08-26 17:04:04 -04:00
Jeremy Stretch
456621695a Wrap script form inside a panel 2019-08-26 13:53:30 -04:00
Jeremy Stretch
de770faf6a Add FileVar for file uploads 2019-08-16 15:27:58 -04:00
Jeremy Stretch
f8326ef6df Add markdown rendering for log mesages 2019-08-14 14:38:11 -04:00
Jeremy Stretch
11e5e1c490 Show script log when an exception occurs 2019-08-14 12:19:36 -04:00
Jeremy Stretch
9c079ead4c Fix notice when form does not require user input 2019-08-14 10:18:25 -04:00
Jeremy Stretch
c562af3a13 Record script execution time 2019-08-14 10:12:30 -04:00
Jeremy Stretch
30e14db881 Tweak form display (cosmetic) 2019-08-14 09:40:23 -04:00
Jeremy Stretch
0d289d660d Add option to commit database changes 2019-08-12 14:28:06 -04:00
Jeremy Stretch
19eb4c510c Move script attributes under a Meta class 2019-08-12 13:16:18 -04:00
Jeremy Stretch
ab504439fb Implemented permissions for scripts 2019-08-12 11:39:36 -04:00
Jeremy Stretch
3f7f3f88f3 Fix form field ordering 2019-08-12 11:13:16 -04:00
Jeremy Stretch
9d054fb345 Add options for script vars; include script output 2019-08-12 11:13:16 -04:00
Jeremy Stretch
a25a27f31f Initial work on custom scripts (#3415) 2019-08-12 11:13:16 -04:00