1.2+ Documentation for config editor syntax

In the new Genie 1.2 config is edited via the GUI "Config - Edit " popup editor.

Is there any documentation for the (YAML?) syntax used in the editor?

I have found it is very fragile so while I can copy existing example fragments, it is almost impossible to know how to create new structures or even how to adapt the example structures.

When you save the config changes, some validation is done which results in a popup error message which helps solve the problem. However other kinds of errors, such as an empty Label field for example, are accepted and lead to bad behaviour by the GUI.

Fr example, the Admin | Config page becomes frozen and unresponsive, with the editor no longer being able to be launched. Refreshing the page allows navigation to other pages but any attempt to launch the editor freezes the UI again.

In the worst case GenieACS appears to become so badly hung if you make a mistake in the config syntax that it is totally unrecoverable, even by stopping and starting the container.

In my case this meant I lost a couple of days of config customisation because there was no way to locate and rollback the changes to the config and I had to wipe out the installation and start again from scratch.

1 Like

Same issue here. Edit buttons are not working anymore.

In one case I found that if I refreshed the browser I could then navigate in the primary config window that lets you edit individual rows.

I don’t know how safe this is so backup first and try it at your own risk

I found a label/parameter pair of rows with empty content. When I deleted them everything worked again. They appeared due to a left-over copy/paste from my editing of the config in the config editor.

I don’t know enough to say how risky it is to directly delete rows from the table so (a) make sure you take a screenshot before you delete anything so that you can add it back and (b) consider backing up the Mongo database before you do it.

The config dialogs do indeed feel fragile. I’m not sure how much that can be improved given that there’s no predefined structure that we can enforce (every UI component can define its own config structure). But making the UI not crash when entering invalid config is certainly something that can be done.

FYI, the various config buttons map directly to the key/value pairs in the config list. So it’s safe to edit those directly.

1 Like

Thank you.

Can you share any documentation about the syntax and semantics of the yaml (I think) used in the config editor?

While it has been possible to work out a few things by trial and error, it would help to have some guidance.

1 Like

The structure is very loose and depends on what component you’re configuring. Let me know what you’re trying to do and I’ll try to explain in more details.

Here’s a snippet for a WAN Interface table, however I have an issue with different device-types (see after code)

at the root level of “edit device page”

- childParameters:
    - label: "'Name'"
      parameter: WANIPConnection.1.Name
    - label: "'MAC Address'"
      parameter: WANIPConnection.1.MACAddress
    - label: "'IPv4'"
      parameter: WANIPConnection.1.ExternalIPAddress
    - label: "'IPv6'"
      parameter: WANIPConnection.1.X_HW_IPv6.IPv6Address.1.IPAddress
    - label: "'Prefix'"
      parameter: WANIPConnection.1.X_HW_IPv6.IPv6Prefix.1.Prefix
    - label: "'Type'"
      parameter: WANIPConnection.1.ConnectionType
    - label: "'NAT'"
      parameter: WANIPConnection.1.NATEnabled
    - label: "'Status'"
      parameter: WANIPConnection.1.ConnectionStatus
  label: "'WAN Interfaces'"
  parameter: InternetGatewayDevice.WANDevice.1.WANConnectionDevice
  type: "'parameter-table'"

Now I have device-types which iterate over InternetGatewayDevice.WANDevice.1.WANConnectionDevice (in this case above example works).

And another device iterates over InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection in which case above example does not work.

e.g.:

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.Name
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANIPConnection.1.Name
...

vs

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.Name
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.Name
...

@zaidka any hints I could accomplish this for both device-types/models?