-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from jasonyates/develop
Adding support for external URL's
- Loading branch information
Showing
26 changed files
with
782 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
pip install build twine | ||
|
||
python -m build | ||
twine upload -r testpypi dist/* | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Changelog | ||
|
||
## 0.5.0 (2023-01-24) | ||
|
||
* Fix API Filtersets | ||
* Add support for storing links to external URL's | ||
* Documentation updates | ||
|
||
## 0.4.6 (2023-01-23) | ||
|
||
* Added nested serializer. | ||
|
||
## 0.4.5 (2023-01-03) | ||
|
||
* Updated navigation for NetBox 3.4 | ||
* Added support for plugin search indexing | ||
|
||
## 0.4.4 (2023-01-02) | ||
|
||
* Added Device Type support | ||
* Fix files not being deleted from disk | ||
|
||
## 0.3.1 (2022-04-06) | ||
|
||
* Adds help text to add/edit forms | ||
* Updating table view to link to the document object view | ||
* Adds button to document widget to link to the document object view | ||
* Adds a link to the associated parent objet from the document object view | ||
* Adds a link to uploaded document from the document object view | ||
* Updates document_type to render as a badge on document object view and document widget | ||
|
||
## 0.3.0 (2022-04-04) | ||
|
||
* Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Contributing | ||
|
||
Contributions are welcome, and they are greatly appreciated! Every little bit | ||
helps, and credit will always be given. | ||
|
||
You can contribute in many ways: | ||
|
||
## Types of Contributions | ||
|
||
### Report Bugs | ||
|
||
Report bugs at https://github.com/jasonyates/netbox-documents/issues. | ||
|
||
If you are reporting a bug, please include: | ||
|
||
* Your operating system name and version. | ||
* Any details about your local setup that might be helpful in troubleshooting. | ||
* Detailed steps to reproduce the bug. | ||
|
||
### Fix Bugs | ||
|
||
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help | ||
wanted" is open to whoever wants to implement it. | ||
|
||
### Implement Features | ||
|
||
Look through the GitHub issues for features. Anything tagged with "enhancement" | ||
and "help wanted" is open to whoever wants to implement it. | ||
|
||
### Write Documentation | ||
|
||
Netbox Documents Plugin could always use more documentation, whether as part of the | ||
official Netbox Documents Plugin docs, in docstrings, or even on the web in blog posts, | ||
articles, and such. | ||
|
||
### Submit Feedback | ||
|
||
The best way to send feedback is to file an issue at https://github.com/jasonyates/netbox-documents/issues. | ||
|
||
If you are proposing a feature: | ||
|
||
* Explain in detail how it would work. | ||
* Keep the scope as narrow as possible, to make it easier to implement. | ||
* Remember that this is a volunteer-driven project, and that contributions | ||
are welcome :) | ||
|
||
## Get Started! | ||
|
||
Ready to contribute? Here's how to set up `netbox-documents` for local development. | ||
|
||
1. Fork the `netbox-documents` repo on GitHub. | ||
2. Clone your fork locally | ||
|
||
``` | ||
$ git clone [email protected]:your_name_here/netbox-documents.git | ||
``` | ||
3. Install dependencies and start your virtualenv: | ||
``` | ||
$ poetry install -E test -E doc -E dev | ||
``` | ||
4. Create a branch for local development: | ||
``` | ||
$ git checkout -b name-of-your-bugfix-or-feature | ||
``` | ||
Now you can make your changes locally. | ||
5. When you're done making changes, check that your changes pass the | ||
tests, including testing other Python versions, with tox: | ||
``` | ||
$ poetry run tox | ||
``` | ||
6. Commit your changes and push your branch to GitHub: | ||
``` | ||
$ git add . | ||
$ git commit -m "Your detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
``` | ||
7. Submit a pull request through the GitHub website. | ||
## Pull Request Guidelines | ||
Before you submit a pull request, check that it meets these guidelines: | ||
1. The pull request should include tests. | ||
2. If the pull request adds functionality, the docs should be updated. Put | ||
your new functionality into a function with a docstring, and add the | ||
feature to the list in README.md. | ||
3. The pull request should work for Python 3.6, 3.7, 3.8 and 3.9. Check | ||
https://github.com/jasonyates/netbox-documents/actions | ||
and make sure that the tests pass for all supported Python versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ class NetboxDocuments(PluginConfig): | |
name = 'netbox_documents' | ||
verbose_name = 'Document Storage' | ||
description = 'Manage site, circuit and device diagrams and documents in Netbox' | ||
version = '0.4.6' | ||
version = '0.5.0' | ||
author = 'Jason Yates' | ||
author_email = '[email protected]' | ||
min_version = '3.2.0' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
from netbox.api.viewsets import NetBoxModelViewSet | ||
|
||
from .. import models | ||
from .. import models, filtersets | ||
from .serializers import SiteDocumentSerializer, DeviceDocumentSerializer, DeviceTypeDocumentSerializer, CircuitDocumentSerializer | ||
|
||
class SiteDocumentViewSet(NetBoxModelViewSet): | ||
queryset = models.SiteDocument.objects.prefetch_related('tags') | ||
serializer_class = SiteDocumentSerializer | ||
filterset_class = filtersets.SiteDocumentFilterSet | ||
|
||
class DeviceDocumentViewSet(NetBoxModelViewSet): | ||
queryset = models.DeviceDocument.objects.prefetch_related('tags') | ||
serializer_class = DeviceDocumentSerializer | ||
|
||
filterset_class = filtersets.DeviceDocumentFilterSet | ||
|
||
class DeviceTypeDocumentViewSet(NetBoxModelViewSet): | ||
queryset = models.DeviceTypeDocument.objects.prefetch_related('tags') | ||
serializer_class = DeviceTypeDocumentSerializer | ||
filterset_class = filtersets.DeviceTypeDocumentFilterSet | ||
|
||
class CircuitDocumentViewSet(NetBoxModelViewSet): | ||
queryset = models.CircuitDocument.objects.prefetch_related('tags') | ||
serializer_class = CircuitDocumentSerializer | ||
serializer_class = CircuitDocumentSerializer | ||
filterset_class = filtersets.CircuitDocumentFilterSet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.