X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=api-viewer%2FPVEAPI.js;h=b7c09166c8018be9956b1e595d230eeb868d5bed;hb=87ba80b03f8cc263591b2f3e5344d455b22c4789;hp=394dda176343d9215fe4ba1956453c57d82bc766;hpb=cd115543df9a79ccf5d067fb8107cdc61655a65d;p=pve-docs.git diff --git a/api-viewer/PVEAPI.js b/api-viewer/PVEAPI.js index 394dda1..b7c0916 100644 --- a/api-viewer/PVEAPI.js +++ b/api-viewer/PVEAPI.js @@ -189,14 +189,27 @@ Ext.onReady(function() { if (info.returns) { - var rtype = info.returns.type; - if (!rtype && info.returns.items) + var retinf = info.returns; + var rtype = retinf.type; + if (!rtype && retinf.items) rtype = 'array'; if (!rtype) rtype = 'object'; + var returnhtml; + if (retinf.items) { + returnhtml = '
items: ' + Ext.htmlEncode(JSON.stringify(retinf.items, null, 4)) + '
'; + } + + if (retinf.properties) { + returnhtml = returnhtml || ''; + returnhtml += '
properties:' + Ext.htmlEncode(JSON.stringify(retinf.properties, null, 4)) + '
'; + } + sections.push({ - title: 'Returns: ' + rtype + title: 'Returns: ' + rtype, + bodyPadding: 10, + html: returnhtml }); } @@ -212,9 +225,9 @@ Ext.onReady(function() { if (info.permissions.user) { if (!info.permissions.description) { if (info.permissions.user === 'world') { - permhtml += "Accessible without any authententification."; + permhtml += "Accessible without any authentication."; } else if (info.permissions.user === 'all') { - permhtml += "Accessible by all authententicated users."; + permhtml += "Accessible by all authenticated users."; } else { permhtml += 'Onyl accessible by user "' + info.permissions.user + '"';