[pbs-devel] applied: [PATCH proxmox-backup v4 6/6] docs/api-viewer: improve rendering of array format
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon May 10 17:08:43 CEST 2021
On 10.05.21 11:28, Dominik Csapak wrote:
applied, with a small fix squashed in (see below), thanks!
> @@ -101,9 +97,28 @@ Ext.onReady(function() {
> return pdef.format;
>
> if (pdef.pattern)
> - return Ext.htmlEncode(pdef.pattern);
> + return pdef.pattern;
> +
> + if (pdef.type === 'boolean')
> + return `<true|false>`;
> +
> + if (type_fallback && pdef.type)
> + return `<${pdef.type}>`;
> +
> + return;
> + };
> +
> + let render_format = function(value, metaData, record) {
> + let pdef = record.data;
> +
> + metaData.style = 'white-space:normal;'
> +
> + if (pdef.type === 'array' && pdef.items) {
> + let format = render_simple_format(pdef.items, true);
FYI: Above line ended with a ^L (form feed), I amended the commit to drop that control character.
> + return `[${Ext.htmlEncode(format)}, ...]`;
> + }
>
> - return '';
> + return Ext.htmlEncode(render_simple_format(pdef) || '');
> };
>
> var real_path = function(path) {
>
More information about the pbs-devel
mailing list