public void ForceStopApp(String masterHostIP, int masterPortNumber, String ApplicationMasterService, String ApplicationID) { String username = "******"; String password = ""; ApplicationManagement applicationManagement = new ApplicationManagement(username, password, masterHostIP, masterPortNumber); applicationManagement.AbortApplication(ApplicationMasterService, ApplicationID); }
public ActionResult GetCSVDataNoDates(String ChartSeriesType, String masterHostIP, int masterPort) { String username = "******"; String password = ""; String csv = String.Empty; if (ChartSeriesType == "JobsStatusSummary") { ApplicationManagement applicationManagement = new ApplicationManagement(username, password, masterHostIP, masterPort); List<global::Aneka.Accounting.IAccountable> ActiveApplications = applicationManagement.getDoneApplications(appQureyType.Type.ALL, null, null); double Total = 0; double Completed = 0; double Failed = 0; double Aborted = 0; double Rejected = 0; double Unsubmitted = 0; double Unknown = 0; foreach (global::Aneka.Entity.ApplicationView app in ActiveApplications) { Total += app.Total; Completed += app.Completed; Failed += app.Failed; Aborted += app.Aborted; Rejected += app.Rejected; Unsubmitted += app.Unsubmitted; Unknown += app.Unknown; } csv += "Total," + Total; csv += "\nCompleted," + (Completed / Total) * 100; if(Failed > 0) csv += "\nFailed," + (Failed / Total) * 100; if (Aborted > 0) csv += "\nAborted," + (Aborted / Total) * 100; if (Rejected > 0) csv += "\nRejected," + (Rejected / Total) * 100; if (Unsubmitted > 0) csv += "\nUnsubmitted," + (Unsubmitted / Total) * 100; if (Unknown > 0) csv += "\nUnknown," + (Unknown / Total) * 100; } return Content(csv); }
public ActionResult GetApplicationsList_RowsOnly(String type, String masterHostIP, int masterPort, int fromDateYear, int fromDateMonth, int fromDateDay, int fromTimeHour, int fromDateMin, int toDateYear, int toDateMonth, int toDateDay, int toTimeHour, int toDateMin) { DateTime fromDate = new DateTime(fromDateYear, fromDateMonth, fromDateDay, fromTimeHour, fromDateMin, 0); DateTime toDate = new DateTime(toDateYear, toDateMonth, toDateDay, toTimeHour, toDateMin, 0); String username = "******"; String password = ""; ApplicationManagement applicationManagement = new ApplicationManagement(username, password, masterHostIP, masterPort); List<IAccountable> apps = new List<IAccountable>(); if (type == "All") { apps = applicationManagement.getActiveApplications(); apps.AddRange(applicationManagement.getDoneApplications(appQureyType.Type.ALL, fromDate, toDate)); } if (type == "ErrorsOnly") { apps = applicationManagement.getDoneApplications(appQureyType.Type.NonSuccessfulOnly, fromDate, toDate); } if (type == "ActiveOnly") { apps = applicationManagement.getActiveApplications(); } ViewBag.Applications = apps; return View(); }