Commit graph

43 commits

Author SHA1 Message Date
58e7ff0780 [tutorial 024] Conditional hidden family and calculated default value
Add a sub family "https_proxy" which will be hidden if "use_for_https" is True.

Hidden means that we cannot change value, but we can access to it in read only mode. Inside, we add two variable with calculated default value (with variable type).

So, if user set "use_for_https" to True, the default values of HTTPS configuration will be a copy of HTTP values. The use can change HTTPS values if needed.

If user set "use_for_https" to False, the default values of HTTPS configuration will only be a copy of HTTP values.
2024-09-07 19:06:46 +02:00
d17f2d3c7b [tutorial 024] Conditional hidden family and calculated default value (config and doc) 2024-09-07 19:06:46 +02:00
57640cb47d [tutorial 023] Conditional hidden family and calculated default value
Add a sub family "https_proxy" which will be hidden if "use_for_https" is True.

Hidden means that we cannot change value, but we can access to it in read only mode. Inside, we add two variable with calculated default value (with variable type).

So, if user set "use_for_https" to True, the default values of HTTPS configuration will be a copy of HTTP values. The use can change HTTPS values if needed.

If user set "use_for_https" to False, the default values of HTTPS configuration will only be a copy of HTTP values.
2024-09-07 19:06:45 +02:00
b285130eaf [tutorial 023] Conditional hidden family and calculated default value (config and doc) 2024-09-07 19:06:45 +02:00
22376999bb [tutorial 022] A variable in "shorthand" mode
Transform it in "shorthand" mode.

In this notation we can only define:

- name
- default value (so deduct the type)
- description
2024-09-07 19:06:44 +02:00
b4c0913830 [tutorial 022] A variable in "shorthand" mode (config and doc) 2024-09-07 19:06:44 +02:00
a1d82f1d56 [tutorial 021] Bases type is optional if default value
The type is deduct with the default value type. This is only true for "string", "number", "float" or "boolean" variables.
2024-09-07 19:06:43 +02:00
941796c3ea [tutorial 021] Bases type is optional if default value (config and doc) 2024-09-07 19:06:43 +02:00
a6eb552218 [tutorial 020] A boolean variable
Let's create a boolean variable.
2024-09-07 19:06:42 +02:00
fe90edc4a0 [tutorial 020] A boolean variable (config and doc) 2024-09-07 19:06:42 +02:00
45115a7601 [tutorial 018] Family in "shorthand" mode
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.

Inside the sub family we add two variables (with domainname and port types).
2024-09-07 19:06:40 +02:00
55a9afa0c9 [tutorial 018] Family in "shorthand" mode (config and doc) 2024-09-07 19:06:40 +02:00
3039ddbf94 [tutorial 017] Family in "shorthand" mode
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.

Inside the sub family we add two variables (with domainname and port types).
2024-09-07 19:06:39 +02:00
d704e22c00 [tutorial 017] Family in "shorthand" mode (config and doc) 2024-09-07 19:06:39 +02:00
f39f178d12 [tutorial 016] Family in "shorthand" mode
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.

Inside the sub family we add two variables (with domainname and port types).
2024-09-07 19:06:38 +02:00
2be7f53881 [tutorial 016] Family in "shorthand" mode (config and doc) 2024-09-07 19:06:38 +02:00
5ddac2d967 [tutorial 015] Family in "shorthand" mode
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.

Inside the sub family we add two variables (with domainname and port types).
2024-09-07 19:06:37 +02:00
cf2e536af5 [tutorial 015] Family in "shorthand" mode (config and doc) 2024-09-07 19:06:37 +02:00
d6fb08d2cc [tutorial 014] Family in "shorthand" mode
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.

Inside the sub family we add two variables (with domainname and port types).
2024-09-07 19:06:36 +02:00
3c3df03788 [tutorial 014] Family in "shorthand" mode (config and doc) 2024-09-07 19:06:36 +02:00
3611325a24 [tutorial 013] A sub family
Inside a family, we can have variables or families.

The "type" for family "manual" became unecessary because container an other family, so it's not a variable.

In disabled attribute, it's better tu use relative path (we will see the reason in an other slide).
2024-09-07 19:06:35 +02:00
511dfab6a8 [tutorial 013] A sub family (config and doc) 2024-09-07 19:06:35 +02:00
23f42b3f00 [tutorial 012] Conditional desactived family
This family will be desactived if "proxy_mode" is not "manual proxy configuration".

Desactived a variable or a family means that this variable will never be accessible.
2024-09-07 19:06:34 +02:00
f6c8885e14 [tutorial 012] Conditional desactived family (config and doc) 2024-09-07 19:06:34 +02:00
666947cfc5 [tutorial 011] Conditional desactived family
This family will be desactived if "proxy_mode" is not "manual proxy configuration".

Desactived a variable or a family means that this variable will never be accessible.
2024-09-07 19:06:33 +02:00
2709913b05 [tutorial 011] Conditional desactived family (config and doc) 2024-09-07 19:06:33 +02:00
8613880131 [tutorial 010] A family
The "manual" mode structural descriptions are write in a new files to separate things. But Rougail will concatenate variables and families.

We create a family, which will contain other variables.

This family has:

- a description
- a type

As there is no variable inside this family, the type is mandatory. Without it, Rougail will create a variable.

In fact, this family will be deleted by Rougail too because it is empty.
2024-09-07 19:06:33 +02:00
bd5e2c3bf6 [tutorial 010] A family (config and doc) 2024-09-07 19:06:32 +02:00
b0323f2621 [tutorial 007] Choice type is optional
The type is optional in choice type (if we have choices attributes, it's a choice option).
2024-09-07 19:06:32 +02:00
2742559f6c [tutorial 007] Choice type is optional (config and doc) 2024-09-07 19:06:32 +02:00
cb298bcb68 [tutorial 006] A variable with type choice
"Foo" should not be an option to the "proxy_mode" variable.

Now the "proxy_mode" type is "choice", that means that there is a list of available values that can be selected.

We say that the "proxy_mode" variable is constrained (by choices): this variable accept, in fact, only a list of choices.
2024-09-07 19:06:31 +02:00
6dbf03291b [tutorial 006] A variable with type choice (config and doc) 2024-09-07 19:06:31 +02:00
58f8783710 [tutorial 005] A default value
Now we can define the default value of this variable.

If the user doesn't touch this variable's value, the value is "No proxy"

As user intervention is no more required, so the variable change it's default mode too (from "basic" to "standard").
2024-09-07 19:06:30 +02:00
f9aa793a86 [tutorial 005] A default value (config and doc) 2024-09-07 19:06:30 +02:00
fb7542ed97 [tutorial 004] The variable description
We can add a description to this first variable.

This information is useful for:

- documentation
- error message
- help user to known which value to set to this variable (for example with [the user data plugin Questionary](https://forge.cloud.silique.fr/gnunux/rougail-user-data-questionary)).
2024-09-07 19:06:29 +02:00
1b2f09b8da [tutorial 004] The variable description (config and doc) 2024-09-07 19:06:29 +02:00
103cb5760b [tutorial 003] A first variable
In the Firefox configuration, it is possible to define several configuration modes,
from no proxy at all ("No proxy") to a kind of automatic configuration mode from a file
("Automatic proxy configuration URL").

We’re gonna create a first variable called "proxy_mode":

- accepts only a string as value
- requires a value (that is, None is not an option)
2024-09-07 19:06:28 +02:00
35480173a8 [tutorial 003] A first variable (config and doc) 2024-09-07 19:06:28 +02:00
7ea014c4a4 [tutorial 002] A first variable
In the Firefox configuration, it is possible to define several configuration modes,
from no proxy at all ("No proxy") to a kind of automatic configuration mode from a file
("Automatic proxy configuration URL").

We’re gonna create a first variable called "proxy_mode":

- accepts only a string as value
- requires a value (that is, None is not an option)
2024-09-07 19:06:27 +02:00
c9186bff17 [tutorial 002] A first variable (config and doc) 2024-09-07 19:06:27 +02:00
cade5ad594 [tutorial 001] An empty file 2024-09-07 19:06:26 +02:00
8146d74bf6 [tutorial 001] An empty file (config and doc) 2024-09-07 19:06:26 +02:00
3ab1f5bc2b [init] Discover Rougail 2024-09-07 19:06:25 +02:00