+ Pre-filled from the target URL above. Edit any field for advanced setups (e.g. soundcork users
+ append /marge to margeServerUrl). These overrides apply to both XML
+ and Telnet migrations.
+
+
+
+
+
Field
+
Current on Device
+
Target URL
+
+
+
+
+
margeServerUrl
+
—
+
+
+
+
+
+
statsServerUrl
+
—
+
+
+
+
+
+
swUpdateUrl
+
—
+
+
+
+
+
+
bmxRegistryUrl
+
—
+
+
+
+
+
+
+
+
+
+
+
+
+
Suggested plan
0;
+ }
+
+ return errors.length === 0;
+}
+
+// resetPlanURLsToDefaults wipes manual edits and reapplies the
+// canonical defaults derived from the current target URL, honoring
+// the Soundcork-mode checkbox.
+function resetPlanURLsToDefaults() {
+ const targetUrl = document.getElementById("plan-target-url").value;
+ const soundcork = document.getElementById("plan-soundcork-mode") &&
+ document.getElementById("plan-soundcork-mode").checked;
+ fillPlanURLInputs(defaultServiceURLs(targetUrl, {soundcorkMode: soundcork}), {force: true});
+}
+
+// toggleSoundcorkMode reapplies defaults so the /marge suffix appears
+// or disappears on margeServerUrl. Manual edits are intentionally
+// reset — the checkbox is a deliberate "give me the canonical
+// soundcork shape" affordance, not a soft hint.
+function toggleSoundcorkMode() {
+ resetPlanURLsToDefaults();
+}
+
// computeSuggestedPlan picks the most conservative migration recipe
// for the device based on which transports are reachable. The chosen
// default is XML over SSH with HTTP — fewest moving parts, no DNS or
@@ -2545,6 +2732,24 @@ function computeSuggestedPlan(summary) {
};
}
+// renderPlanCurrentURLs populates the "Current on Device" cells in the
+// Service URLs table from whichever transport answered (telnet
+// getpdo, falling back to the SSH-read XML config).
+function renderPlanCurrentURLs(summary) {
+ const live = parseTelnetVerifiedConfig(summary.telnet_verified_config || "");
+ const xml = summary.parsed_current_config || {};
+ const cells = [
+ ["plan-current-marge", live.margeServerUrl || xml.margeServerUrl],
+ ["plan-current-stats", live.statsServerUrl || xml.statsServerUrl],
+ ["plan-current-sw_update", live.swUpdateUrl || xml.swUpdateUrl],
+ ["plan-current-bmx", live.bmxRegistryUrl || xml.bmxRegistryUrl],
+ ];
+ for (const [id, value] of cells) {
+ const el = document.getElementById(id);
+ if (el) el.innerText = value || "—";
+ }
+}
+
// renderPlan populates the Plan card: capabilities header + suggested
// plan box. Reads only fields the backend already exposes; the
// suggested-plan logic lives in computeSuggestedPlan.