From: Jonas Theisen <j.theisen@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH widget-toolkit 08/16] window: add reusable service log window
Date: Thu, 26 Nov 2026 14:40:05 +0100 [thread overview]
Message-ID: <20261126134128.316681-9-j.theisen@proxmox.com> (raw)
In-Reply-To: <20261126134128.316681-1-j.theisen@proxmox.com>
Move the window showing the log of a service out of the service view
into its own class, so other components can open the log of a service
the same way.
No functional change intended.
Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
src/Makefile | 1 +
src/node/ServiceView.js | 26 ++++-------------------
src/window/ServiceLog.js | 45 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 22 deletions(-)
create mode 100644 src/window/ServiceLog.js
diff --git a/src/Makefile b/src/Makefile
index d5e246c..24bd719 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -90,6 +90,7 @@ JSSRC= \
window/SafeDestroy.js \
window/PackageVersions.js \
window/PackageChangelog.js \
+ window/ServiceLog.js \
window/TaskViewer.js \
window/LanguageEdit.js \
window/DiskSmart.js \
diff --git a/src/node/ServiceView.js b/src/node/ServiceView.js
index 2a51f17..bf49607 100644
--- a/src/node/ServiceView.js
+++ b/src/node/ServiceView.js
@@ -67,28 +67,10 @@ Ext.define('Proxmox.node.ServiceView', {
data: { service },
} = me.getSelectionModel().getSelection()[0];
- let viewSize = Ext.getBody().getViewSize();
-
- let logItem = me.useJournalLog
- ? {
- xtype: 'proxmoxJournalView',
- structured: true,
- unit: service,
- url: `/api2/extjs/nodes/${me.nodename}/journal`,
- }
- : {
- xtype: 'proxmoxLogView',
- url: `/api2/extjs/nodes/${me.nodename}/syslog?service=${service}`,
- log_select_timespan: 1,
- };
-
- Ext.create('Ext.window.Window', {
- title: gettext('System Log') + ': ' + service,
- modal: true,
- width: viewSize.width > 1600 ? 1000 : 800,
- height: viewSize.height > 900 ? 800 : 600,
- layout: 'fit',
- items: logItem,
+ Ext.create('Proxmox.window.ServiceLog', {
+ nodename: me.nodename,
+ service: service,
+ useJournalLog: me.useJournalLog,
autoShow: true,
});
};
diff --git a/src/window/ServiceLog.js b/src/window/ServiceLog.js
new file mode 100644
index 0000000..e962a36
--- /dev/null
+++ b/src/window/ServiceLog.js
@@ -0,0 +1,45 @@
+Ext.define('Proxmox.window.ServiceLog', {
+ extend: 'Ext.window.Window',
+ alias: 'widget.proxmoxServiceLog',
+
+ modal: true,
+ layout: 'fit',
+
+ // use the journal API endpoint instead of the syslog one
+ useJournalLog: false,
+
+ initComponent: function () {
+ let me = this;
+
+ if (!me.nodename) {
+ throw 'no node name specified';
+ }
+ if (!me.service) {
+ throw 'no service specified';
+ }
+
+ let viewSize = Ext.getBody().getViewSize();
+
+ let logItem = me.useJournalLog
+ ? {
+ xtype: 'proxmoxJournalView',
+ structured: true,
+ unit: me.service,
+ url: `/api2/extjs/nodes/${me.nodename}/journal`,
+ }
+ : {
+ xtype: 'proxmoxLogView',
+ url: `/api2/extjs/nodes/${me.nodename}/syslog?service=${me.service}`,
+ log_select_timespan: 1,
+ };
+
+ Ext.apply(me, {
+ title: gettext('System Log') + ': ' + me.service,
+ width: viewSize.width > 1600 ? 1000 : 800,
+ height: viewSize.height > 900 ? 800 : 600,
+ items: logItem,
+ });
+
+ me.callParent();
+ },
+});
--
2.47.3
next prev parent reply other threads:[~2026-11-26 13:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:39 [PATCH common/manager/widget-toolkit 00/16] partially fix #3809: configure and monitor NTP in the node time panel Jonas Theisen
2026-11-26 13:39 ` [PATCH common 01/16] systemd: add helpers to get and set NTP servers Jonas Theisen
2026-11-26 13:39 ` [PATCH common 02/16] systemd: add helper to query clock synchronization status Jonas Theisen
2026-11-26 13:40 ` [PATCH common 03/16] systemd: add helpers to synchronize the clock immediately Jonas Theisen
2026-11-26 13:40 ` [PATCH common 04/16] systemd: add helper to list the current NTP sources Jonas Theisen
2026-11-26 13:40 ` [PATCH widget-toolkit 05/16] node: time: do not open the editor for the server time row Jonas Theisen
2026-11-26 13:40 ` [PATCH widget-toolkit 06/16] partially fix #3809: node: time: show and edit NTP servers if supported Jonas Theisen
2026-11-26 13:40 ` [PATCH widget-toolkit 07/16] node: time: show clock synchronization status Jonas Theisen
2026-11-26 13:40 ` Jonas Theisen [this message]
2026-11-26 13:40 ` [PATCH widget-toolkit 09/16] node: time: add button to open the NTP service log Jonas Theisen
2026-11-26 13:40 ` [PATCH widget-toolkit 10/16] node: time: add button to synchronize the clock immediately Jonas Theisen
2026-11-26 13:40 ` [PATCH widget-toolkit 11/16] node: time: add window listing the current NTP sources Jonas Theisen
2026-11-26 13:40 ` [PATCH manager 12/16] partially fix #3809: api: nodes: time: allow configuring NTP servers Jonas Theisen
2026-11-26 13:40 ` [PATCH manager 13/16] api: nodes: time: report clock synchronization status Jonas Theisen
2026-11-26 13:40 ` [PATCH manager 14/16] ui: node: time: use journal for the NTP service log Jonas Theisen
2026-11-26 13:40 ` [PATCH manager 15/16] api: nodes: time: add endpoint to synchronize the clock immediately Jonas Theisen
2026-11-26 13:40 ` [PATCH manager 16/16] api: nodes: time: add endpoint to list the current NTP sources Jonas Theisen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126134128.316681-9-j.theisen@proxmox.com \
--to=j.theisen@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox