]> git.proxmox.com Git - pve-docs.git/blobdiff - api-viewer/PVEAPI.js
Precise certificate generation
[pve-docs.git] / api-viewer / PVEAPI.js
index 081c6b9f7d0ecb344b8be7b56f2711f8c71d831c..1c34ef2e850deca859d107e2644bf582cf42fdf5 100644 (file)
@@ -154,26 +154,33 @@ Ext.onReady(function() {
                            stripeRows: true
                        },
                        columns: [
-                           { 
+                           {
                                header: 'Name',
-                               dataIndex: 'name'
+                               dataIndex: 'name',
+                               flex: 1
                            },
-                           { 
+                           {
                                header: 'Type',
                                dataIndex: 'type',
                                renderer: render_type,
+                               flex: 1
                            },
-                           { 
+                           {
+                               header: 'Default',
+                               dataIndex: 'default',
+                               flex: 1
+                           },
+                           {
                                header: 'Format',
                                dataIndex: 'type',
                                renderer: render_format,
-                               flex: 1
+                               flex: 2
                            },
-                           { 
+                           {
                                header: 'Description',
                                dataIndex: 'description',
                                renderer: render_description,
-                               flex: 2
+                               flex: 6
                            }
                        ]
                    });
@@ -182,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 = '<pre>items: ' + Ext.htmlEncode(JSON.stringify(retinf.items, null, 4)) + '</pre>';
+                   }
+
+                   if (retinf.properties) {
+                       returnhtml = returnhtml || '';
+                       returnhtml += '<pre>properties:' + Ext.htmlEncode(JSON.stringify(retinf.properties, null, 4));
+                   }
+
                    sections.push({
-                       title: 'Returns: ' + rtype
+                       title: 'Returns: ' + rtype,
+                       bodyPadding: 10,
+                       html: returnhtml
                    });
                }
 
@@ -205,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 + '"';