Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
806ff64
PRVB
jeremystretch May 22, 2024
103c08c
Update exempt issue labels for stale action
jeremystretch May 22, 2024
eb3adc0
Added 1000-Base-TX to the choices.py
Julio-Oliveira-Encora May 28, 2024
8a91252
16286 fix provider account search
arthanson May 24, 2024
360f3bc
16284 fix plugin forms doc
arthanson May 24, 2024
0bfb977
14810 add contacts to service
arthanson May 21, 2024
f1bf4c8
Closes #16297: Add uwsgi.ini in .gitignore
markkuleinio May 28, 2024
418389c
Update translations workflow documentation
jeremystretch May 29, 2024
a094719
Closes #16290: Capture entire object in changelog data
jeremystretch May 28, 2024
4d924a9
16202 fix mapit button for internationalized decimal seperator (#16270)
arthanson May 29, 2024
67165a9
Remove abhi1693 from issue triage rotation
jeremystretch May 29, 2024
a3c4984
Skip CI if changes are limited to non-code paths
jeremystretch May 30, 2024
f5aa34b
Add GitHub action to run makemessages
jeremystretch May 30, 2024
153341c
Install gettext
jeremystretch May 30, 2024
4ad7458
Fix action permissions
jeremystretch May 30, 2024
05d3224
Update source translation strings
github-actions[bot] May 30, 2024
05c69f8
Enable scheduled runs
jeremystretch May 30, 2024
e095ec6
Fixes #13422: Rebuild MPTT trees for applicable models when merging s…
jeremystretch May 29, 2024
26a856f
Changelog for #13422, #14810, #15489, #16202, #16286, #16290
jeremystretch May 31, 2024
0dde0b5
Fixes #16312: Fix object list navigation for dashboard widgets
jeremystretch May 31, 2024
e18e6cf
Update source translation strings
github-actions[bot] Jun 1, 2024
6027544
Update workflows to use most recent release of each action
jeremystretch Jun 3, 2024
24d02cb
Fixes #15194: Prevent enqueuing duplicate events for an object
jeremystretch May 31, 2024
fdad59c
Fixes: #16039 - Fix row highlighting on device components and VM inte…
DanSheps Jun 3, 2024
8e48e93
16261 fix graphql lookup for MultiValueCharFilter fields (#16354)
arthanson Jun 3, 2024
291e066
Update source translation strings
github-actions[bot] Jun 4, 2024
7be003f
Allow plugins to extend objectchange view (#16371)
ITJamie Jun 4, 2024
8ab9afb
Fixes: #16083 - Add font-variant-ligatures setting to disable ligatur…
DanSheps Jun 4, 2024
87109f5
16315 - Cant filter changelog by object type (no results found) (#16324)
Julio-Oliveira-Encora Jun 4, 2024
4242546
Fixes #16376: Log changes on terminating objects when attaching a cable
jeremystretch Jun 4, 2024
81f0a40
Update source translation strings
github-actions[bot] Jun 5, 2024
c27cb6f
Fix styling of object jobs table
jeremystretch Jun 5, 2024
b10fb67
Fixed error when the active Config is deleted and rest only one to re…
Julio-Oliveira-Encora Jun 5, 2024
18b4340
Fixes #16274: Dark mode highlight color (#16355)
ljarasius Jun 6, 2024
8f87c72
16050 Show script python_class name and description (#16185)
arthanson Jun 6, 2024
3acf3b5
Fixes: #14567 - Export current view of IP Addresses (#15659)
Julio-Oliveira-Encora Jun 6, 2024
7e1b3d0
15873 - Make Cluster resource counters more readable (#15900)
Julio-Oliveira-Encora Jun 6, 2024
58f22ee
Updates for project NetBox (#16346)
transifex-integration[bot] Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/auto-assign-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
auto-assign:
runs-on: ubuntu-latest
steps:
- uses: pozil/auto-assign-issue@v1
- uses: pozil/auto-assign-issue@v2
if: "contains(github.event.issue.labels.*.name, 'status: needs triage')"
with:
# Weighted assignments
assignees: arthanson:3, jeffgdotorg:3, jeremystretch:3, abhi1693, DanSheps
assignees: arthanson:3, jeffgdotorg:3, jeremystretch:3, DanSheps
numOfAssignee: 1
abortIfPreviousAssignees: true
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
name: CI
on: [push, pull_request]

on:
push:
paths-ignore:
- 'contrib/**'
- 'docs/**'
pull_request:
paths-ignore:
- 'contrib/**'
- 'docs/**'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,20 +45,20 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install Yarn Package Manager
run: npm install -g yarn

- name: Setup Node.js with Yarn Caching
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
necessary.
days-before-issue-stale: 90
days-before-issue-close: 30
exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone'
exempt-issue-labels: 'status: accepted,status: backlog,status: blocked'
stale-issue-label: 'pending closure'
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/update-translation-strings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update translation strings

on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:

permissions:
contents: write

env:
LOCALE: "en"

jobs:
makemessages:
runs-on: ubuntu-latest
env:
NETBOX_CONFIGURATION: netbox.configuration_testing

steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install system dependencies
run: sudo apt install -y gettext

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run makemessages
run: python netbox/manage.py makemessages -l ${{ env.LOCALE }}

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
add: 'netbox/translations/'
default_author: github_actions
message: 'Update source translation strings'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ local_settings.py
!upgrade.sh
fabfile.py
gunicorn.py
uwsgi.ini
netbox.log
netbox.pid
.DS_Store
Expand Down
6 changes: 0 additions & 6 deletions docs/customization/custom-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ class AnotherCustomScript(Script):
script_order = (MyCustomScript, AnotherCustomScript)
```

## Module Attributes

### `name`

You can define `name` within a script module (the Python file which contains one or more scripts) to set the module name. If `name` is not defined, the module's file name will be used.

## Script Attributes

Script attributes are defined under a class named `Meta` within the script. These are optional, but encouraged.
Expand Down
10 changes: 1 addition & 9 deletions docs/development/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,7 @@ This will automatically update the schema file at `contrib/generated_schema.json

### Update & Compile Translations

Log into [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) to download the updated string maps. Download the resource (portable object, or `.po`) file for each language and save them to `netbox/translations/$lang/LC_MESSAGES/django.po`, overwriting the current files. (Be sure to click the **Download for use** link.)

![Transifex download](../media/development/transifex_download.png)

Once the resource files for all languages have been updated, compile the machine object (`.mo`) files using the `compilemessages` management command:

```nohighlight
./manage.py compilemessages
```
Updated language translations should be pulled from [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) and re-compiled for each new release. Follow the documented process for [updating translated strings](./translations.md#updating-translated-strings) to do this.

### Update Version and Changelog

Expand Down
31 changes: 26 additions & 5 deletions docs/development/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,38 @@ All language translations in NetBox are generated from the source file found at

Reviewers log into Transifex and navigate to their designated language(s) to translate strings. The initial translation for most strings will be machine-generated via the AWS Translate service. Human reviewers are responsible for reviewing these translations and making corrections where necessary.

Immediately prior to each NetBox release, the translation maps for all completed languages will be downloaded from Transifex, compiled, and checked into the NetBox code base by a maintainer.

## Updating Translation Sources

To update the English `.po` file from which all translations are derived, use the `makemessages` management command:
To update the English `.po` file from which all translations are derived, use the `makemessages` management command (ignoring the `project-static/` directory):

```nohighlight
./manage.py makemessages -l en -i "project-static/*"
```

Then, commit the change and push to the `develop` branch on GitHub. Any new strings will appear for translation on Transifex automatically.

## Updating Translated Strings

Typically, translated strings need to be updated only as part of the NetBox [release process](./release-checklist.md).

To update translated strings, start by initiating a sync from Transifex. From the Transifex dashboard, navigate to Settings > Integrations > GitHub > Manage, and click the **Manual Sync** button at top right.

![Transifex manual sync](../media/development/transifex_sync.png)

Enter a threshold percentage of 1 (to ensure all translations are captured) and select the `develop` branch, then click **Sync**. This will initiate a pull request to GitHub to update any newly modified translation (`.po`) files.

!!! tip
The new PR should appear within a few minutes. If it does not, check that there are in fact new translations to be added.

![Transifex pull request](../media/development/transifex_pull_request.png)

Once the PR has been merged, the updated strings need to be compiled into new `.mo` files so they can be used by the application. Update the `develop` branch locally to pull in the changes from the Transifex PR, then run Django's [`compilemessages`](https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-compilemessages) management command:

```nohighlight
./manage.py makemessages -l en
./manage.py compilemessages
```

Then, commit the change and push to the `develop` branch on GitHub. After some time, any new strings will appear for translation on Transifex automatically.
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.)

## Proposing New Languages

Expand Down
Binary file removed docs/media/development/transifex_download.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/development/transifex_sync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/plugins/development/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ This form facilitates editing multiple objects in bulk. Unlike a model form, thi
from django import forms
from django.utils.translation import gettext_lazy as _
from dcim.models import Site
from netbox.forms import NetBoxModelImportForm
from netbox.forms import NetBoxModelBulkEditForm
from utilities.forms import CommentField, DynamicModelChoiceField
from utilities.forms.rendering import FieldSet
from .models import MyModel, MyModelStatusChoices


class MyModelEditForm(NetBoxModelImportForm):
class MyModelBulkEditForm(NetBoxModelBulkEditForm):
name = forms.CharField(
required=False
)
Expand Down
16 changes: 16 additions & 0 deletions docs/release-notes/version-4.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# NetBox v4.0

## v4.0.4 (FUTURE)

### Enhancements

* [#14810](https://github.com/netbox-community/netbox/issues/14810) - Enable contact assignment for services
* [#15489](https://github.com/netbox-community/netbox/issues/15489) - Add 1000Base-TX interface type
* [#16290](https://github.com/netbox-community/netbox/issues/16290) - Capture entire object in changelog data (but continue to display only non-internal attributes)

### Bug Fixes

* [#13422](https://github.com/netbox-community/netbox/issues/13422) - Rebuild MPTT trees for applicable models after merging staged changes
* [#16202](https://github.com/netbox-community/netbox/issues/16202) - Fix site map button URL for certain localizations
* [#16286](https://github.com/netbox-community/netbox/issues/16286) - Fix global search support for provider accounts

---

## v4.0.3 (2024-05-22)

### Enhancements
Expand Down
1 change: 1 addition & 0 deletions netbox/circuits/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ProviderIndex(SearchIndex):
display_attrs = ('description',)


@register_search
class ProviderAccountIndex(SearchIndex):
model = models.ProviderAccount
fields = (
Expand Down
2 changes: 1 addition & 1 deletion netbox/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def get(self, request, pk):
for param in PARAMS:
params.append((
param.name,
current_config.data.get(param.name, None),
current_config.data.get(param.name, None) if current_config else None,
candidate_config.data.get(param.name, None)
))

Expand Down
2 changes: 2 additions & 0 deletions netbox/dcim/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ class InterfaceTypeChoices(ChoiceSet):
TYPE_100ME_FIXED = '100base-tx'
TYPE_100ME_T1 = '100base-t1'
TYPE_1GE_FIXED = '1000base-t'
TYPE_1GE_TX_FIXED = '1000base-tx'
TYPE_1GE_GBIC = '1000base-x-gbic'
TYPE_1GE_SFP = '1000base-x-sfp'
TYPE_2GE_FIXED = '2.5gbase-t'
Expand Down Expand Up @@ -987,6 +988,7 @@ class InterfaceTypeChoices(ChoiceSet):
(TYPE_100ME_FIXED, '100BASE-TX (10/100ME)'),
(TYPE_100ME_T1, '100BASE-T1 (10/100ME Single Pair)'),
(TYPE_1GE_FIXED, '1000BASE-T (1GE)'),
(TYPE_1GE_TX_FIXED, '1000BASE-TX (1GE)'),
(TYPE_2GE_FIXED, '2.5GBASE-T (2.5GE)'),
(TYPE_5GE_FIXED, '5GBASE-T (5GE)'),
(TYPE_10GE_FIXED, '10GBASE-T (10GE)'),
Expand Down
10 changes: 5 additions & 5 deletions netbox/dcim/models/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,11 @@ def save(self, *args, **kwargs):
super().save(*args, **kwargs)

# Set the cable on the terminating object
termination_model = self.termination._meta.model
termination_model.objects.filter(pk=self.termination_id).update(
cable=self.cable,
cable_end=self.cable_end
)
termination = self.termination._meta.model.objects.get(pk=self.termination_id)
termination.snapshot()
termination.cable = self.cable
termination.cable_end = self.cable_end
termination.save()

def delete(self, *args, **kwargs):

Expand Down
Loading