You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization/custom-scripts.md
+1
Original file line number
Diff line number
Diff line change
@@ -310,6 +310,7 @@ A particular object within NetBox. Each ObjectVar must specify a particular mode
310
310
*`query_params` - A dictionary of query parameters to use when retrieving available options (optional)
311
311
*`context` - A custom dictionary mapping template context variables to fields, used when rendering `<option>` elements within the dropdown menu (optional; see below)
312
312
*`null_option` - A label representing a "null" or empty choice (optional)
313
+
*`selector` - A boolean that, when True, includes an advanced object selection widget to assist the user in identifying the desired object (optional; False by default)
313
314
314
315
To limit the selections available within the list, additional query parameters can be passed as the `query_params` dictionary. For example, to show only devices with an "active" status:
Copy file name to clipboardExpand all lines: docs/customization/export-templates.md
+1
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Height: {{ rack.u_height }}U
25
25
To access custom fields of an object within a template, use the `cf` attribute. For example, `{{ obj.cf.color }}` will return the value (if any) for a custom field named `color` on `obj`.
26
26
27
27
If you need to use the config context data in an export template, you'll should use the function `get_config_context` to get all the config context data. For example:
Copy file name to clipboardExpand all lines: docs/development/release-checklist.md
+63-9
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
# Release Checklist
2
2
3
-
This documentation describes the process of packaging and publishing a new NetBox release. There are three types of release:
3
+
This documentation describes the process of packaging and publishing a new NetBox release. There are three types of releases:
4
4
5
5
* Major release (e.g. v3.7.8 to v4.0.0)
6
6
* Minor release (e.g. v4.0.10 to v4.1.0)
7
7
* Patch release (e.g. v4.1.0 to v4.1.1)
8
8
9
-
While major releases generally introduce some very substantial change to the application, they are typically treated the same as minor version increments for the purpose of release packaging.
9
+
While major releases generally introduce some very substantial changes to the application, they are typically treated the same as minor version increments for the purpose of release packaging.
10
+
11
+
For patch releases (e.g. upgrading from v4.2.2 to v4.2.3), begin at the [patch releases](#patch-releases) heading below. For minor or major releases, complete the entire checklist.
10
12
11
13
## Minor Version Releases
12
14
@@ -29,6 +31,29 @@ Close the [release milestone](https://github.com/netbox-community/netbox/milesto
29
31
30
32
Check that a link to the release notes for the new version is present in the navigation menu (defined in `mkdocs.yml`), and that a summary of all major new features has been added to `docs/index.md`.
31
33
34
+
### Update the Dependency Requirements Matrix
35
+
36
+
For every minor release, update the dependency requirements matrix in `docs/installation/upgrading.md` ("All versions") to reflect the supported versions of Python, PostgreSQL, and Redis:
37
+
38
+
1. Add a new row with the supported dependency versions.
39
+
2. Include a documentation link using the release tag format: `https://github.com/netbox-community/netbox/blob/v4.2.0/docs/installation/index.md`
40
+
3. Bold any version changes for clarity.
41
+
42
+
**Example Update:**
43
+
44
+
```markdown
45
+
| NetBox Version | Python min | Python max | PostgreSQL min | Redis min | Documentation |
If a new Django release is adopted or other major dependencies (Python, PostgreSQL, Redis) change:
53
+
54
+
* Update the installation guide (`docs/installation/index.md`) with the new minimum versions.
55
+
* Update the upgrade guide (`docs/installation/upgrading.md`) for the current version accordingly.
56
+
32
57
### Manually Perform a New Install
33
58
34
59
Start the documentation server and navigate to the current version of the installation docs:
@@ -37,15 +62,25 @@ Start the documentation server and navigate to the current version of the instal
37
62
mkdocs serve
38
63
```
39
64
40
-
Follow these instructions to perform a new installation of NetBox in a temporary environment. This process must not be automated: The goal of this step is to catch any errors or omissions in the documentation, and ensure that it is kept up-to-date for each release. Make any necessary changes to the documentation before proceeding with the release.
65
+
Follow these instructions to perform a new installation of NetBox in a temporary environment. This process must not be automated: The goal of this step is to catch any errors or omissions in the documentation and ensure that it is kept up to date for each release. Make any necessary changes to the documentation before proceeding with the release.
41
66
42
67
### Test Upgrade Paths
43
68
44
-
Upgrading from a previous version typically involves database migrations, which must work without errors. Supported upgrade paths include from one minor version to another within the same major version (i.e. 4.0 to 4.1), as well as from the latest patch version of the previous minor version (i.e. 3.7 to 4.0 or to 4.1). Prior to release, test all these supported paths by loading demo data from the source version and performing a `./manage.py migrate`.
69
+
Upgrading from a previous version typically involves database migrations, which must work without errors.
70
+
Test the following supported upgrade paths:
71
+
72
+
- From one minor version to another within the same major version (e.g. 4.0 to 4.1).
73
+
- From the latest patch version of the previous minor version (e.g. 3.7 to 4.0 or 4.1).
74
+
75
+
Prior to release, test all these supported paths by loading demo data from the source version and performing:
76
+
77
+
```no-highlight
78
+
./manage.py migrate
79
+
```
45
80
46
81
### Merge the `feature` Branch
47
82
48
-
Submit a pull request to merge the `feature` branch into the `main` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
83
+
Submit a pull request to merge the `feature` branch into the `main` branch in preparation for its release. Once it has been merged, continue with the section for the patch releases below.
49
84
50
85
### Rebuild Demo Data (After Release)
51
86
@@ -57,7 +92,7 @@ After the release of a new minor version, generate a new demo data snapshot comp
57
92
58
93
### Create a Release Branch
59
94
60
-
Begin by creating a new branch (based off of`main`) to effect the release. This will comprise the changes listed below.
95
+
Begin by creating a new branch (based on`main`) to effect the release. This will comprise the changes listed below.
61
96
62
97
```
63
98
git checkout main
@@ -85,7 +120,20 @@ In cases where upgrading a dependency to its most recent release is breaking, it
85
120
86
121
### Update UI Dependencies
87
122
88
-
Check whether any UI dependencies (JavaScript packages, fonts, etc.) need to be updated by running `yarn outdated` from within the `project-static/` directory. [Upgrade these dependencies](./web-ui.md#updating-dependencies) as necessary, then run `yarn bundle` to generate the necessary files for distribution.
123
+
Check whether any UI dependencies (JavaScript packages, fonts, etc.) need to be updated by running `yarn outdated` from within the `project-static/` directory. [Upgrade these dependencies](./web-ui.md#updating-dependencies) as necessary, then run `yarn bundle` to generate the necessary files for distribution:
124
+
125
+
```
126
+
$ yarn bundle
127
+
yarn run v1.22.19
128
+
$ node bundle.js
129
+
✅ Bundled source file 'styles/external.scss' to 'netbox-external.css'
130
+
✅ Bundled source file 'styles/netbox.scss' to 'netbox.css'
131
+
✅ Bundled source file 'styles/svg/rack_elevation.scss' to 'rack_elevation.css'
132
+
✅ Bundled source file 'styles/svg/cable_trace.scss' to 'cable_trace.css'
133
+
✅ Bundled source file 'index.ts' to 'netbox.js'
134
+
✅ Copied graphiql files
135
+
Done in 1.00s.
136
+
```
89
137
90
138
### Rebuild the Device Type Definition Schema
91
139
@@ -116,16 +164,22 @@ Then, compile these portable (`.po`) files for use in the application:
116
164
117
165
### Update Version and Changelog
118
166
119
-
* Update the version and published date in `release.yaml` with the current version & date. Add a designation (e.g.g`beta1`) if applicable.
167
+
* Update the version number and date in `netbox/release.yaml`. Add or remove the designation (e.g. `beta1`) if applicable.
120
168
* Update the example version numbers in the feature request and bug report templates under `.github/ISSUE_TEMPLATES/`.
121
-
* Replace the "FUTURE" placeholder in the release notes with the current date.
169
+
* Add a section for this release at the top of the changelog page for the minor version (e.g. `docs/release-notes/version-4.2.md`) listing all relevant changes made in this release.
170
+
171
+
!!! tip
172
+
Put yourself in the shoes of the user when recording change notes. Focus on the effect that each change has for the end user, rather than the specific bits of code that were modified in a PR. Ensure that each message conveys meaning absent context of the initial feature request or bug report. Remember to include keywords or phrases (such as exception names) that can be easily searched.
122
173
123
174
### Submit a Pull Request
124
175
125
176
Commit the above changes and submit a pull request titled **"Release vX.Y.Z"** to merge the current release branch (e.g. `release-vX.Y.Z`) into `main`. Copy the documented release notes into the pull request's body.
126
177
127
178
Once CI has completed and a colleague has reviewed the PR, merge it. This effects a new release in the `main` branch.
128
179
180
+
!!! warning
181
+
To ensure a streamlined review process, the pull request for a release **must** be limited to the changes outlined in this document. A release PR must never include functional changes to the application: Any unrelated "cleanup" needs to be captured in a separate PR prior to the release being shipped.
182
+
129
183
### Create a New Release
130
184
131
185
Create a [new release](https://github.com/netbox-community/netbox/releases/new) on GitHub with the following parameters.
Copy file name to clipboardExpand all lines: docs/development/style-guide.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ NetBox generally follows the [Django style guide](https://docs.djangoproject.com
22
22
23
23
### Linting
24
24
25
-
The [ruff](https://docs.astral.sh/ruff/) linter is used to enforce code style. A [pre-commit hook](./getting-started.md#3-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `ruff` manually, run:
25
+
The [ruff](https://docs.astral.sh/ruff/) linter is used to enforce code style, and is run automatically by [pre-commit](./getting-started.md#5-install-pre-commit). To invoke `ruff` manually, run:
Copy file name to clipboardExpand all lines: docs/development/translations.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ To download translated strings automatically, you'll need to:
30
30
1. Install the [Transifex CLI client](https://github.com/transifex/cli)
31
31
2. Generate a [Transifex API token](https://app.transifex.com/user/settings/api/)
32
32
33
-
Once you have the client set up, run the following command:
33
+
Once you have the client set up, run the following command from the project root (e.g. `/opt/netbox/`):
34
34
35
35
```no-highlight
36
36
TX_TOKEN=$TOKEN tx pull
@@ -46,6 +46,9 @@ Once retrieved, the updated strings need to be compiled into new `.mo` files so
46
46
47
47
Once any new `.mo` files have been generated, they need to be committed and pushed back up to GitHub. (Again, this is typically done as part of publishing a new NetBox release.)
48
48
49
+
!!! tip
50
+
Run `git status` to check that both `*.mo` & `*.po` files have been updated as expected.
51
+
49
52
## Proposing New Languages
50
53
51
54
If you'd like to add support for a new language to NetBox, the first step is to [submit a GitHub issue](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+translation&projects=&template=translation.yaml) to capture the proposal. While we'd like to add as many languages as possible, we do need to limit the rate at which new languages are added. New languages will be selected according to community interest and the number of volunteers who sign up as translators.
0 commit comments