Skip to content

Commit e08810a

Browse files
committed
Merge branch 'feature' into 17936-gfk-serializer-field
2 parents 9e8fa6e + 068d493 commit e08810a

File tree

107 files changed

+12490
-10822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+12490
-10822
lines changed

.github/ISSUE_TEMPLATE/01-feature_request.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: ✨ Feature Request
33
type: Feature
44
description: Propose a new NetBox feature or enhancement
5-
labels: ["type: feature", "status: needs triage"]
5+
labels: ["netbox", "type: feature", "status: needs triage"]
66
body:
77
- type: markdown
88
attributes:
@@ -15,7 +15,7 @@ body:
1515
attributes:
1616
label: NetBox version
1717
description: What version of NetBox are you currently running?
18-
placeholder: v4.4.4
18+
placeholder: v4.4.5
1919
validations:
2020
required: true
2121
- type: dropdown

.github/ISSUE_TEMPLATE/02-bug_report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 🐛 Bug Report
33
type: Bug
44
description: Report a reproducible bug in the current release of NetBox
5-
labels: ["type: bug", "status: needs triage"]
5+
labels: ["netbox", "type: bug", "status: needs triage"]
66
body:
77
- type: markdown
88
attributes:
@@ -27,7 +27,7 @@ body:
2727
attributes:
2828
label: NetBox Version
2929
description: What version of NetBox are you currently running?
30-
placeholder: v4.4.4
30+
placeholder: v4.4.5
3131
validations:
3232
required: true
3333
- type: dropdown

.github/ISSUE_TEMPLATE/03-documentation_change.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 📖 Documentation Change
33
type: Documentation
44
description: Suggest an addition or modification to the NetBox documentation
5-
labels: ["type: documentation", "status: needs triage"]
5+
labels: ["netbox", "type: documentation", "status: needs triage"]
66
body:
77
- type: dropdown
88
attributes:

.github/ISSUE_TEMPLATE/04-translation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 🌍 Translation
33
type: Translation
44
description: Request support for a new language in the user interface
5-
labels: ["type: translation"]
5+
labels: ["netbox", "type: translation"]
66
body:
77
- type: markdown
88
attributes:

.github/ISSUE_TEMPLATE/05-housekeeping.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 🏡 Housekeeping
33
type: Housekeeping
44
description: A change pertaining to the codebase itself (developers only)
5-
labels: ["type: housekeeping"]
5+
labels: ["netbox", "type: housekeeping"]
66
body:
77
- type: markdown
88
attributes:

.github/ISSUE_TEMPLATE/06-deprecation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 🗑️ Deprecation
33
type: Deprecation
44
description: The removal of an existing feature or resource
5-
labels: ["type: deprecation"]
5+
labels: ["netbox", "type: deprecation"]
66
body:
77
- type: textarea
88
attributes:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.6.9
3+
rev: v0.14.1
44
hooks:
55
- id: ruff
66
name: "Ruff linter"

contrib/openapi.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi": "3.0.3",
33
"info": {
44
"title": "NetBox REST API",
5-
"version": "4.4.4",
5+
"version": "4.4.5",
66
"license": {
77
"name": "Apache v2 License"
88
}
@@ -61458,6 +61458,14 @@
6145861458
"operationId": "dcim_mac_addresses_list",
6145961459
"description": "Get a list of MAC address objects.",
6146061460
"parameters": [
61461+
{
61462+
"in": "query",
61463+
"name": "assigned",
61464+
"schema": {
61465+
"type": "boolean"
61466+
},
61467+
"description": "Is assigned"
61468+
},
6146161469
{
6146261470
"in": "query",
6146361471
"name": "assigned_object_id",
@@ -62293,6 +62301,14 @@
6229362301
"explode": true,
6229462302
"style": "form"
6229562303
},
62304+
{
62305+
"in": "query",
62306+
"name": "primary",
62307+
"schema": {
62308+
"type": "boolean"
62309+
},
62310+
"description": "Is primary"
62311+
},
6229662312
{
6229762313
"in": "query",
6229862314
"name": "q",

docs/configuration/miscellaneous.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ Sets content for the top banner in the user interface.
5353

5454
---
5555

56+
## COPILOT_ENABLED
57+
58+
!!! tip "Dynamic Configuration Parameter"
59+
60+
Default: `True`
61+
62+
Enables or disables the [NetBox Copilot](https://netboxlabs.com/docs/copilot/) agent globally. When enabled, users can opt to toggle the agent individually.
63+
64+
---
65+
5666
## CENSUS_REPORTING_ENABLED
5767

5868
Default: `True`

docs/customization/custom-scripts.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,61 @@ A complete date & time. Returns a `datetime.datetime` object.
393393

394394
Custom scripts can be run via the web UI by navigating to the script, completing any required form data, and clicking the "run script" button. It is possible to schedule a script to be executed at specified time in the future. A scheduled script can be canceled by deleting the associated job result object.
395395

396+
#### Prefilling variables via URL parameters
397+
398+
Script form fields can be prefilled by appending query parameters to the script URL. Each parameter name must match the variable name defined on the script class. Prefilled values are treated as initial values and can be edited before execution. Multiple values can be supplied by repeating the same parameter. Query values must be percent‑encoded where required (for example, spaces as `%20`).
399+
400+
Examples:
401+
402+
For string and integer variables, when a script defines:
403+
404+
```python
405+
from extras.scripts import Script, StringVar, IntegerVar
406+
407+
class MyScript(Script):
408+
name = StringVar()
409+
count = IntegerVar()
410+
```
411+
412+
the following URL prefills the `name` and `count` fields:
413+
414+
```
415+
https://<netbox>/extras/scripts/<script_id>/?name=Branch42&count=3
416+
```
417+
418+
For object variables (`ObjectVar`), supply the object’s primary key (PK):
419+
420+
```
421+
https://<netbox>/extras/scripts/<script_id>/?device=1
422+
```
423+
424+
If an object ID cannot be resolved or the object is not visible to the requesting user, the field remains unpopulated.
425+
426+
Supported variable types:
427+
428+
| Variable class | Expected input | Example query string |
429+
|--------------------------|---------------------------------|---------------------------------------------|
430+
| `StringVar` | string (percent‑encoded) | `?name=Branch42` |
431+
| `TextVar` | string (percent‑encoded) | `?notes=Initial%20value` |
432+
| `IntegerVar` | integer | `?count=3` |
433+
| `DecimalVar` | decimal number | `?ratio=0.75` |
434+
| `BooleanVar` | value → `True`; empty → `False` | `?enabled=true` (True), `?enabled=` (False) |
435+
| `ChoiceVar` | choice value (not label) | `?role=edge` |
436+
| `MultiChoiceVar` | choice values (repeat) | `?roles=edge&roles=core` |
437+
| `ObjectVar(Device)` | PK (integer) | `?device=1` |
438+
| `MultiObjectVar(Device)` | PKs (repeat) | `?devices=1&devices=2` |
439+
| `IPAddressVar` | IP address | `?ip=198.51.100.10` |
440+
| `IPAddressWithMaskVar` | IP address with mask | `?addr=192.0.2.1/24` |
441+
| `IPNetworkVar` | IP network prefix | `?network=2001:db8::/64` |
442+
| `DateVar` | date `YYYY-MM-DD` | `?date=2025-01-05` |
443+
| `DateTimeVar` | ISO datetime | `?when=2025-01-05T14:30:00` |
444+
| `FileVar` | — (not supported) ||
445+
446+
!!! note
447+
- The parameter names above are examples; use the actual variable attribute names defined by the script.
448+
- For `BooleanVar`, only an empty value (`?enabled=`) unchecks the box; any other value including `false` or `0` checks it.
449+
- File uploads (`FileVar`) cannot be prefilled via URL parameters.
450+
396451
### Via the API
397452

398453
To run a script via the REST API, issue a POST request to the script's endpoint specifying the form data and commitment. For example, to run a script named `example.MyReport`, we would make a request such as the following:

0 commit comments

Comments
 (0)