fix #3067: ui: add a separate notes view for longer markdown notes

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>
This commit is contained in:
Stefan Sterz 2022-04-12 12:34:23 +02:00 committed by Thomas Lamprecht
parent 684a402931
commit f3b02a9b86
3 changed files with 30 additions and 0 deletions

View File

@ -99,6 +99,7 @@ JSSRC= \
datastore/DataStoreList.js \ datastore/DataStoreList.js \
ServerStatus.js \ ServerStatus.js \
ServerAdministration.js \ ServerAdministration.js \
NodeNotes.js \
Dashboard.js \ Dashboard.js \
${TAPE_UI_FILES} \ ${TAPE_UI_FILES} \
NavigationTree.js \ NavigationTree.js \

View File

@ -32,6 +32,12 @@ Ext.define('PBS.store.NavigationStore', {
path: 'pbsDashboard', path: 'pbsDashboard',
leaf: true, leaf: true,
}, },
{
text: gettext('Notes'),
iconCls: 'fa fa-sticky-note-o',
path: 'pbsNodeNotes',
leaf: true,
},
{ {
text: gettext('Configuration'), text: gettext('Configuration'),
iconCls: 'fa fa-gears', iconCls: 'fa fa-gears',

23
www/NodeNotes.js Normal file
View File

@ -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,
}],
},
],
});