Fix the showing up mounted devices in apidocs Swagger 32/99232/1
authorDominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
Wed, 5 Jan 2022 09:19:17 +0000 (10:19 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 9 Jan 2022 19:29:39 +0000 (20:29 +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>
(cherry picked from commit b67affb6c2694fffa9f99ca3abc6a657068002c1)

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,