]> git.proxmox.com Git - pve-docs.git/commitdiff
api-viewer: use verbose_description if available
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 5 Sep 2016 07:42:35 +0000 (09:42 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 5 Sep 2016 07:42:35 +0000 (09:42 +0200)
api-viewer/PVEAPI.js

index 75168e6ea03a37da3db8de9066176ac43dfa507d..9c3ca677df169fc56dac61f45e6955728269cc13 100644 (file)
@@ -11,8 +11,8 @@ Ext.onReady(function() {
     Ext.define('pve-param-schema', {
         extend: 'Ext.data.Model',
         fields:  [ 
-           'name', 'type', 'typetext', 'description', 'enum', 
-           'minimum', 'maximum', 'minLength', 'maxLength',
+           'name', 'type', 'typetext', 'description', 'verbose_description',
+           'enum', 'minimum', 'maximum', 'minLength', 'maxLength',
            'pattern', 'title', 'requires', 'format', 'default',
            'disallow', 'extends', 'links',
            {
@@ -42,9 +42,13 @@ Ext.onReady(function() {
         }]
     });
     
-    var render_text = function(value, metaData, record) {
+    var render_description = function(value, metaData, record) {
        var pdef = record.data;
 
+       value = pdef.verbose_description || value;
+
+       TODO: try to render asciidoc correctly
+
        metaData.style = 'white-space:pre-wrap;'
 
        return Ext.htmlEncode(value);
@@ -168,7 +172,7 @@ Ext.onReady(function() {
                            { 
                                header: 'Description',
                                dataIndex: 'description',
-                               renderer: render_text,
+                               renderer: render_description,
                                flex: 2
                            }
                        ]