]> git.proxmox.com Git - proxmox-backup.git/commitdiff
fix #3067: ui: add a separate notes view for longer markdown notes
authorStefan Sterz <s.sterz@proxmox.com>
Tue, 12 Apr 2022 10:34:23 +0000 (12:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 25 Apr 2022 06:39:39 +0000 (08:39 +0200)
since markdown notes might be rather long, this commit adds a tab
similar to pve's datacenter or node notes. requires a bump of the
widget toolkit in order to use the `pmxNotesView`.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
www/Makefile
www/NavigationTree.js
www/NodeNotes.js [new file with mode: 0644]

index 0952fb824ec02667029e7c12aa304f4abab67e9b..697df9c05057f52eaed5d1a770e0a746111f1140 100644 (file)
@@ -99,6 +99,7 @@ JSSRC=                                                        \
        datastore/DataStoreList.js                      \
        ServerStatus.js                                 \
        ServerAdministration.js                         \
+       NodeNotes.js                                    \
        Dashboard.js                                    \
        ${TAPE_UI_FILES}                                \
        NavigationTree.js                               \
index 576d05abd4509f58c2e0d05f1c99c064dd781661..916582ef981816b95787800a93f8c37cc86a97f5 100644 (file)
@@ -32,6 +32,12 @@ Ext.define('PBS.store.NavigationStore', {
                path: 'pbsDashboard',
                leaf: true,
            },
+           {
+               text: gettext('Notes'),
+               iconCls: 'fa fa-sticky-note-o',
+               path: 'pbsNodeNotes',
+               leaf: true,
+           },
            {
                text: gettext('Configuration'),
                iconCls: 'fa fa-gears',
diff --git a/www/NodeNotes.js b/www/NodeNotes.js
new file mode 100644 (file)
index 0000000..f8b253c
--- /dev/null
@@ -0,0 +1,23 @@
+// Needs to be its own xtype for `path` to work in `NavigationTree`
+Ext.define('PBS.NodeNotes', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'pbsNodeNotes',
+
+    scrollable: true,
+    layout: 'fit',
+
+    items: [
+       {
+           xtype: 'container',
+           layout: 'fit',
+           items: [{
+               xtype: 'pmxNotesView',
+               tools: false,
+               border: false,
+               node: 'localhost',
+               enableTBar: true,
+               maxLength: 1022*64,
+           }],
+       },
+    ],
+});