[pve-devel] applied: [PATCH manager 18/20] gui: ceph: leave osd selected after reloading

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 5 15:00:33 CEST 2019


On 6/4/19 2:47 PM, Dominik Csapak wrote:
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/manager6/ceph/OSD.js | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
> index 6c5cb498..708ba274 100644
> --- a/www/manager6/ceph/OSD.js
> +++ b/www/manager6/ceph/OSD.js
> @@ -356,9 +356,20 @@ Ext.define('PVE.node.CephOsdTree', {
>  		},
>  		success: function(response, opts) {
>  		    var data = response.result.data;
> +		    var selected = me.getSelection();
> +		    var name;
> +		    if (selected.length) {
> +			name = selected[0].data.name;
> +		    }
>  		    sm.deselectAll();
>  		    me.setRootNode(data.root);
>  		    me.expandAll();
> +		    if (name) {
> +			var node = me.getRootNode().findChild('name', name, true);
> +			if (node) {
> +			    me.setSelection([node]);
> +			}
> +		    }
>  		    // extract noout flag
>  		    if (data.flags && data.flags.search(/noout/) !== -1) {
>  			noout = true;
> 

applied




More information about the pve-devel mailing list