Skip to content

SamIvanov7/ParserWebApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParserWebApp

ParserWebApp is a web application designed to parse and display log entries from NASA access logs.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/SamIvanov7/ParserWebApp.git
    cd ParserWebApp
  2. Restore NuGet packages:

    dotnet restore
  3. Update the connection string:

    Open appsettings.json and update the DefaultConnection string to point to your SQL Server instance.

  4. Apply migrations to set up the database:

    dotnet ef database update
  5. Build and run the application:

    dotnet run --project ParserWebApp
  6. Navigate to the application:

    Open your web browser and go to https://localhost:port.

Configuration

Ensure your appsettings.json file is configured correctly:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=your_server;Database=ParserDb;User Id=your_user;Password=your_password;"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}

Usage

  • Start Parser:

    Click the "Start Parser" button to begin parsing the log file. Ensure the path to the parser executable is correctly set in the StartParser method in LogController.cs.

  • Stop Parser:

    Click the "Stop Parser" button to stop the parser.

Project Structure

  • ParserConsoleApp: Contains the console application that parses the log files.
  • ParserWebApp: Contains the web application to manage and view log entries.
  • ParserWebApp.Data: Contains the Entity Framework Core DbContext and database models.

Dependencies

ParserConsoleApp

<ItemGroup>
    <PackageReference Include="EFCore.BulkExtensions" Version="8.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

ParserWebApp

<ItemGroup>
    <PackageReference Include="EFCore.BulkExtensions" Version="8.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
    <PackageReference Include="X.PagedList" Version="9.1.2" />
    <PackageReference Include="X.PagedList.Mvc.Core" Version="9.1.2" />
</ItemGroup>

About

NASA Log Parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published