[pbs-devel] [PATCH proxmox-backup] fix #6069: docs: prune simulator: allow values specifying both range and step size
Fiona Ebner
f.ebner at proxmox.com
Tue Jan 14 13:10:11 CET 2025
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
docs/prune-simulator/prune-simulator_source.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs/prune-simulator/prune-simulator_source.js b/docs/prune-simulator/prune-simulator_source.js
index 4bd31acd..841d183b 100644
--- a/docs/prune-simulator/prune-simulator_source.js
+++ b/docs/prune-simulator/prune-simulator_source.js
@@ -353,12 +353,17 @@ Ext.onReady(function() {
specValues.forEach(function(value) {
if (value.includes('..')) {
let [start, end] = value.split('..');
+ let step = 1;
+ if (end.includes('/')) {
+ [end, step] = end.split('/');
+ step = assertValid(step);
+ }
start = assertValid(start);
end = assertValid(end);
if (start > end) {
throw "interval start is bigger then interval end '" + start + " > " + end + "'";
}
- for (let i = start; i <= end; i++) {
+ for (let i = start; i <= end; i += step) {
matches[i] = 1;
}
} else if (value.includes('/')) {
--
2.39.5
More information about the pbs-devel
mailing list