[skip ci] Constellation fixes

This commit is contained in:
Yann Stepienik
2026-02-09 11:37:02 +00:00
parent ecf5cc79d7
commit f797e1b529
6 changed files with 27 additions and 4 deletions
+15
View File
@@ -337,6 +337,21 @@ export const ConstellationVPN = ({ freeVersion }) => {
{(isAdmin || !config.ConstellationConfig.ThisDeviceName) && <div>
<MainCard title={config.ConstellationConfig.ThisDeviceName ? t('mgmt.constellation.settingsTitle') : t('mgmt.constellation.setupTitle')} content={config.constellationIP}>
<Stack spacing={2}>
{constellationEnabled && !config.ConstellationConfig.ThisDeviceName && <div>
<Alert severity="error">
{t('mgmt.constellation.corruptedConstellation')} <br /><br />
<ConfirmModal
variant="outlined"
color="warning"
label={t('mgmt.constellation.resetLabel')}
content={t('mgmt.constellation.resetText')}
callback={async () => {
await API.constellation.reset();
refreshConfig();
}}
/>
</Alert>
</div>}
{!constellationEnabled && !isAdmin && <>
<Alert severity="info">
{t('mgmt.constellation.setupTextNoAdmin')}
@@ -333,6 +333,7 @@
"mgmt.constellation.disabled": "Disabled",
"mgmt.constellation.clickToDisable": "Disable Constellation",
"mgmt.constellation.clickToEnable": "Enable Constellation",
"mgmt.constellation.corruptedConstellation": "After updating to the latest version, Constellation changed significantly and existing configurations need to be reset in order to take full advantage of the new features and improvements.",
"mgmt.cron.editCron.customText": "Create a custom job to run a shell command in a container. Leave the container field empty to run on the host",
"mgmt.cron.editCron.customText.onHostOnly": "Running on the host only works if Cosmos is not itself running in a container",
"mgmt.cron.editCronTitle": "Edit Job",
+2
View File
@@ -61,6 +61,8 @@ func Init() {
InitConfig()
InitHostname()
utils.IsConstellationIP = IsConstellationIP
utils.ResyncConstellationNodes = resyncConstellationNodes
ConstellationInitLock.Lock()
+1
View File
@@ -293,6 +293,7 @@ func cosmos() {
constellation.Init()
utils.InitRemoteStorage = storage.InitRemoteStorage
if utils.FBL.LValid && !utils.FBL.IsCosmosNode {
utils.ProxyRClone = storage.InitRemoteStorage()
}
+2 -2
View File
@@ -501,8 +501,8 @@ func Restrictions(RestrictToConstellation bool, WhitelistInboundIPs []string) fu
isUsingWhiteList := len(WhitelistInboundIPs) > 0
isInWhitelist := false
// TODO FIX LATER
isInConstellation := false; // constellation.IsConstellationIP(ip)
isInConstellation := IsConstellationIP(ip)
for _, ipRange := range WhitelistInboundIPs {
Debug("Checking if " + ip + " is in " + ipRange)
+6 -2
View File
@@ -54,6 +54,8 @@ var UpdateAvailable = map[string]bool{}
var RestartHTTPServer = func() {}
var IsConstellationIP = func(string) bool { return false }
// var ReBootstrapContainer func(string) error
var GetContainerIPByName func(string) (string, error)
var DoesContainerExist func(string) bool
@@ -447,8 +449,10 @@ func SaveConfigTofile(config Config) {
func RestartServer() {
Log("Restarting server...")
WaitForAllJobs()
StopAllRCloneProcess(false)
WaitForAllJobs()
if StopAllRCloneProcess != nil {
StopAllRCloneProcess(false)
}
os.Exit(0)
}