Exemplo n.º 1
0
 public ActionResult StartApplication(StartApplicationModel model)
 {
     try
     {
         ApStartApplicationRequest request = new ApStartApplicationRequest(Credentials);
         request.ApplicationId = model.ApplicationId;
         request.TenantName = model.TenantName;
         request.NumberOfInstances = model.NumberOfInstances;
         EndPoints.ApDashboardService.StartApplication(request);
         return RedirectToAction("ApplicationInstances");
     }
     catch (Exception e)
     {
         return ShowError(e);
     }
 }
Exemplo n.º 2
0
 //
 // GET: /applicationgrid/startapplication
 public ActionResult StartApplication(int applicationId)
 {
     try
     {
         StartApplicationModel model = new StartApplicationModel();
         Application app = GetApplication(applicationId);
         if(app != null)
         {
             model.ApplicationId = applicationId;
             model.Name = app.Name;
             model.NumberOfInstances = 1;
             ViewData["Tenants"] = PrepareTenants(app.Tenants);
             return View("StartApplication", model);
         }
         else
         {
             throw new MonoscapeException("Application not found");
         }
     }
     catch (Exception e)
     {
         return ShowError(e);
     }
 }