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

164 Commits

Author SHA1 Message Date
64f6eea579 #10054: Trigger change event after updating form field value 2023-03-20 16:06:06 -04:00
d1f76bec37 Closes #10054: Implement advanced UI controls for object selection (#11952)
* WIP

* WIP

* WIP

* Make object selector functional

* Replace extraneous form fields with selector widgets

* Avoid overlap with filterset field names

* Show checkmarks next to visibile filters

* Update results automatically when searching

* Include selector for device/VM component parent fields

* Use selector for filtering VLAN group/site

* Limit selector to 100 results
2023-03-13 12:44:26 -04:00
2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
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
4f12eccde6 Update toggle caption for vif 2023-02-27 14:53:52 -05:00
eed6990b39 Closes #11011: Hide virtual interfaces 2023-02-27 14:53:52 -05:00
e4e4d0c0ec Fixes #11753: Avoid re-initializing SlimSelects 2023-02-25 12:09:06 -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
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
c84f0de8f8 #11625: Employ HTMX form rendering for device & VM interfaces 2023-02-19 20:09:52 -05:00
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
9628dead07 Closes #10560: New global search (#10676)
* Initial work on new search backend

* Clean up search backends

* Return only the most relevant result per object

* Clear any pre-existing cached entries on cache()

* #6003: Implement global search functionality for custom field values

* Tweak field weights & document guidance

* Extend search() to accept a lookup type

* Move get_registry() out of SearchBackend

* Enforce object permissions when returning search results

* Add indexers for remaining models

* Avoid calling remove() on non-cacheable objects

* Use new search backend by default

* Extend search backend to filter by object type

* Clean up search view form

* Enable specifying lookup logic

* Add indexes for value field

* Remove object type selector from search bar

* Introduce SearchTable and enable HTMX for results

* Enable pagination

* Remove legacy search backend

* Cleanup

* Use a UUID for CachedValue primary key

* Refactoring search methods

* Define max search results limit

* Extend reindex command to support specifying particular models

* Add clear() and size to SearchBackend

* Optimize bulk caching performance

* Highlight matched portion of field value

* Performance improvements for reindexing

* Started on search tests

* Cleanup & docs

* Documentation updates

* Clean up SearchIndex

* Flatten search registry to register by app_label.model_name

* Clean up search backend classes

* Clean up RestrictedGenericForeignKey and RestrictedPrefetch

* Resolve migrations conflict
2022-10-21 13:16:16 -04:00
b227757b9a Update JS dependencies WIP 2022-10-04 15:02:37 +02:00
d1efbf6620 Issue10352 removegetvariables (#10475)
* Add javascript to disable empty form fields

* add js cleanGetUrl

* use addEventListener submit

* use addEventListener

* update collectstatics

* Use FormData to remove empty fields

* optimeze ts-ignore

* update ts-ignore comment

* oneline of ts-ignore

* one line of ts-ingnore

* fix tsc errors by adding types (as per kkthxbye)

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@sentia.com>
2022-10-03 14:32:01 -04:00
cdea30253b #101700 change csrf token access 2022-08-29 14:57:56 -07:00
f74b7aa7ac Add a "clear" button for quick search
Fixes #9857
2022-08-11 08:26:25 -04:00
44586743ea Fixes #9437: Standardize form submission buttons and behavior when using enter key 2022-07-19 14:21:20 -04:00
802d9d2b6e Fixes #9749: Retain original slug values when modifying object names 2022-07-19 13:01:51 -04:00
b854cefb57 Revert #9735 & #9696 2022-07-17 17:33:47 +02:00
b0df24e6d1 UI: Only set focus on select field search boxes if the select is open 2022-07-15 08:51:05 +02:00
93c30c94b3 Focus on select field after populating data 2022-07-10 19:16:16 +02:00
a6e285316a Don't close select field when multiple select 2022-06-17 22:53:51 +02:00
fbd933b56a prettier fixes 2022-05-06 11:44:34 -07:00
9c5355a300 added JSDoc comments 2022-05-06 11:43:18 -07:00
491a4e7d78 various punctuation and spacing fixes 2022-05-06 11:33:00 -07:00
90d8395a2c Fixed variable type issue...i think. 2022-05-05 15:24:16 -07:00
11f7e3099d fixed text deselection and refactor 2022-05-05 15:01:40 -07:00
3effa37fa7 click event calls multiselect function 2022-05-05 13:24:50 -07:00
1493c920fd silly text highlight workaround... 2022-05-05 13:24:12 -07:00
ea9258d36c added main multi-select function 2022-05-05 13:23:43 -07:00
db142061ff clicking a PkCheckbox updates state 2022-05-05 12:37:28 -07:00
c536944a10 now exports multiselect function 2022-05-05 12:36:17 -07:00
ae7ddecaa6 now exports previousPkCheck.ts 2022-05-05 12:14:15 -07:00
2e38e62101 create store to store previously checked element 2022-05-05 12:13:02 -07:00
2979a64ce3 add file, skeleton from "select all" 2022-05-05 12:11:02 -07:00
a91c46b4c0 UI: Fix apiSelect scrolling while zoomed in chrome 2022-04-22 20:33:46 +02:00
3ff4fd814e Merge branch 'develop' into feature 2022-03-30 15:45:40 -04:00
3edff89a4d Fixes: #8866 - Does not perform API Select Search if a django peramiter has not been replaced 2022-03-14 17:57:33 +00:00
fab4d95156 Merge branch 'develop' into feature 2022-02-25 14:06:45 -05:00
1a7438acfd Fixed code comments 2022-02-22 23:32:34 +01:00
b1de85a44f Fixes #8710: Show/hide form elements based on scope selection 2022-02-22 23:27:11 +01:00
d52105b3b8 Merge branch 'develop' into feature 2022-02-10 15:05:54 -05:00
9d65486c64 Fixes #8564: reset the table config to an empty object when reset is clicked 2022-02-07 16:03:09 -07:00
ccce7751a0 Fixes #8564: only use columns form field in user table config form submit 2022-02-07 14:36:28 -07:00
7252f0b490 Add optional selector to getSelectedOptions for more specific field selection 2022-02-07 14:34:35 -07:00
094d2e586a Fix code formatting 2022-02-07 14:14:43 -07:00
6c1507c88c Implement replaceAll utility function
add #8331 release notes
2022-02-07 14:04:58 -07:00
60f48326e1 #8331 Maximize browser compatibility 2022-02-07 14:04:49 -07:00
3bb485d0b8 Merge v3.1.3 2021-12-29 12:41:56 -05:00
9c9fcaf42f Fixes #7290: Defer loading API-backed form fields 2021-12-29 09:30:43 -05:00