Newline-converted Text Areas in the Avi UI


Starting with Avi Vantage 18.2.2, the Avi UI supports multi-line text fields which are easy to use and make unambiguous Avi’s interpretation of text entered by the UI user. First use of this UI feature is the Health Monitor Profile editor; refer to this article. Additional uses are planned for other multi-line text areas in the UI.

Challenge to be Addressed

In the past, when a UI field accepted a multi-line text field (such as a script), the user had to enter some combination of \r and \n to signify new line. Upon clicking to save the entered text, some browsers or operating systems interpreted the entered text in a fashion other than expected by the user. This would confuse users and could break scripts that had been working.

The Fix: Newline-converted Text Areas

In the new design, when the UI sees any explicitly keyed \r or \n or \r\n, it is replaced with \r\n. The same is true if the user presses the ENTER key to create a new line in the textbox; such ENTERs are saved as \r\n. To ensure the user is aware of the substitutions being made, the UI component displays two boxes: The left box is as before, and into it the user can type anything they like. The right box is read-only, and shows what will be actually submitted and saved by the backend. An icon at bottom right permits toggling of word wrapping on or off, so the user can see it in raw format in one line, or have a more easily readable description wherein each \r\n is separated by a new line. To better understand the operation of newline-converted text areas, some examples follow.


newline-converted text area example1 Example 1

newline-converted text area example2 Example 2

newline-converted text area example3 Example 3

newline-converted text area example4 Example 4