Better user interface to edit reverse DNS servers (dns.revServers)#3769
Better user interface to edit reverse DNS servers (dns.revServers)#3769rdwebdesign wants to merge 7 commits into
Conversation
6233bee to
13b1af4
Compare
b55efd8 to
7574a91
Compare
There was a problem hiding this comment.
Saving gives an error about waitME
I think the re-filled example should not be ticked enabled by default if there is already an entry.
If you input a wrong network range and click add, an error 400 bad request will be shown in the console. Then the whole input areas are cleaned. I think it would be nicer if the wrong values would be preserved so users don't need to input everything but can just fix the issue.
Additionally, the wrong input will still be present in the payload, so FTL will reject it
Yeah... I think I messed up the waitME. I will take a look.
We can change that.
This is expected at the current PR state. |
|
I will mark as draft until I have the time to add validation and fix some issues. Please, feel free to keep testing the code even before I finish the PR. |
Maybe we can enable it automatically once users start to add real input in the fields? |
7574a91 to
ccbc24b
Compare
Fixed. It was a previous bug: you can't call This function was created to be called directly on the class (like I used the |
|
Confirm waitMe error is gone. |
|
Thanks for testing. It would be better if we first merge PR3766. I want to use some of the validation functions already added there. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. |
- add functions and buttons to add, modify, undo changes and delete lines - generate the table using data already on the textarea - add functions to read textarea contents and parse then into an array - add functions to update the textarea contents from the table - hide the textarea. Only the table will be visible - make sure the table is not shown when the option was set by ENV VARS - move some help paragraphs to the table legend - remove usused original help text for the textarea - use fixed size for all action buttons - don't use "icheck" styling on the checkboxes in the table Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
4507ed9 to
c073434
Compare
b45bd22 to
3fb4943
Compare
Previously, the same function was used to initialize the table and update the table rows, when lines were added, edited or deleted. Now, one function initializes the table and another function saves the changes, shows a message and updates the table to reflect the changes. The values are "saved and applied" immediately using an AJAX call. The waitMe overlay is also shown, but the page is NOT reloaded. Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
81637a3 to
be13d75
Compare
fec8044 to
82f2b7c
Compare
- remove `<input>` tags and add contenteditable attribute to all editable cells - rows are always enabled now (no "edit" button to enable them) - Simplify javascript code: - use classNames to simplify column selection, instead of unique ids - use datatables "columnDefs" and "createdCell" to add attributes - use CSS class "editing" and CSS rules to handle buttons - remove unused and unnecessary attributes from elements Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
82f2b7c to
e48dcfe
Compare
and include validation functions Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
e48dcfe to
d449e01
Compare
What does this PR aim to accomplish?
Replace the current single <textarea> with a table.
Each reverse server will be in a separate row and each field will be in a separate table cell.
A small legend will improve usability (maybe we will need to change the help text).
This is an update of #2943
How does this PR accomplish the above?
Using datatables plugin and the FTL API to save dns.revServers entries immediately.
This is still a work in progress.
TODO: