-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
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.
@@ -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.
Please change this to regular text, extending the paragraph above. Text emphasis should be used sparingly.
|
||
### Configuration via Web UI | ||
|
||
![image](https://github.com/netbox-community/netbox/assets/46369917/6fb69ab8-1f13-4b86-b84c-ce697af8f679) |
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.
All images presented in the documentation must be included in the code base.
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.
@LHBL2003 you actually need to include the image in the codebase and git-add it to the code so that it appears in the PR.
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.
OK feels strange. But this means that the image is displayed as a path. :)
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.
@arthanson I'm not sure if I understand you correctly. Do I have to insert the image paths "![ Image ] ( https://..." into the code block python... ![ Image ] ( https://...
. Or do you think I have to upload the images as an attachment on the Git Hub page so that they get an image ID "![IMG_0047](https://".
Sorry for the stupid question, I have now done the latter. Because I don't have a code base for the 2nd image.
**Path:** | ||
- WebUI (v3.x.x) --> Admin --> Configuration Config Revisions --> Add (or Edit last Config) | ||
- WebUI (v4.0.0) --> Admin --> Configuration History --> Add (or Edit last Config) |
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.
It is not necessary to specify the navigation path.
**Path:** | |
- WebUI (v3.x.x) --> Admin --> Configuration Config Revisions --> Add (or Edit last Config) | |
- WebUI (v4.0.0) --> Admin --> Configuration History --> Add (or Edit last Config) |
- WebUI (v3.x.x) --> Admin --> Configuration Config Revisions --> Add (or Edit last Config) | ||
- WebUI (v4.0.0) --> Admin --> Configuration History --> Add (or Edit last Config) | ||
|
||
**Example prevents the deletion of a device 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.
As above, please convert this to regular text in paragraph form.
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. |
Issues to change the documentation
#16076
PROTECTION_RULES extended by an example of what works in the WEB UI.
Fixes: #1234