public JsonResult MonitorLog(int?id) { TestRun testrun = db.TestRuns.Find(id); var CellName = db.Cells.Find(testrun.Scenario.CellId).CellName; var ServerOS = testrun.Scenario.ServerOS; RunRemoteService runservice = new RunRemoteService(); runservice.MonitorRemoteLog(CellName, ServerOS); testrun.State = State.Fail; return(Json(db.TestRuns.Select(x => new { RunId = x.RunId }), JsonRequestBehavior.AllowGet)); }
public ActionResult RunRemote(int?id) { TestRun testrun = db.TestRuns.Find(id); if (testrun.State == State.InProcess) { return(RedirectToAction("Index")); } var CellName = db.Cells.Find(testrun.Scenario.CellId).CellName; var ServerOS = testrun.Scenario.ServerOS; RunRemoteService runservice = new RunRemoteService(); runservice.RunScript(CellName, ServerOS); testrun.State = State.InProcess; db.SaveChanges(); return(Json(db.TestRuns.Select(x => new { RunId = x.RunId }), JsonRequestBehavior.AllowGet)); }