I have a value, exemple value = 60000, which is the uptime in second of a device. This value is a child parameter.
I want to view this value into a regular date format (HH:MM:SS).
I want to know if you have fonctions or methods to do it.
And can you tell me if all the display config is in YAML please.
You donāt mention what version of GenieACS you are using. In v1.0 and v1.1 (not sure about v1.2 as we havenāt migrated yet) there is support. In v1.0 and v1.1 look in the gui/config/parameter_renders.yml file. You will see a mapping between parameters and parameter renderers. You can even write your own by in ruby storing them in gui/config/parameter_renderers.
Thereās the function DATE_STRING() but that renders a datetime, not a duration. Maybe create a custom component to render a numeric parameter in that format? See ui/components/parameter.ts for an example component.
hello, yes it will be good as jriera say. i was try to get the connection time from some wifi stations.
I tryed to add that on parameter.ts but it complain during the run build. I revert back the file since i dont have a programming skills (also for create a external function or sort of):
@rollup/plugin-typescript TS2322: Type āstringā is not assignable to type ānumberā. @rollup/plugin-typescript TS2322: Type āstringā is not assignable to type ānumberā. @rollup/plugin-typescript TS2322: Type āstringā is not assignable to type ānumberā.