Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/20/12 13:00:30 (12 years ago)
Author:
fschoepp
Message:

#1888:

  • Web project now creates custom html for each type we want to enter / display
  • Added endpointConfigurationName to HiveServiceLocator (because Web Project contains more than one endpoint configuration)
  • Removed logging statement from ConfigurationService to prevent exception during failure of loading ConfigurationSettings
  • ApplicationManager: Changed default implementation to WebApplicationManager (instead of LightWeight) for testing purposes within Web Project
  • WebApplicationManager: The application manager which returns plugin descriptors from the currently loaded assemblies (instead of LightweightAppManager)
  • HiveService: Fixed a transaction bug
  • IControllerService: Created a method to dispatch Scenarios to certain IScenarioManager (in this case HiveScenarioManager)
  • Added more mappable types to ControllerModel
  • PlaceholderControllerService dispatches all Scenarios to the HiveScenarioManager
  • Web project now dispatches the scenario to the controller after pressing "Run Job"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs

    r8384 r8506  
    3333
    3434        public ActionResult ProblemParameters(string scenario) {
    35           OptimizationScenario optScenario;
     35          OptimizationScenario optScenario;         
    3636          using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
    3737            var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
     
    4040            var controllerProxy = cf.CreateChannel();
    4141            optScenario = controllerProxy.GetOptimizationScenarioByName(scenario);
     42            Session["scenario"] = optScenario;
    4243          }
    43           return View(optScenario);
     44          return View(optScenario.InputParameters);
    4445        }
    4546
    4647        [HttpPost]
    47         public ActionResult ProblemParameters(OptimizationScenario scenario) {
     48        public ActionResult ProblemParameters(InputParameters parameters) {
    4849          if (ModelState.IsValid) {
    49             // store it... maybe
    50           }
    51           return View(scenario);
     50            return RedirectToAction("AlgorithmParameters", parameters);
     51          } 
     52          return View(parameters);       
    5253        }
    5354
     55        public ActionResult AlgorithmParameters() {
     56          return View((Session["scenario"] as OptimizationScenario).AlgorithmParameters);
     57        }
     58
     59        [HttpPost]
     60        public ActionResult AlgorithmParameters(AlgorithmParameters parameters) {
     61          if (ModelState.IsValid) {
     62            return RedirectToAction("ScheduleJob");
     63          }
     64          return View(parameters);
     65        }
     66
     67        public ActionResult ScheduleJob() {
     68          return View(Session["scenario"]);
     69        }
     70
     71        [HttpPost]
     72        public ActionResult ScheduleJob(OptimizationScenario scenario) {
     73          using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
     74            var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
     75            credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
     76            credentialBehaviour.UserName.Password = Session["pw"] as string;
     77            var controllerProxy = cf.CreateChannel();
     78            controllerProxy.ScheduleOptimizationScenario(Session["scenario"] as OptimizationScenario);
     79          }
     80          return RedirectToAction("Index");
     81        }
    5482    }
    5583}
Note: See TracChangeset for help on using the changeset viewer.