public static List <BackupType> AccessibleSolutions(int id) { var settings = GlobalBackupSettings.Get(); var accessibleSolutions = new List <BackupType>(); var user = TCAdmin.SDK.Session.GetCurrentUser(); var service = Service.GetSelectedService(); var s3Limit = service.Variables["S3:LIMIT"] != null ? long.Parse(service.Variables["S3:LIMIT"].ToString()) : settings.DefaultS3Capacity; if (FileServer.GetFileServers().S3FileServers().Any() && s3Limit > 0 && settings.S3Enabled) { accessibleSolutions.Add(BackupType.S3); } var ftpLimit = service.Variables["Ftp:LIMIT"] != null ? long.Parse(service.Variables["Ftp:LIMIT"].ToString()) : settings.DefaultFtpCapacity; if (FileServer.GetFileServers().FtpFileServers().Any() && ftpLimit > 0 && settings.FtpEnabled) { accessibleSolutions.Add(BackupType.Ftp); } var localLimit = service.Variables["Local:LIMIT"] != null ? long.Parse(service.Variables["Local:LIMIT"].ToString()) : settings.DefaultLocalCapacity; if (localLimit > 0 && settings.LocalEnabled) { accessibleSolutions.Add(BackupType.Local); } return(accessibleSolutions); }
public ActionResult Index(GlobalBackupSettings settings) { GlobalBackupSettings.Set(settings); return(View(GlobalBackupSettings.Get())); }
public ActionResult Index() { return(View(GlobalBackupSettings.Get())); }