sipcapture/homer-app

Problem with selecting node in a multinode configuration

Closed this issue · 4 comments

Hi,
I have a problem related to this.
I followed this thread and I have the Node field with its options visible, but they appear in gray and cannot be chosen.
The Node field appears in the results with the correct node names.
I am using the latest Docker version of Homer7.
My mapping:

{
"id": "node",
"name": "Node",
"type": "string",
"index": "none",
"form_type": "multiselect",
"form_default": [
       {
       "value": "ims",
       "name": "IMS"
       }
    ],
"form_api": "/database/node/list",
"system_param": true,
"mapping": "param.location.node",
"position": 23,
"skip": false,
"hide": false
}

And My configuration is:

  "database_data": {
    "ims": {
      "host": "X.X.X.X",
      "name": "homer_data",
      "node": "IMS",
      "pass": "homerSeven",
      "user": "root"
    },
    "ngn": {
      "host": "Y.Y.Y.Y",
      "name": "homer_data",
      "node": "NGN",
      "pass": "homerSeven",
      "user": "root"
    }

The result is this:
Captura desde 2022-09-09 09-52-59

Thanks,
Mariano

Hi,
This is not a solution but it is how I have it working now.
In case it helps someone, this is the code in the mapping section:

    {
        "id": "node",
        "name": "Node",
        "type": "string",
        "index": "none",
        "form_type": "multiselect",
        "form_default": [
            {
                "value": "ims",
                "disabled": false,
                "name": "IMS"
            },
            {
                "value": "ngn",
                "disabled": false,
                "name": "NGN"
            }
        ],
        "_form_api": "/database/node/list",
        "system_param": true,
        "mapping": "param.location.node",
        "position": 24,
        "skip": false,
        "hide": false
    }

Since I only have two plot sources I put them in the "form_default" section and override the "from_api" section.

@AlexeyOplachko could you confirm if this is still an issue?

Since when adding a new site you have to add the option manually in the mapping, I understand that it is still an issue.
The above is a patch that works for few sites.
An extra problem is that in the configuration I named the nodes in uppercase but the filter puts them in lowercase so you have to iterate a bit so that the filter takes the values ​​accordingly.

Verified, in current version form_api based nodes work as expected, no "disabled" options