mirror of
git://git.proxmox.com/git/pve-docs.git
synced 2025-03-19 18:50:06 +03:00
api-viewer: use verbose_description if available
This commit is contained in:
parent
4bd7df8bb6
commit
61e5a832cd
@ -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
|
||||
}
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user