Skip to content

Commit c540d38

Browse files
authored
[change:ux] Improved help text of configuration variable fields
The previous help texts were confusing and too technical. [backport 1.2]
1 parent 9afe8f7 commit c540d38

File tree

10 files changed

+46
-39
lines changed

10 files changed

+46
-39
lines changed

openwisp_controller/config/base/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ class AbstractConfig(ChecksumCacheMixin, BaseConfig):
8585
blank=True,
8686
default=dict,
8787
help_text=_(
88-
"Additional "
89-
'<a href="http://netjsonconfig.openwisp.org/'
90-
'en/stable/general/basics.html#context" target="_blank">'
91-
"context (configuration variables)</a> in JSON format"
88+
"allows overriding "
89+
'<a href="https://openwisp.io/docs/stable/controller/user/variables.html'
90+
'" target="_blank">'
91+
"configuration variables</a>"
9292
),
9393
load_kwargs={"object_pairs_hook": collections.OrderedDict},
9494
dump_kwargs={"indent": 4},

openwisp_controller/config/base/device_group.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ class AbstractDeviceGroup(OrgMixin, TimeStampedEditableModel):
4242
load_kwargs={"object_pairs_hook": collections.OrderedDict},
4343
dump_kwargs={"indent": 4},
4444
help_text=_(
45-
"Group meta data, use this field to store data which is related"
46-
" to this group and can be retrieved via the REST API."
45+
"Store custom metadata related to this group. This field is intended "
46+
"for arbitrary data that does not affect device configuration and can "
47+
"be retrieved via the REST API for integrations or external tools."
4748
),
4849
verbose_name=_("Metadata"),
4950
)
@@ -53,8 +54,7 @@ class AbstractDeviceGroup(OrgMixin, TimeStampedEditableModel):
5354
load_kwargs={"object_pairs_hook": collections.OrderedDict},
5455
dump_kwargs={"indent": 4},
5556
help_text=_(
56-
"This field can be used to add meta data for the group"
57-
' or to add "Configuration Variables" to the devices.'
57+
"Define configuration variables available to all devices in this group"
5858
),
5959
verbose_name=_("Configuration Variables"),
6060
)

openwisp_controller/config/base/multitenancy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class AbstractOrganizationConfigSettings(UUIDModel):
5050
load_kwargs={"object_pairs_hook": collections.OrderedDict},
5151
dump_kwargs={"indent": 4},
5252
help_text=_(
53-
'This field can be used to add "Configuration Variables"' " to the devices."
53+
"Define reusable configuration variables available "
54+
"to all devices in this organization"
5455
),
5556
verbose_name=_("Configuration Variables"),
5657
)

openwisp_controller/config/base/template.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@ class AbstractTemplate(ShareableOrgMixinUniqueName, BaseConfig):
9797
default=dict,
9898
blank=True,
9999
help_text=_(
100-
"A dictionary containing the default "
101-
"values for the variables used by this "
102-
"template; these default variables will "
103-
"be used during schema validation."
100+
"Define default values for the variables used in this template. "
101+
"These values are used during validation and when a variable is "
102+
"not provided by the device, group, or organization."
104103
),
105104
load_kwargs={"object_pairs_hook": OrderedDict},
106105
dump_kwargs={"indent": 4},

openwisp_controller/config/migrations/0023_update_context.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ class Migration(migrations.Migration):
1818
default=dict,
1919
dump_kwargs={"ensure_ascii": False, "indent": 4},
2020
help_text=(
21-
'Additional <a href="http://netjsonconfig.openwisp.org'
22-
'/en/stable/general/basics.html#context" target="_blank">'
23-
"context (configuration variables)</a> in JSON format"
21+
"allows overriding "
22+
'<a href="https://openwisp.io/docs/stable/controller/user/variables.html' # noqa: E501
23+
'" target="_blank">'
24+
"configuration variables</a>"
2425
),
2526
load_kwargs={"object_pairs_hook": collections.OrderedDict},
2627
),

openwisp_controller/config/migrations/0028_template_default_values.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class Migration(migrations.Migration):
1818
default=dict,
1919
dump_kwargs={"ensure_ascii": False, "indent": 4},
2020
help_text=(
21-
"A dictionary containing the default values for "
22-
"the variables used by this template; these default "
23-
"variables will be used during schema validation."
21+
"Define default values for the variables used in this template. "
22+
"These values are used during validation and when a variable is "
23+
"not provided by the device, group, or organization."
2424
),
2525
load_kwargs={"object_pairs_hook": collections.OrderedDict},
2626
verbose_name="Default Values",

openwisp_controller/config/migrations/0036_device_group.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ class Migration(migrations.Migration):
6262
dump_kwargs={"ensure_ascii": False, "indent": 4},
6363
load_kwargs={"object_pairs_hook": collections.OrderedDict},
6464
help_text=(
65-
"Group meta data, use this field to store data which is"
66-
" related to this group and can be retrieved via the"
67-
" REST API."
65+
"Store custom metadata related to this group. "
66+
"This field is intended for arbitrary data that "
67+
"does not affect device configuration and can "
68+
"be retrieved via the REST API for integrations "
69+
"or external tools."
6870
),
6971
verbose_name="Metadata",
7072
),

openwisp_controller/config/migrations/0049_devicegroup_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class Migration(migrations.Migration):
2020
default=dict,
2121
dump_kwargs={"ensure_ascii": False, "indent": 4},
2222
help_text=(
23-
"This field can be used to add meta data for the group"
24-
' or to add "Configuration Variables" to the devices.'
23+
"Define configuration variables available "
24+
"to all devices in this group"
2525
),
2626
load_kwargs={"object_pairs_hook": collections.OrderedDict},
2727
verbose_name="Configuration Variables",

openwisp_controller/config/migrations/0051_organizationconfigsettings_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class Migration(migrations.Migration):
2020
default=dict,
2121
dump_kwargs={"indent": 4},
2222
help_text=(
23-
'This field can be used to add "Configuration Variables"'
24-
" to the devices."
23+
"Define reusable configuration variables available "
24+
"to all devices in this organization"
2525
),
2626
load_kwargs={"object_pairs_hook": collections.OrderedDict},
2727
verbose_name="Configuration Variables",

tests/openwisp2/sample_config/migrations/0001_initial.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ class Migration(migrations.Migration):
121121
default=dict,
122122
dump_kwargs={"ensure_ascii": False, "indent": 4},
123123
help_text=(
124-
'Additional <a href="http://netjsonconfig.openwisp.org'
125-
'/en/stable/general/basics.html#context" target="_blank">'
126-
"context (configuration variables)</a> in JSON format"
124+
"allows overriding "
125+
'<a href="https://openwisp.io/docs/stable/controller/user/variables.html' # noqa: E501
126+
'" target="_blank">'
127+
"configuration variables</a>"
127128
),
128129
load_kwargs={"object_pairs_hook": collections.OrderedDict},
129130
),
@@ -579,9 +580,10 @@ class Migration(migrations.Migration):
579580
default=dict,
580581
dump_kwargs={"ensure_ascii": False, "indent": 4},
581582
help_text=(
582-
"A dictionary containing the default values for the "
583-
"variables used by this template; these default variables "
584-
"will be used during schema validation."
583+
"Define default values for the variables used "
584+
"in this template. These values are used during "
585+
"validation and when a variable is not provided "
586+
"by the device, group, or organization."
585587
),
586588
load_kwargs={"object_pairs_hook": collections.OrderedDict},
587589
verbose_name="Default Values",
@@ -709,8 +711,8 @@ class Migration(migrations.Migration):
709711
default=dict,
710712
dump_kwargs={"indent": 4},
711713
help_text=(
712-
'This field can be used to add "Configuration Variables"'
713-
" to the devices."
714+
"Define reusable configuration variables "
715+
"available to all devices in this organization"
714716
),
715717
load_kwargs={"object_pairs_hook": collections.OrderedDict},
716718
verbose_name="Configuration Variables",
@@ -765,9 +767,11 @@ class Migration(migrations.Migration):
765767
dump_kwargs={"ensure_ascii": False, "indent": 4},
766768
load_kwargs={"object_pairs_hook": collections.OrderedDict},
767769
help_text=(
768-
"Group meta data, use this field to store data which is"
769-
" related to this group and can be retrieved via the"
770-
" REST API."
770+
"Store custom metadata related to this group. "
771+
"This field is intended for arbitrary data that "
772+
"does not affect device configuration and can "
773+
"be retrieved via the REST API for integrations "
774+
"or external tools."
771775
),
772776
verbose_name="Metadata",
773777
),
@@ -779,8 +783,8 @@ class Migration(migrations.Migration):
779783
default=dict,
780784
dump_kwargs={"ensure_ascii": False, "indent": 4},
781785
help_text=(
782-
"This field can be used to add meta data for the group"
783-
' or to add "Configuration Variables" to the devices.'
786+
"Define configuration variables available "
787+
"to all devices in this group"
784788
),
785789
load_kwargs={"object_pairs_hook": collections.OrderedDict},
786790
verbose_name="Configuration Variables",

0 commit comments

Comments
 (0)