docs(v1.3X-practice): reread first pratice1 revision
This commit is contained in:
parent
b349ac5b1e
commit
58900a412b
4 changed files with 57 additions and 31 deletions
BIN
docs/tutorial/images/firefox130.png
Normal file
BIN
docs/tutorial/images/firefox130.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 118 KiB |
BIN
docs/tutorial/images/practice_twovars.png
Normal file
BIN
docs/tutorial/images/practice_twovars.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
|
|
@ -59,4 +59,5 @@ Let's dive into this **configuration options validation** use case.
|
|||
nullable
|
||||
multiple
|
||||
examples
|
||||
practice1
|
||||
whatsnext
|
||||
|
|
|
|||
|
|
@ -3,19 +3,27 @@ Practice
|
|||
|
||||
.. objectives:: Objectives
|
||||
|
||||
There is nothing new in the two next Firefox variables. So it is the time to practice what we loarn until now.
|
||||
Now it's your turn.
|
||||
Try making some Rougail.
|
||||
At the same time, if you get stuck, you have the solutions in the Rougail tutorial
|
||||
code repository.
|
||||
|
||||
This page will divided in two part for each variable:
|
||||
There is nothing new in the two next Firefox variables. So it is the time to practice what we've learned until now.
|
||||
|
||||
This page is divided in two parts for each variable:
|
||||
|
||||
- Explain what we want to implement
|
||||
- Propose to you a solution
|
||||
|
||||
The best for you is to do this job on your own and compare to our propositions.
|
||||
The best for you is to do this job on your own and compare your work to our propositions.
|
||||
|
||||
Here are the two variables highlighted as describe in Firefox:
|
||||
Here are the two variables in the firefox configuration's widget:
|
||||
|
||||
.. FIXME comment gérer l'image au mieux ??
|
||||
.. image:: https://forge.cloud.silique.fr/stove/rougail-tutorials/media/commit/v1.1_130/firefox.png
|
||||
.. image:: images/practice_twovars.png
|
||||
|
||||
These two variables are highlighted here in the lower part of the firefox configuration's widget:
|
||||
|
||||
.. image:: images/firefox130.png
|
||||
|
||||
.. prerequisites:: Prerequisites
|
||||
|
||||
|
|
@ -26,32 +34,43 @@ Practice
|
|||
Each tag corresponds to a stage of progress in the tutorial.
|
||||
Of course, you can also decide to copy/paste or download the tutorial files contents while following the tutorial steps.
|
||||
|
||||
This workshop page corresponds to the tags :tutorial:`v1.1_130 <src/tag/v1.1_130/README.md>` to :tutorial:`v1.1_131 <src/tag/v1.1_131/README.md>`
|
||||
If you want to follow this tutorial with the help of the corresponding :tutorial:`rougail-tutorials git repository <src/branch/1.1>`,
|
||||
this workshop page corresponds to the tags :tutorial:`1.1_130 <src/tag/1.1_130/README.md>` to :tutorial:`1.1_132 <src/tag/1.1_132/README.md>`
|
||||
in the repository.
|
||||
|
||||
::
|
||||
|
||||
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git
|
||||
git switch --detach 1.1_130
|
||||
|
||||
A conditional disabled boolean variable
|
||||
-------------------------------------------------------------
|
||||
|
||||
What do we want implement
|
||||
'''''''''''''''''''''''''''''''
|
||||
What do we want to be implemented
|
||||
'''''''''''''''''''''''''''''''''''
|
||||
|
||||
- choice a file name that respect the :ref:`file naming and organizing convention <namingconvention>`
|
||||
- define an appropriate variable name # FIXME pas de convention pour le nom des familles/variables ?
|
||||
- the Firefox description is in negative mode, which is not a good practice for us, we rewrite it in positive mode
|
||||
- the variable is a boolean with the default value `true` (the opposite of unchecked option)
|
||||
- the variable is available for all proxy mode choice by user, so disable it only when the `proxy mode` is "No proxy".
|
||||
.. exercise:: Exercice
|
||||
|
||||
- choose a file name that respect the :ref:`file naming and organizing convention <namingconvention>`
|
||||
- define an appropriate variable name # FIXME pas de convention pour le nom des familles/variables ?
|
||||
- the Firefox description is in negative mode, which is not a good practice for us, we rewrite it in positive mode
|
||||
- the variable is a boolean with the default value `true` (the opposite of unchecked option)
|
||||
- the variable is available for all proxy mode choice by user, so disable it only when the `proxy mode` is "No proxy".
|
||||
|
||||
Our solution
|
||||
'''''''''''''''''''''''''''''''
|
||||
|
||||
.. type-along:: For those who follow the tutorial with the help of the git repository
|
||||
Please unroll the "Solution" widget to see our solution:
|
||||
|
||||
Now you need to checkout the :tutorial:`v1.1_130 <src/tag/v1.1_130/README.md>` version::
|
||||
|
||||
git switch --detach v1.1_130
|
||||
.. solution:: Solution
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_130/firefox/50-prompt_authentication.yml
|
||||
:language: yaml
|
||||
:caption: The :file:`firefox/50-prompt_authentication.yml` a conditional disabled boolean variable
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_130/firefox/50-prompt_authentication.yml
|
||||
:language: yaml
|
||||
:caption: The :file:`firefox/50-prompt_authentication.yml` a conditional disabled boolean variable
|
||||
|
||||
- Here we choosed to name the new structure file `firefox/50-prompt_authentication.yml`, the file containing the two variables definition,
|
||||
- this variable is true by default,
|
||||
- this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"`.
|
||||
|
||||
..
|
||||
%YAML 1.2
|
||||
|
|
@ -69,14 +88,16 @@ Our solution
|
|||
A Jinja conditional disabled boolean variable
|
||||
-------------------------------------------------
|
||||
|
||||
What do we want implement
|
||||
'''''''''''''''''''''''''''''''
|
||||
What do we want to be implemented
|
||||
'''''''''''''''''''''''''''''''''''
|
||||
|
||||
- choice a file name that respect the :ref:`file naming and organizing convention <namingconvention>`
|
||||
- define an appropriate variable name # FIXME pas de convention pour le nom des familles/variables ?
|
||||
- the description will be the Firefox description
|
||||
- the variable is a boolean with the default value `false` (unchecked option)
|
||||
- the variable is only available with the "Manual proxy configuration" proxy mode and when the proxy socks version is not v4.
|
||||
.. exercise:: Exercice
|
||||
|
||||
- choice a file name that respect the :ref:`file naming and organizing convention <namingconvention>`
|
||||
- define an appropriate variable name # FIXME pas de convention pour le nom des familles/variables ?
|
||||
- the description will be the Firefox description
|
||||
- the variable is a boolean with the default value `false` (unchecked option)
|
||||
- the variable is only available with the "Manual proxy configuration" proxy mode and when the proxy socks version is not v4.
|
||||
|
||||
|
||||
Our solution
|
||||
|
|
@ -88,9 +109,13 @@ Our solution
|
|||
|
||||
git switch --detach v1.1_131
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_131/firefox/55-proxy_dns_socks5.yml
|
||||
:language: yaml
|
||||
:caption: The :file:`firefox/55-proxy_dns_socks5.yml` a Jinja conditional disabled boolean variable
|
||||
Please unroll the "Solution" widget to see our solution:
|
||||
|
||||
.. solution:: Solution
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_131/firefox/55-proxy_dns_socks5.yml
|
||||
:language: yaml
|
||||
:caption: The :file:`firefox/55-proxy_dns_socks5.yml` a Jinja conditional disabled boolean variable
|
||||
|
||||
..
|
||||
%YAML 1.2
|
||||
|
|
|
|||
Loading…
Reference in a new issue