Fix the showing up mounted devices in apidocs Swagger 91/99191/1
authorDominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
Wed, 5 Jan 2022 09:19:17 +0000 (10:19 +0100)
committerDominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
Wed, 5 Jan 2022 10:22:09 +0000 (11:22 +0100)
Currently all mounted devices show up in the drop down list as
"topology-netconfnode". If there are many mounted devices
there is no way to find the mounted node you are looking for
without clicking on each selection on the list. Fix this to
show up particular node ID instead of "topology-netconfnode".

JIRA: NETCONF-843
Change-Id: Iecbc2e27f66719d2a9a7024ab9813077ff7cfdb3
Signed-off-by: Dominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
restconf/sal-rest-docgen/src/main/resources/explorer/index.html

index b1e4300a9f5c29971edbd14296d4abc2aff48487..954a17bc8720b195668b6996bb9a1984ba7bca6b 100644 (file)
@@ -51,7 +51,7 @@
                           {url: document.URL.split('/apidoc')[0] + "/apidoc/openapi3/apis/single", name: "Controller resources - RestConf draft02"}];
       var devices = JSON.parse(xmlHttp.responseText);
       for (var i =0; i < devices.length; i++) {
-        var device_name = devices[i]['instance'].split('=')[1].replace('/', '');
+        var device_name = devices[i]['instance'].split('=')[2].replace('/', '');
         var dveice_id = devices[i]['id'];
         var dict = {
           url: base_url_rfc + dveice_id,