* [PATCH docs v4 1/8] asciidoc-pve: allow linking sections with get_help_link
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH docs v4 2/8] pvecm: add info about warnings regarding token coefficient Michael Köppl
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
scan_extjs_file previously only scanned for occurrences of onlineHelp.
Linking to specific sections of the documentation with get_help_link was
not possible without an accompanying onlineHelp entry. Extend the regex
to also match get_help_link('blockid') calls.
biome may reformat function calls across multiple lines, so a scan which
reads one line at a time would miss those occurrences. Switch from
reading the file line by line to reading the whole file and matching
globally. In addition, tolerate an optional trailing comma after the
blockid argument. Line numbers for die/warn messages are reconstructed
from the match offset since $. is no longer meaningful when matching
against the full buffer.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
Feedback very much welcome. I ran into this problem when biome started
formatting the get_help_link function calls to multiple lines.
Alternatively, I could've added a `biome-ignore format: ...` to the
affected lines in pve-manager, but since it looks like we're not
ignoring the rules anywhere, I chose to adapt the scan function. I
tested this on both onlineHelp links and get_help_link links.
scripts/asciidoc-pve.in | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/scripts/asciidoc-pve.in b/scripts/asciidoc-pve.in
index d42ddbe9..12fde424 100644
--- a/scripts/asciidoc-pve.in
+++ b/scripts/asciidoc-pve.in
@@ -463,16 +463,17 @@ sub scan_extjs_file {
debug("scan-extjs $filename");
- while (defined(my $line = <$fh>)) {
- if ($line =~ m/\s+onlineHelp:\s*[\'\"]([^{}\[\]\'\"]+)[\'\"]/) {
- my $blockid = $1;
- my $link = $fileinfo->{blockid_target}->{default}->{$blockid};
- if (!(defined($link) || defined($online_help_links->{$blockid}))) {
- die "undefined blockid '$blockid' ($filename, line $.)\n" if !$allow_missing;
- warn "ignoring undefined blockid '$blockid' ($filename, line $.)\n";
- }
- $res_data->{$blockid} = 1;
+ my $content = do { local $/; <$fh> };
+
+ while ($content =~ m/(?|\s+onlineHelp:\s*[\'\"]([^{}\[\]\'\"]+)[\'\"]|\bget_help_link\(\s*[\'\"]([^{}\[\]\'\"]+)[\'\"]\s*,?\s*\))/g) {
+ my $blockid = $1;
+ my $line_no = 1 + (substr($content, 0, $-[0]) =~ tr/\n//);
+ my $link = $fileinfo->{blockid_target}->{default}->{$blockid};
+ if (!(defined($link) || defined($online_help_links->{$blockid}))) {
+ die "undefined blockid '$blockid' ($filename, line $line_no)\n" if !$allow_missing;
+ warn "ignoring undefined blockid '$blockid' ($filename, line $line_no)\n";
}
+ $res_data->{$blockid} = 1;
}
}
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH docs v4 2/8] pvecm: add info about warnings regarding token coefficient
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
2026-06-05 15:38 ` [PATCH docs v4 1/8] asciidoc-pve: allow linking sections with get_help_link Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH cluster v4 3/8] add functions to determine warning level for high token timeouts Michael Köppl
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
`pvecm status` might warn users of a high sum of token and consensus
timeout, recommending lowering the token coefficient. To make users
aware that these warnings may occur and to allow users to search for
this warning in the docs and man pages, extend the section on lowering
the token coefficient.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
pvecm.adoc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pvecm.adoc b/pvecm.adoc
index 6469a0c0..d50a2c3a 100644
--- a/pvecm.adoc
+++ b/pvecm.adoc
@@ -1429,6 +1429,11 @@ so that transient timing variations do not push the cluster past the watchdog
threshold. The recommended mechanism for lowering the token and consensus
timeouts is lowering the token coefficient as explained below.
+Cluster commands may display a warning if the sum of the Corosync token and
+consensus timeouts is considered too high (e.g., "Changing the token coefficient
+is recommended"). To resolve this warning, it is recommended to lower the token
+coefficient.
+
You can check the current token and consensus timeouts (in milliseconds) with
the following command:
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH cluster v4 3/8] add functions to determine warning level for high token timeouts
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
2026-06-05 15:38 ` [PATCH docs v4 1/8] asciidoc-pve: allow linking sections with get_help_link Michael Köppl
2026-06-05 15:38 ` [PATCH docs v4 2/8] pvecm: add info about warnings regarding token coefficient Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH cluster v4 4/8] pvecm: warn users of high token timeouts when using status command Michael Köppl
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
High token timeouts can lead to stability problems in clusters. To
inform users about the timeout in their current setup and give
recommendations regarding the token coefficient setting, introduce
functions to calculate the timeout as well as determine the warning
level.
Current token and consensus timeout are parsed from corosync-cmapctl's
output directly to avoid future drift between this implementation and
Corosync's implementation. The values are parsed from the output
assuming the following format:
runtime.config.totem.consensus (u32) = 3750
runtime.config.totem.token (u32) = 3125
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
src/PVE/Corosync.pm | 59 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/src/PVE/Corosync.pm b/src/PVE/Corosync.pm
index aef0d31..d379710 100644
--- a/src/PVE/Corosync.pm
+++ b/src/PVE/Corosync.pm
@@ -534,4 +534,63 @@ sub resolve_hostname_like_corosync {
return $match_ip_and_version->($resolved_ip);
}
+sub read_cmap {
+ my $cmap = {};
+ my $rc = eval {
+ PVE::Tools::run_command(
+ ['corosync-cmapctl'],
+ outfunc => sub {
+ my $line = shift;
+ if ($line =~ /^(\S+)\s+\(\w+\)\s+=\s+(.*)$/) {
+ $cmap->{$1} = $2;
+ }
+ },
+ );
+ 1;
+ };
+ return undef if !$rc;
+ return $cmap;
+}
+
+sub calculate_membership_recovery_timeout {
+ my $cmap = read_cmap();
+ return undef if !$cmap;
+
+ my $token = $cmap->{'runtime.config.totem.token'};
+ my $consensus = $cmap->{'runtime.config.totem.consensus'};
+ return undef if !defined($token) || !defined($consensus);
+
+ return ($token + $consensus) / 1000.0;
+}
+
+sub get_membership_recovery_timeout_warning_level {
+ my ($total_timeout_secs) = @_;
+
+ if ($total_timeout_secs > 45) {
+ return 'critical';
+ } elsif ($total_timeout_secs > 40) {
+ return 'warning';
+ } elsif ($total_timeout_secs > 30) {
+ return 'info';
+ }
+
+ return undef;
+}
+
+sub get_membership_recovery_timeout_warning {
+ my ($total_timeout_secs) = @_;
+
+ my $level = get_membership_recovery_timeout_warning_level($total_timeout_secs);
+ return if !defined($level);
+
+ my $level_msg = {
+ critical => "Lowering the token coefficient is strongly recommended",
+ warning => "Lowering the token coefficient is recommended",
+ info => "The token coefficient can be optimized",
+ }->{$level};
+
+ my $msg = "Sum of Corosync token and consensus timeout is ${total_timeout_secs}s. $level_msg.";
+ return ($level, $msg);
+}
+
1;
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH cluster v4 4/8] pvecm: warn users of high token timeouts when using status command
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
` (2 preceding siblings ...)
2026-06-05 15:38 ` [PATCH cluster v4 3/8] add functions to determine warning level for high token timeouts Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH cluster v4 5/8] api: join info: add totem timeout warning message and level Michael Köppl
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
If the calculated token timeout is above certain thresholds, display a
warning for users when running `pvecm status` as part of the Cluster
Information block. Also points users to the documentation regarding
potential adaptations to their cluster configuration to alleviate the
problem.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
src/PVE/CLI/pvecm.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/PVE/CLI/pvecm.pm b/src/PVE/CLI/pvecm.pm
index 7d393a8..192adb7 100755
--- a/src/PVE/CLI/pvecm.pm
+++ b/src/PVE/CLI/pvecm.pm
@@ -561,6 +561,13 @@ __PACKAGE__->register_method({
$print_info->('Transport', 'transport', 'knet');
$print_info->('Secure auth', 'secauth', 'off');
printf "\n";
+
+ my $total_timeout_secs = PVE::Corosync::calculate_membership_recovery_timeout();
+ my ($level, $msg) =
+ PVE::Corosync::get_membership_recovery_timeout_warning($total_timeout_secs);
+ if (defined($msg)) {
+ warn "$msg See 'man pvecm' for details.\n\n";
+ }
}
exec('corosync-quorumtool', '-siH');
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH cluster v4 5/8] api: join info: add totem timeout warning message and level
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
` (3 preceding siblings ...)
2026-06-05 15:38 ` [PATCH cluster v4 4/8] pvecm: warn users of high token timeouts when using status command Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH widget-toolkit v4 6/8] add pmx-critical CSS class Michael Köppl
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
The warning message and level based on the calculated membership
recovery timeout provide additional information to users on whether
the token coefficient used in their Corosync cluster could be
optimized, or if a change is (strongly) recommended. This lets users
make an informed decision about potentially reducing the coefficient
before adding another node to their cluster.
The `warnings` property is defined as an object with `message`, `level`,
and `type` fields to be expandable for additional errors or warnings in
the future and also allow for easily distinguishing between different
kinds of warnings and their levels.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
src/PVE/API2/ClusterConfig.pm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/PVE/API2/ClusterConfig.pm b/src/PVE/API2/ClusterConfig.pm
index bbed40e..2172ab1 100644
--- a/src/PVE/API2/ClusterConfig.pm
+++ b/src/PVE/API2/ClusterConfig.pm
@@ -535,6 +535,7 @@ __PACKAGE__->register_method({
check => ['perm', '/', ['Sys.Audit']],
},
method => 'GET',
+ protected => 1,
description => "Get information needed to join this cluster over the connected node.",
parameters => {
additionalProperties => 0,
@@ -571,6 +572,19 @@ __PACKAGE__->register_method({
preferred_node => get_standard_option('pve-node'),
totem => { type => 'object' },
config_digest => { type => 'string' },
+ warnings => {
+ type => 'array',
+ optional => 1,
+ items => {
+ type => 'object',
+ additionalProperties => 1,
+ properties => {
+ type => { type => 'string' },
+ level => { type => 'string' },
+ message => { type => 'string' },
+ },
+ },
+ },
},
},
code => sub {
@@ -599,12 +613,19 @@ __PACKAGE__->register_method({
$node->{pve_addr} = scalar(PVE::Cluster::remote_node_ip($name));
}
+ my $total_timeout_secs = PVE::Corosync::calculate_membership_recovery_timeout();
+ my ($level, $msg) =
+ PVE::Corosync::get_membership_recovery_timeout_warning($total_timeout_secs);
+
my $res = {
nodelist => [values %$nodelist],
preferred_node => $nodename,
totem => $totem_cfg,
config_digest => $corosync_config_digest,
};
+ $res->{warnings} =
+ [{ type => 'corosync-membership-recovery-timeout', level => $level, message => $msg }]
+ if defined($msg);
return $res;
},
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH widget-toolkit v4 6/8] add pmx-critical CSS class
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
` (4 preceding siblings ...)
2026-06-05 15:38 ` [PATCH cluster v4 5/8] api: join info: add totem timeout warning message and level Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH manager v4 7/8] ui: cluster info: move initialization of items to initComponent Michael Köppl
2026-06-05 15:38 ` [PATCH manager v4 8/8] ui: cluster info: display warnings from the join info endpoint Michael Köppl
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
This class simply defines the background color similar to pmx-hint, but
for more critical messages. The color used is the same as for invalid
rows, but use a separate class to ensure that background colors for
invalid rows and critical error messages can be changed independently.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
Added this because I wanted to avoid using the proxmox-invalid-row class
for something that is pretty much a pmx-hint with a different color.
src/css/ext6-pmx.css | 4 ++++
src/proxmox-dark/scss/proxmox/_general.scss | 15 +++++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/css/ext6-pmx.css b/src/css/ext6-pmx.css
index d8d9b8d..a33e83f 100644
--- a/src/css/ext6-pmx.css
+++ b/src/css/ext6-pmx.css
@@ -6,6 +6,10 @@
background-color: LightYellow;
}
+.pmx-critical {
+ background-color: #f3d6d7;
+}
+
.proxmox-tags-full .proxmox-tag-light,
.proxmox-tags-full .proxmox-tag-dark {
border-radius: 3px;
diff --git a/src/proxmox-dark/scss/proxmox/_general.scss b/src/proxmox-dark/scss/proxmox/_general.scss
index dcbf049..9eba060 100644
--- a/src/proxmox-dark/scss/proxmox/_general.scss
+++ b/src/proxmox-dark/scss/proxmox/_general.scss
@@ -39,12 +39,19 @@ div.eol-notice + div[id^="panel-"] > div[id^="panel-"][id$="-bodyWrap"] > div {
background-color: $background-warning;
}
-.pmx-hint a {
- color: $highlighted-text-alt;
+.pmx-critical {
+ background-color: $background-invalid;
}
-.pmx-hint a:active {
- color: $highlighted-text;
+.pmx-hint,
+.pmx-critical {
+ a {
+ color: $highlighted-text-alt;
+
+ &:active {
+ color: $highlighted-text;
+ }
+ }
}
// Unclickable elements (mostly for elements with conditional handlers)
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH manager v4 7/8] ui: cluster info: move initialization of items to initComponent
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
` (5 preceding siblings ...)
2026-06-05 15:38 ` [PATCH widget-toolkit v4 6/8] add pmx-critical CSS class Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
2026-06-05 15:38 ` [PATCH manager v4 8/8] ui: cluster info: display warnings from the join info endpoint Michael Köppl
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
This allows conditionally adding items to the form. No functional
changes intended.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
www/manager6/dc/ClusterEdit.js | 102 +++++++++++++++++----------------
1 file changed, 54 insertions(+), 48 deletions(-)
diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index 109325855..aff1515ab 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -57,58 +57,64 @@ Ext.define('PVE.ClusterInfoWindow', {
totem: {},
},
- items: [
- {
- xtype: 'component',
- border: false,
- padding: '10 10 10 10',
- html: gettext('Copy the Join Information here and use it on the node you want to add.'),
- },
- {
- xtype: 'container',
- layout: 'form',
- border: false,
- padding: '0 10 10 10',
- items: [
- {
- xtype: 'textfield',
- fieldLabel: gettext('IP Address'),
- cbind: {
- value: '{joinInfo.ipAddress}',
- },
- editable: false,
- },
- {
- xtype: 'textfield',
- fieldLabel: gettext('Fingerprint'),
- cbind: {
- value: '{joinInfo.fingerprint}',
+ initComponent: function () {
+ var me = this;
+
+ var joinInfo = me.joinInfo;
+
+ me.items = [];
+
+ me.items.push(
+ {
+ xtype: 'component',
+ border: false,
+ padding: '10 10 10 10',
+ html: gettext(
+ 'Copy the Join Information here and use it on the node you want to add.',
+ ),
+ },
+ {
+ xtype: 'container',
+ layout: 'form',
+ border: false,
+ padding: '0 10 10 10',
+ items: [
+ {
+ xtype: 'textfield',
+ fieldLabel: gettext('IP Address'),
+ value: joinInfo.ipAddress,
+ editable: false,
},
- editable: false,
- },
- {
- xtype: 'textarea',
- inputId: 'pveSerializedClusterInfo',
- fieldLabel: gettext('Join Information'),
- grow: true,
- cbind: {
- joinInfo: '{joinInfo}',
+ {
+ xtype: 'textfield',
+ fieldLabel: gettext('Fingerprint'),
+ value: joinInfo.fingerprint,
+ editable: false,
},
- editable: false,
- listeners: {
- afterrender: function (field) {
- if (!field.joinInfo) {
- return;
- }
- var jsons = Ext.JSON.encode(field.joinInfo);
- var base64s = Ext.util.Base64.encode(jsons);
- field.setValue(base64s);
+ {
+ xtype: 'textarea',
+ inputId: 'pveSerializedClusterInfo',
+ fieldLabel: gettext('Join Information'),
+ grow: true,
+ joinInfo: joinInfo,
+ editable: false,
+ listeners: {
+ afterrender: function (field) {
+ if (!field.joinInfo) {
+ return;
+ }
+ var jsons = Ext.JSON.encode(field.joinInfo);
+ var base64s = Ext.util.Base64.encode(jsons);
+ field.setValue(base64s);
+ },
},
},
- },
- ],
- },
- ],
+ ],
+ },
+ );
+
+ me.callParent();
+ },
dockedItems: [
{
dock: 'bottom',
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH manager v4 8/8] ui: cluster info: display warnings from the join info endpoint
2026-06-05 15:38 [PATCH cluster/docs/manager/widget-toolkit v4 0/8] add warning messages for high token timeouts in clusters Michael Köppl
` (6 preceding siblings ...)
2026-06-05 15:38 ` [PATCH manager v4 7/8] ui: cluster info: move initialization of items to initComponent Michael Köppl
@ 2026-06-05 15:38 ` Michael Köppl
7 siblings, 0 replies; 9+ messages in thread
From: Michael Köppl @ 2026-06-05 15:38 UTC (permalink / raw)
To: pve-devel
The join info endpoint may return a list of warnings, each with a
message, a warning level, and a warning type. Display these warnings,
with critical warnings being displayed in red, regular warnings in
yellow (as is the case for other warnings throughout the UI), and
informational messages without a background color. In addition, add a
mapping from certain warning types to anchors in the documentation, to
point users in the right direction.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
This is mostly based on off-list feedback that different levels of
warnings might warrant different colors. Because a "could be optimize"
in a color that usually warns users might be a bit much. At the same
time, a strong recommendation for lowering the token coefficient means
the timeout is really high and should *really* be lowered. I'm still not
entirely sure regarding the background for the informational message. I
thought about adding a `pmx-info` class or something similar that has a
similar color scheme to the .x-column-header-sort-ASC and
.x-column-header-sort-DESC classes.
www/manager6/dc/Cluster.js | 3 +++
www/manager6/dc/ClusterEdit.js | 38 ++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/www/manager6/dc/Cluster.js b/www/manager6/dc/Cluster.js
index 2ec5588c3..1d654a9ec 100644
--- a/www/manager6/dc/Cluster.js
+++ b/www/manager6/dc/Cluster.js
@@ -86,11 +86,13 @@ Ext.define('PVE.ClusterAdministration', {
addr: '',
fp: '',
});
+ vm.set('warnings', []);
return;
}
vm.set('totem', data.totem);
vm.set('isInCluster', !!data.totem.cluster_name);
vm.set('nodelist', data.nodelist);
+ vm.set('warnings', data.warnings);
let nodeinfo = data.nodelist.find((el) => el.name === data.preferred_node);
@@ -133,6 +135,7 @@ Ext.define('PVE.ClusterAdministration', {
peerLinks: vm.get('preferred_node.peerLinks'),
ring_addr: vm.get('preferred_node.ring_addr'),
totem: vm.get('totem'),
+ warnings: vm.get('warnings'),
},
});
},
diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index aff1515ab..51dfe7137 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -55,6 +55,7 @@ Ext.define('PVE.ClusterInfoWindow', {
ipAddress: undefined,
fingerprint: undefined,
totem: {},
+ warnings: undefined,
},
initComponent: function () {
@@ -113,6 +114,43 @@ Ext.define('PVE.ClusterInfoWindow', {
},
);
+ // Encode anchor links for certain warning types
+ const WARNING_HELP_LINKS = {
+ 'corosync-membership-recovery-timeout': Proxmox.Utils.get_help_link(
+ 'pvecm_changing_token_coefficient',
+ ),
+ };
+
+ for (const w of joinInfo.warnings ?? []) {
+ const helpAnchor = WARNING_HELP_LINKS[w.type];
+ let html = Ext.String.htmlEncode(w.message);
+ if (helpAnchor) {
+ const link = `<a target="_blank" href="${helpAnchor}">${gettext('the documentation')}</a>`;
+ html += ' ' + Ext.String.format(gettext('See {0} for details.'), link);
+ }
+
+ let cls;
+
+ switch (w.level) {
+ case 'info':
+ cls = null;
+ break;
+ case 'warning':
+ cls = 'pmx-hint';
+ break;
+ case 'critical':
+ cls = 'pmx-critical';
+ break;
+ }
+
+ me.items.push({
+ xtype: 'container',
+ border: false,
+ padding: '0 10 10 10',
+ items: [{ xtype: 'displayfield', userCls: cls, value: html }],
+ });
+ }
+
me.callParent();
},
dockedItems: [
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread