]> git.proxmox.com Git - pmg-docs.git/blobdiff - api-viewer/PMGAPI.js
bump version to 6.0-2
[pmg-docs.git] / api-viewer / PMGAPI.js
index 864e58d51203385ab537979c82b84aae87812ad5..6488e3ebf4c9327aec2f66aca4f72e19a2b07f5b 100644 (file)
@@ -154,30 +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
                            }
                        ]
                    });
@@ -186,15 +189,28 @@ 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';
 
-                   sections.push({
-                       title: 'Returns: ' + rtype
-                   });
+                   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)) + '</pre>';
+                   }
+
+                  sections.push({
+                      title: 'Returns: ' + rtype,
+                      bodyPadding: 10,
+                      html: returnhtml
+                  });
                }
 
                var permhtml = '';