-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
When creating a Datasource, Input Field Checking is not always enforced #4632
Comments
Never used that feature, though I can see why it's handy. |
So, question, I'm assuming you are manually creating the data source rather than doing so using the template engine. Is this a correct assumption? |
The process is somewhat confusing, but glad you clarified. |
Input Field Checking is not enforced upon creation of Data Source
You will have to force load your pages |
@riversdev0, just checking in to see if you are satisfied with the fix... |
Sorry for the slow response. I've been having issues getting it to work correctly, but it might be my fault. I integrated the changes into my prod Cacti installation and here's what it does: When creating a new graph, I enter an invalid value in the field and click "Create". The page goes blank white and does nothing. I click on some other navigation item, and I get a pop-up that says "Save Failed due to field input errors (Check red fields)" overlaid on the unrelated page to which I navigated. I can view other unrelated pages and then circle back to creating the same graph again. When I attempt to create the graph a second time, when it displays the fields again, the field into which I typed the invalid value is now highlighted red, but it contains the default value, not my invalid value. I can clone the development branch onto a dev server and see if the issues happens there. Would you like me to test that? |
You need to force reload the new layout. Browsers like chrome make it hard without clearing your cache. |
Ok, I tried it in a Private browser window and I was able to see the error message, and was able to correct the value, and the new graph was created. I think the change worked as expected! Thank you! |
Describe the bug
If you have a custom field attached to a Data Input Method, that field will only be validated for acceptable data upon being edited, not upon creation.
To Reproduce
Steps to reproduce the behavior:
Create a Data Input Method with a custom Input Field
Set a Regular Expression Match on the Input Field
Create a Data Source Template that allows the user to modify the value of Input Field
Create a Graph Template referencing that Data Source Template
Add a graph using that template to a device. Set the Custom Data to something outside the range of the validation pattern.
Edit the brand new Data Source and observe that the value is out of range.
Save the Data Source with no changes. Observe that the validation fails.
Expected behavior
I would expect the Input Field Checking validation pattern to be enforced upon creation of the Data Source, just as it is during the modification of the Data Source.
Version info
Additional context
I'm willing to help fix this, but some others probably know from memory where the relevant code is located.
The text was updated successfully, but these errors were encountered: