public async Task <IViewComponentResult> InvokeAsync(string resourceGroup, string automationAccount, RunbookSimple runbook, string hybridWorkerGroup, Dictionary <string, string> inputs) { //Start runbook and return output ResultsModel results = await _customAzureOperations.StartRunbookAndReturnResult(resourceGroup, automationAccount, runbook.Name, hybridWorkerGroup, inputs).ConfigureAwait(false); results.Runbook = runbook; return(View(results)); }
public async Task <IActionResult> Submit(string signalRconnectionId, Dictionary <string, string> inputs) { StaticRepo.ConnectionId = signalRconnectionId; //Start runbook and return output _results = await _customAzureOperations.StartRunbookAndReturnResult(_resourceGroup, _automationAccount, StaticRepo.RunbookName, inputs); ViewData["JobOutput"] = _results.Item1; if (_results.Item2 == JobStatus.Failed) { ViewData["JobOutputError"] = _results.Item1; } return(View($"Result{currentPageType}")); }
public async Task <IActionResult> Success(Dictionary <string, string> inputs) { //Start runbook and return output var results = await _customAzureOperations.StartRunbookAndReturnResult(_resourceGroup, _automationAccount, _runbookName, inputs); if (results.Item2 == JobStatus.Completed) { TempData["JobOutput"] = results.Item1; } else { TempData["JobOutputError"] = results.Item1; } return(View("Index", _runbookParameterSettings)); }