public async Task <IActionResult> BundleCreated(string bundleId) { if (bundleRepo.ContainsBundle(bundleId)) { return(View("BundleCreated", new BundleViewModel(bundleRepo.Get(bundleId), await GetDumpListViewModels(bundleId)))); } throw new Exception($"bundleid '{bundleId}' does not exist in repository"); }
public IActionResult BundleCreated(string bundleId) { if (bundleRepo.ContainsBundle(bundleId)) { return(View(new BundleViewModel(bundleRepo.Get(bundleId), GetDumpListViewModels(bundleId)))); } throw new NotImplementedException($"bundleid '{bundleId}' does not exist in repository"); }
public IActionResult TriggerSimilarityAnalysis(string bundleId, string dumpId) { BundleMetainfo bundleInfo = bundleRepository.Get(bundleId); if (bundleInfo == null) { logger.LogNotFound("TriggerSimilarityAnalysis: Bundle not found", HttpContext, "BundleId", bundleId); return(View(null)); } logger.LogDumpAccess("TriggerSimilarityAnalysis", HttpContext, bundleInfo, dumpId); //TODO check if bundle exists similarityService.ScheduleSimilarityAnalysis(new DumpIdentifier(bundleId, dumpId), true, DateTime.MinValue); return(RedirectToAction("Report", "Home", new { bundleId = bundleId, dumpId = dumpId })); // View("/Home/Report", new ReportViewModel(bundleId, dumpId)); }
public override async void AnalyzeDump(DumpMetainfo dumpInfo) { BundleMetainfo bundle = bundleRepo.Get(dumpInfo.BundleId); try { SDResult result = await dumpRepo.GetResultAndThrow(dumpInfo.Id); if (result != null) { await elasticSearch.PushResultAsync(result, bundle, dumpInfo); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }