]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: ceph warnings: code cleanups
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Oct 2023 06:24:09 +0000 (08:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Oct 2023 15:38:39 +0000 (17:38 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/ceph/Status.js

index 6bbe33b4782e30fcfd63f94c29158a87ff17854d..590a46b3fe9c9e5cf9d8762a54ffa00c6c0335c5 100644 (file)
@@ -149,14 +149,18 @@ Ext.define('PVE.node.CephStatus', {
                                    iconCls: 'x-fa fa-files-o',
                                    tooltip: gettext('Copy summary'),
                                    handler: function(grid, rowindex, colindex, item, e, record) {
-                                       navigator.clipboard.writeText(record.data.summary);
+                                       navigator.clipboard
+                                           .writeText(record.data.summary)
+                                           .catch(err => Ext.Msg.alert(gettext('Error'), err));
                                    },
                                },
                                {
                                    iconCls: 'x-fa fa-clipboard',
                                    tooltip: gettext('Copy details'),
                                    handler: function(grid, rowindex, colindex, item, e, record) {
-                                       navigator.clipboard.writeText(record.data.detail);
+                                       navigator.clipboard
+                                           .writeText(record.data.detail)
+                                           .catch(err => Ext.Msg.alert(gettext('Error'), err));
                                    },
                                },
                            ],
@@ -164,10 +168,9 @@ Ext.define('PVE.node.CephStatus', {
                    ],
                    listeners: {
                        itemdblclick: function(view, record, row, rowIdx, e) {
-                           // inspired by RowExpander.js
-
-                           let rowNode = view.getNode(rowIdx); let
-                           normalRow = Ext.fly(rowNode);
+                           // inspired by Ext.grid.plugin.RowExpander, but for double click
+                           let rowNode = view.getNode(rowIdx);
+                           let normalRow = Ext.fly(rowNode);
 
                            let collapsedCls = view.rowBodyFeature.rowCollapsedCls;