public async Task <IActionResult> Transactions(SearchViewModel model) { // Perform search var searcher = new LogSearcher( _settings.TenantId, _settings.ApplicationId, _settings.ApplicationKey, _settings.SubscriptionId, _settings.ResourceGroup, _settings.WorkspaceId, _settings.WorkspaceName); model.Transactions = await searcher.SearchTransactions(model.TransactionId, model.VehicleId); return(View(model)); }
public IActionResult Test() { var model = InitializeModel(true); // Test HTTP Data Collector API var collector = new LogCollector(_settings.WorkspaceId, _settings.WorkspaceKey); var collectorConfigurationValid = collector.WriteTestData(); // Test Log Search API var searcher = new LogSearcher(_settings.TenantId, _settings.ApplicationId, _settings.ApplicationKey, _settings.SubscriptionId, _settings.ResourceGroup, _settings.WorkspaceId, _settings.WorkspaceName); var searcherConfigurationValid = searcher.SearchTestRecords(); model.IsValid = collectorConfigurationValid && searcherConfigurationValid; return(View("Index", model)); }