mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-05-03 02:52:36 +00: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', {
|
Ext.define('pve-param-schema', {
|
||||||
extend: 'Ext.data.Model',
|
extend: 'Ext.data.Model',
|
||||||
fields: [
|
fields: [
|
||||||
'name', 'type', 'typetext', 'description', 'enum',
|
'name', 'type', 'typetext', 'description', 'verbose_description',
|
||||||
'minimum', 'maximum', 'minLength', 'maxLength',
|
'enum', 'minimum', 'maximum', 'minLength', 'maxLength',
|
||||||
'pattern', 'title', 'requires', 'format', 'default',
|
'pattern', 'title', 'requires', 'format', 'default',
|
||||||
'disallow', 'extends', 'links',
|
'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;
|
var pdef = record.data;
|
||||||
|
|
||||||
|
value = pdef.verbose_description || value;
|
||||||
|
|
||||||
|
TODO: try to render asciidoc correctly
|
||||||
|
|
||||||
metaData.style = 'white-space:pre-wrap;'
|
metaData.style = 'white-space:pre-wrap;'
|
||||||
|
|
||||||
return Ext.htmlEncode(value);
|
return Ext.htmlEncode(value);
|
||||||
@ -168,7 +172,7 @@ Ext.onReady(function() {
|
|||||||
{
|
{
|
||||||
header: 'Description',
|
header: 'Description',
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
renderer: render_text,
|
renderer: render_description,
|
||||||
flex: 2
|
flex: 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user