Manual
Manual
Introduction.................................................................................................................................................2
Create configuration file..............................................................................................................................3
Define new parameter.............................................................................................................................3
Parameter explanation................................................................................................................................3
Name.......................................................................................................................................................3
Title..........................................................................................................................................................4
Type.........................................................................................................................................................5
Default.....................................................................................................................................................7
Select values............................................................................................................................................8
RegExp.....................................................................................................................................................9
RegExp Error message...........................................................................................................................10
URL async data......................................................................................................................................10
Path (async data)...................................................................................................................................11
Disabled.................................................................................................................................................12
Required................................................................................................................................................13
Advanced...............................................................................................................................................13
Hide condition.......................................................................................................................................14
Container referenced parameters.........................................................................................................15
Container header...................................................................................................................................15
Parameter remove/move..........................................................................................................................16
1
Introduction
1. In order to reach Automatic Networking page generator, go here:
http://gui.antek.it/gui/#/network;replaceUrl=true/(settings:settings)
- Then go to last tab, named “Automatic Networking pages”
From there you can either create new configuration/edit present configurations, but since they are
basically the same thing I will write general usage tool on how to create parameters.
2
Create configuration file
When you open “new (empty configuration option)” you will have output similar as this:
Clicking on button “Add new parameter” table with parameters should populate with empty entry:
Parameter explanation
Name
3
Name should be usually name of parameter from this document:
https://docs.google.com/document/d/1hc7MhIjAdomJe5qSGtHDEBNJVUo5SZlp7LIxQ6RB9eQ/edit
So, for example, when user is defining let’s say LAN subtype, first parameter name is DESCR so it should
be written as that.
Constraints:
- Parameter name must be unique, because of the frontend algorithm generation (You will
receive error notification if there are 2 parameters with same name)
- Maximum parameter length is 100 characters, Minimum at least 1 character
- Parameter name should not have any spaces in it’s name, because of the JSON handling, and it’s
also forbidden, user will receive notification error
Side note:
- When I created manually forms, I used uppercase names for parameters: DESCR,STATE-
DETECT,IPADD etc.. and I would suggest using it in this way, because of the consistency. I
haven’t added this constraint to check for uppercase parameter name, but it’s recommended.
This parameter won’t be rendered anywhere in the form layout, but in the generated JSON which can be
seen (it’s useful for myself only):
Title
4
Title closely determines field meaning, as it name implies.
Constraints:
- It can be any set of characters, with maximum length of 100 characters, and it will throw error
message if field has more than 100 characters
Type
Type parameter determines how specific parameter will be projected into HTML. There are 5 types:
5
- Number
Number type is ordinary HTML – input type=”number” – field. Only numbers (positive and negative) can
be defined in this field type. It’s rendered as:
- String
String type is ordinary HTML – input type=”text” – field. Any character can be defined in this field type.
It’s rendered as:
- Select
Select type is ordinary HTML - <select></select> field. Only parameters defined into “Select values” field
will be rendered into it’s content. It’s rendered as:
- Checkbox
Checkbox type is ordinary HTML – input type=”checkbox” – field. It’s useful to switch off the parameter
values (Like ON/OFF, true/false). It’s rendered as:
- Checkbox-for-container
Checkbox-for-container type is special type of field which has purpose of nesting it’s parameters inside.
It’s name can be presented as text (Example nr 1)/or already defined field (Example nr 2). Examples:
6
Example 1 (as text label as header)
These specific options (container header as text/as element) are defined in field “Container header”.
Default
With value written into “Default value” field, when rendered field will have default value listed as here.
It’s not rendered into field when creating it, rather then in JSON output.
7
Select values
This field is used to populate field IF field type is declared as “select”. There are 2 ways of defining select
values. Static and Dynamic values can be combined (must be separated by comma) and it they will be
displayed together.
1. Static
Valid values (case matters) should be separated by comma. If not separated, error will be
thrown for valid format.
Valid entires:
- NORMAL,PING,TEST
- Test1,Test-2,Test-5
Invalid entries
- NORMAL,
- NORMAL,,,,,
- ,NORMAL,
2. Dynamic
Often, there is a need of big range of values. Example - From Ip-1 to Ip-999. In order to save time
and of course not to write all of them manually, dynamic values can be generated also. To
generate dynamic values, you should write following pattern:
RANGE(“Some prefix
which will be used”-
[“starting
value”-“Ending value”])
Valid entries:
RANGE(IP-[1-999])
Generated entries:
8
RegExp
This field is very useful to define range constraints for field types:
- String
- Number
Example of digits only regExp (text is invalid in this case, so it’s ok):
Example of digits only RegExp (numbers are valid, so it’s not marking field as invalid):
9
RegExp Error message
This field is used to show user text which will be displayed IF entered values DOESN’T match RegExp.
Example:
- String
For example, if some string field has needs of validating data from some foreign service. Let’s
say it needs only to contain values from “/sys/admin/reslist.json?type=poecli,poeac,dsl”. So you
need to specify URL (without domain.) in this field.
- Number
Same pattern for string applies for number, but of course foreign service should only has
numbers
- Select
10
For select it’s similar situation except it populates select dropdown with values from foreign
service.
This URL async data field is unusable without field “Path (async data)”, so I’m writing it below.
This field works in conjunction with field “URL (async data)”. In order to minimize mistakes, I
recommend to first open URL defined in field “URL (async data)” in the browser. It will show it’s
response as (for example: “gui.antek.it/sys/admin/reslist.json?type=poecli,poeac,dsl”)
So, for this field, user has to specify path to reach values. I think it’s best if user thinks as:
11
- RES
Response.ResList---RES
Response.ResList – Path to get to array of responses
- Response.ResList---SUBTYPE
- Response.ResList---DESCR
- Response.ResList---Saved
Side note: If there are static values (like defined Select values for select field, or regExp for
string/number) and also Async values, it will be automatically used together in order to validate user
input.
Disabled
This field is used to disable field, in order to be only readonly. Disabled field (values cant be edited) is
presented like:
12
13
Required
This field is used to set field to have some value. Required filed will have * in parameter title, at the end,
and if there is no value, proper message is shown:
Advanced
This field is used to set advanced field attribute to selected field, and that field will SHOW only if
checkbox for (show advanced parameters) is selected. If there is not defined ADVANCED parameter
checkbox, user won’t be able to select this field (message will be shown).
Example when this checkbox is selected and (show advanced parameters) is enabled (field is visible):
Example when this checkbox is selected and (show advanced parameters) is disabled (field is hidden):
14
So, with this checkbox, user determines if field should be visible if show advanced parameters checkbox
is selected.
Hide condition
Example:
If user wants to see field TEST, when only value for TEST1 is equal to 123, then it shoud write:
TEST1---EQUAL---123
15
TEST1---EQUAL---123
1. First path till --- (TEST1) is file path for variable which is going to be looked. If variable is located
into container (and let’s say container name is LOGDROPDOWN), then it should be
LOGDROPDOWN.TEST1.
2. In the middle, between --- should be function name. Here it’s EQUAL. For now I have added 4
basic functions:
- EQUAL
- NOTEQUAL
- INCLUDES
- NOTINCLUDES
3. End values is value which should be compared to variable provided. Value should be written as
plain value, without quotes or special characters. Examples (123, PING, true, false, test) etc.
16
Container referenced parameters
Constraints:
Side note: Container referenced parameters can also contain other containers. It will render them
recursively, so user don’t have to specify user level where containers should appear. Also in which order
elements are defined, they will be rendered.
Container header
This field is useful for defining container header text/element which will be rendered. If selected as
“Container header as text”, then header of container will render text which is defined in Parameter Title.
Example:
17
If Container parameter should have element, instead of text, “Container header as text” should be
unselected, and new field will be presented.
In text field, must be presented parameter name (only one). It has same constraints as container
referenced parameters.
If some parameter name is written, then container header will become that element. It can also include
parameter title or not. Example:
Parameter remove/move
18
If user select remove modal, remove modal will be open with option to remove parameter at specific
number.
19