Esempio n. 1
0
 public GlobalConfigWizardViewModel(ConnectedServiceWizard wizard)
 {
     this.Legend = "Global Config";
     Wizard      = wizard;
     View        = new GlobalConfigView();
     ViewModel   = View.DataContext as GlobalConfigViewModel;
 }
 public void UpdateGlobalConfigs(GlobalConfigViewModel globalConfigViewModel)
 {
     YearValue     = globalConfigViewModel.UpdatedYear;
     EventFeature  = globalConfigViewModel.EventFeature;
     EmailTestMode = globalConfigViewModel.EmailTestMode;
     CurrentTheme  = globalConfigViewModel.Theme;
 }
        public async Task SetGlobalConfig(GlobalConfigViewModel globalConfigViewModel)
        {
            _globalConfigs.UpdateGlobalConfigs(globalConfigViewModel);

            await _s3Service.Upload(ConfigFile, globalConfigViewModel.ToByteArray(), new Dictionary <string, string>
            {
                ["Description"] = "Application config file"
            });
        }
Esempio n. 4
0
        private async Task SetGlobalConfig(GlobalConfigViewModel globalConfigViewModel)
        {
            UpdateGlobalConfigs(globalConfigViewModel);

            var response = await _s3Service.Upload(ConfigFile, globalConfigViewModel.ObjectToByteArray(),
                                                   ImmutableDictionary.Create <string, string>().Add("Description", "Application config file"));

            if (response.Status == HttpStatusCode.BadRequest)
            {
                _logger.LogError("Failed to sync config file with S3");
            }
        }
        public async Task <GlobalConfigViewModel> ResolveGlobalConfig()
        {
            var years       = new HashSet <int>();
            var currentYear = StartYear;

            while (currentYear <= DateTime.UtcNow.Year)
            {
                years.Add(currentYear++);
            }

            var retVal = new GlobalConfigViewModel
            {
                Years         = years,
                UpdatedYear   = _globalConfigs.YearValue,
                EventFeature  = _globalConfigs.EventFeature,
                EmailTestMode = _globalConfigs.EmailTestMode,
                Theme         = _globalConfigs.CurrentTheme
            };

            return(await Task.FromResult(retVal));
        }
Esempio n. 6
0
 public static void UpdateGlobalConfigs(GlobalConfigViewModel globalConfigViewModel)
 {
 }
Esempio n. 7
0
 public static void UpdateGlobalConfigs(GlobalConfigViewModel globalConfigViewModel)
 {
     StartedStreams = globalConfigViewModel.StartedStreams;
 }
        private async Task SetGlobalConfig(GlobalConfigViewModel globalConfigViewModel)
        {
            UpdateGlobalConfigs(globalConfigViewModel);

            await _configServer.Update(_configServerApiKey.ApiKey, globalConfigViewModel);
        }
 public GlobalConfigViewModel(GlobalConfigViewModel globalConfigViewModel) : this()
 {
 }
        public async Task <IActionResult> UpdateConfig(GlobalConfigViewModel globalConfigViewModel)
        {
            await _configLogic.SetGlobalConfig(globalConfigViewModel);

            return(RedirectToAction("Index"));
        }
Esempio n. 11
0
 public void Update(GlobalConfigViewModel viewModel)
 {
     Theme         = viewModel.Theme;
     EmailTestMode = viewModel.EmailTestMode;
     LastModified  = DateTimeOffset.Now;
 }