-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update data-validation.md #16183
Update data-validation.md #16183
Conversation
Issues to change the documentation netbox-community#16076 PROTECTION_RULES extended by an example of what works in the WEB UI.
Revised after suggestion by jeremystretch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revised according to jeremystretch suggestion.
I hope I did it right. At first it was difficult to find out how to revise the file. I hope I have triggered everything so that the review can continue. My first revision :D |
Image inserted in code area
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image inserted in code area
Image uploaded as an attachment so that it has an image ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image uploaded as an attachment so that it has an image ID.
@LHBL2003 see (https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/index.md) for an example, specifically the line:
It points to this location in the source-tree (https://github.com/netbox-community/netbox/tree/develop/docs/media) so you will want to put any images into the source-tree in the appropriate place in under docs/media and make the link point to that. We do this so the documentation will work for people who locally install it. |
…ration-History-Protection-rules-Example.png Rename
…rotection-rules-Example.png to Configuration-History-Protection-rules-Example.png Rename
Images netbox UI path specification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Images netbox UI path specification.
For God's sake, I would never have thought of that. You need documentation to insert pictures into the documentation :D |
Your are more familiar with the whole subject? If I understand it correctly, then example 1 is something that is stored in configuration.py. If so, then we should add it to the configuration that this must be entered in Configuration.py.
Wouldn't it make sense to document that you have to leave out the code if you don't use a validator class?
Because I didn't understand it as a Newbie. And from current experience, I would say that the Codeshnipsel is interesting, but sometimes there are misunderstandings. I don't think the last comma at the end of the code snippet belongs there at all. But I don't know enough about the subject for that. |
This PR has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further action is taken. |
@@ -96,6 +96,7 @@ The following colors are supported: | |||
|
|||
This is a mapping of models to [custom validators](../customization/custom-validation.md) against which an object is evaluated immediately prior to its deletion. If validation fails, the object is not deleted. An example is provided below: | |||
|
|||
Example prevents the deletion of a site entry: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not needed. The above text references the example.
Example prevents the deletion of a device entry: | ||
|
||
```python | ||
{ | ||
"dcim.device": [ | ||
{ | ||
"status": { | ||
"eq": "decommissioning" | ||
} | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is essentially a duplication of the example above, and is not needed.
] | ||
} | ||
``` | ||
[![NetBox UI](./media/screenshots/Configuration-History-Protection-rules-Example.png)](./media/screenshots/Configuration-History-Protection-rules-Example.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of your images are broken. Please be sure to render the documentation locally with mkdocs serve
and verify your changes before submitting a PR.
``` | ||
[![NetBox UI](./media/screenshots/Configuration-History-Protection-rules-Example.png)](./media/screenshots/Configuration-History-Protection-rules-Example.png) | ||
|
||
If you navigate to a device, rack or site, you will find the path in the top right-hand corner: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be a screenshot; it can just be an embedded tip.
Closing this for inactivity. |
Issues to change the documentation
#16076
PROTECTION_RULES extended by an example of what works in the WEB UI.
Fixes: #16076