From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 264FF7ADFA for ; Mon, 10 May 2021 17:08:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 16C281A5DF for ; Mon, 10 May 2021 17:08:46 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 030EF1A5D1 for ; Mon, 10 May 2021 17:08:44 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id BFC0F45B6E for ; Mon, 10 May 2021 17:08:44 +0200 (CEST) Message-ID: Date: Mon, 10 May 2021 17:08:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Thunderbird/89.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Dominik Csapak References: <20210510092800.17956-1-d.csapak@proxmox.com> <20210510092800.17956-7-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210510092800.17956-7-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.007 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied: [PATCH proxmox-backup v4 6/6] docs/api-viewer: improve rendering of array format X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 15:08:46 -0000 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; > =20 > if (pdef.pattern) > - return Ext.htmlEncode(pdef.pattern); > + return pdef.pattern; > + > + if (pdef.type =3D=3D=3D 'boolean') > + return ``; > + > + if (type_fallback && pdef.type) > + return `<${pdef.type}>`; > + > + return; > + }; > + > + let render_format =3D function(value, metaData, record) { > + let pdef =3D record.data; > + > + metaData.style =3D 'white-space:normal;' > + > + if (pdef.type =3D=3D=3D 'array' && pdef.items) { > + let format =3D render_simple_format(pdef.items, true);=0C FYI: Above line ended with a ^L (form feed), I amended the commit to drop= that control character. > + return `[${Ext.htmlEncode(format)}, ...]`; > + } > =20 > - return ''; > + return Ext.htmlEncode(render_simple_format(pdef) || ''); > }; > =20 > var real_path =3D function(path) { >=20