X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=api-viewer%2FPVEAPI.js;h=081c6b9f7d0ecb344b8be7b56f2711f8c71d831c;hb=516d1f2ff2210b365e0f5c3454c6466cc80e2917;hp=75168e6ea03a37da3db8de9066176ac43dfa507d;hpb=7f5866a309051fd3b06eb8ce2bb91688ebcf43d7;p=pve-docs.git diff --git a/api-viewer/PVEAPI.js b/api-viewer/PVEAPI.js index 75168e6..081c6b9 100644 --- a/api-viewer/PVEAPI.js +++ b/api-viewer/PVEAPI.js @@ -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 } ]