feat(nodes): add Dev channel option to node panel updates

The node update confirm dialog now offers a 'Dev channel (latest commit)' choice. The dev flag threads master -> nodes/updatePanel -> UpdatePanels -> remote.UpdatePanel -> the node's updatePanel endpoint, which calls StartUpdateChannel(dev) to install the rolling dev-latest build. With no dev flag the node keeps following its own channel setting.
This commit is contained in:
MHSanaei
2026-06-25 00:29:03 +02:00
parent 11c5b53fac
commit e8878b71a4
22 changed files with 100 additions and 25 deletions
+15 -2
View File
@@ -206,9 +206,22 @@ func (a *ServerController) installXray(c *gin.Context) {
jsonMsg(c, I18nWeb(c, "pages.index.xraySwitchVersionPopover"), err)
}
// updatePanel starts a panel self-update to the latest release.
// updatePanel starts a panel self-update. With no "dev" form value it follows
// this panel's own channel setting; an explicit "dev" (sent by the master node
// updater) overrides it for this run.
func (a *ServerController) updatePanel(c *gin.Context) {
err := a.panelService.StartUpdate()
devParam := c.PostForm("dev")
var err error
if devParam == "" {
err = a.panelService.StartUpdate()
} else {
dev, perr := strconv.ParseBool(devParam)
if perr != nil {
jsonMsg(c, "invalid data", perr)
return
}
err = a.panelService.StartUpdateChannel(dev)
}
jsonMsg(c, I18nWeb(c, "pages.index.panelUpdateStartedPopover"), err)
}