From 79edc738184dfa723d2f40da7cc1efa82b923438 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 7 Dec 2016 11:43:50 +0100 Subject: [PATCH] docs: feature/roles: update outdates site config docs --- docs/features/roles.rst | 16 ++++++++++------ docs/user/site.rst | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/features/roles.rst b/docs/features/roles.rst index 4cbf1f29..a4a8ab59 100644 --- a/docs/features/roles.rst +++ b/docs/features/roles.rst @@ -2,7 +2,7 @@ Roles ===== It is possible to define a set of roles you want to distinguish at backend side. One node can own one -role which it will announce via alfred inside the mesh. This will make it easier to differentiate +role which it will announce via alfred inside the mesh. This will make it easier to differentiate nodes when parsing alfred data. E.g to count only **normal** nodes and not the gateways or servers (nodemap). A lot of things are possible. @@ -11,17 +11,21 @@ For this the section ``roles`` in ``site.conf`` is needed:: roles = { default = 'node', list = { - node = 'Normal Node', - test = 'Test Node', - backbone = 'Backbone Node', - service = 'Service Node', + 'node', + 'test', + 'backbone', + 'service', }, }, +The strings to display in the LuCI interface are configured per language in the +``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like +``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``. + The value of ``default`` is the role every node will initially own. This value should be part of ``list`` as well. If you want node owners to change the defined roles via config-mode you can add the package ``gluon-luci-node-role`` to your ``site.mk``. Then, you can select one of the defined roles from a dropdown list -where the right-handed value is the one which is displayed and the left-handed key the one which is configured into +where the right-handed value is the one which is displayed and the left-handed key the one which is configured into the system. The role is saved in ``gluon-node-info.system.role``. To change the role using command line do:: diff --git a/docs/user/site.rst b/docs/user/site.rst index 5cb30766..670958b9 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -283,7 +283,7 @@ roles \: optional part of ``list``. If you want node owners to change the role via config mode add the package ``gluon-luci-node-role`` to ``site.mk``. - The strings to display in the LuCI interface can be configured per language in the + The strings to display in the LuCI interface are configured per language in the ``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like ``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``. ::