Custom summary tables

Hi!
I’m working on customizing genieacs’s GUI. I wanted to add a table (like the default ‘Hosts’ one) that shows custom parameters (parameters that aren’t sent over tr069, like Ethernet interface Name).
The CPEs are MikroTik and GenieACS version is v1.1

Is it correct modifying only the “summary_parameters.yml” file or do I have to edit something else?
I’ve been trying everything (virtual parameters, creating arrays, looking at the code which parses the .yml file), con someone please help me?

Thanks everyone in advance!

How are you going to set those parameters that aren’t sent over TR069? Are you going to store them as vparams?

In order for Genie to display data in the GUI, it has to be able to pull the needed data. Whether thats from a vparam, or on the IGD object model itself.

For something like Ethernet interface name, ask MikroTik to add it. I had asked them to add MAC address for ethernet ports and they added that in the very next beta.

I think that right now the best solution I’ve got is to exploit a virtual parameter to store the value into the gui. An external function will fetch the data from the MikoTik via another protocol (still have to decide).

Regarding @mjducharme’s answer, sadly I haven’t got time to wait for a new release from MiktoTik. And it would be such a process updating all the routers I’ve got in the network! (they aren’t simple clients).

Thanks everyone!

There’s still one problem that I can’t figure out: how do I make such an array (stored as a virtual parameter) that is interpreted correctly by genieacs gui?
By reading the code it looks like it checks if it is an array in order to create the table.

Virtual Parameters are your only option but they do not support arrays. You will need to make a series of static virtual parameters (ex. ETHER-PORT-1-NAME, ETHER-PORT-2-NAME) to hold the names, or store them in a single virtual parameter with a delimiter.

Don’t make things harder on yourself.

JSON.stringify. This is how I store multiple values in one param. Its not ideal, but it works.

return {writable: false, value: [JSON.stringify(result), “xsd:string”]};

1 Like

Thanks both of you!

I still can’t figure out how to create a table with a virtual parameter.

These are my files…


summary_parameters.yml:
Tab:
_object: VirtualParameters.testTab
test: value


virtual parameter (named testTab) script:
let v1 = {value: "val1"};
let v3 = {value: "val3"};
let v4 = {value: "val4"};

let val = new Array(v1, v3, v4);

return {writable: false, value: [JSON.stringify(val), "xsd:string"]};


This is what I get in the GUI:
image

Any advice?
Thanks in advance!

1 Like

A vparam is just single parameter and can’t have child parameters so it can’t be displayed as a table. You’ll have to patch genieacs-gui to implement your own rendering logic for that parameter.

The new UI in v1.2 is more flexible where you can write your own custom component to render your special vparam in any way you like. You’ll still need to fork but it’s less intrusive as you’ll just be adding a new component type.

Thanks a lot!
I’ll see what I can manage to do… I would prefer using v1.1, will see.

I can now consider this thread closed, do I have to do anything in particular?
Thanks everyone for all the support.