Compare commits
4 Commits
eff67b7697
...
v1.0
Author | SHA1 | Date | |
---|---|---|---|
3f9bf384b0 | |||
e783f8c614 | |||
c418188481 | |||
ec5ca51602 |
24
.dockerignore
Normal file
24
.dockerignore
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
README.md
|
14
.vscode/launch.json
vendored
14
.vscode/launch.json
vendored
@ -2,19 +2,14 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
// Use IntelliSense to find out which attributes exist for C# debugging
|
|
||||||
// Use hover for the description of the existing attributes
|
|
||||||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
|
||||||
"name": ".NET Core Launch (web)",
|
"name": ".NET Core Launch (web)",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
|
||||||
"program": "${workspaceFolder}/bin/Debug/net5.0/EFB.dll",
|
"program": "${workspaceFolder}/bin/Debug/net5.0/EFB.dll",
|
||||||
"args": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
|
|
||||||
"serverReadyAction": {
|
"serverReadyAction": {
|
||||||
"action": "openExternally",
|
"action": "openExternally",
|
||||||
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
|
||||||
@ -30,6 +25,15 @@
|
|||||||
"name": ".NET Core Attach",
|
"name": ".NET Core Attach",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "attach"
|
"request": "attach"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Docker .NET Core Launch",
|
||||||
|
"type": "docker",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "docker-run: debug",
|
||||||
|
"netCore": {
|
||||||
|
"appProject": "${workspaceFolder}/EFB.csproj"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
56
.vscode/tasks.json
vendored
56
.vscode/tasks.json
vendored
@ -37,6 +37,62 @@
|
|||||||
"/consoleloggerparameters:NoSummary"
|
"/consoleloggerparameters:NoSummary"
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docker-build",
|
||||||
|
"label": "docker-build: debug",
|
||||||
|
"dependsOn": [
|
||||||
|
"build"
|
||||||
|
],
|
||||||
|
"dockerBuild": {
|
||||||
|
"tag": "efb:dev",
|
||||||
|
"target": "base",
|
||||||
|
"dockerfile": "${workspaceFolder}/Dockerfile",
|
||||||
|
"context": "${workspaceFolder}",
|
||||||
|
"pull": true
|
||||||
|
},
|
||||||
|
"netCore": {
|
||||||
|
"appProject": "${workspaceFolder}/EFB.csproj"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docker-build",
|
||||||
|
"label": "docker-build: release",
|
||||||
|
"dependsOn": [
|
||||||
|
"build"
|
||||||
|
],
|
||||||
|
"dockerBuild": {
|
||||||
|
"tag": "efb:latest",
|
||||||
|
"dockerfile": "${workspaceFolder}/Dockerfile",
|
||||||
|
"context": "${workspaceFolder}",
|
||||||
|
"pull": true
|
||||||
|
},
|
||||||
|
"netCore": {
|
||||||
|
"appProject": "${workspaceFolder}/EFB.csproj"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docker-run",
|
||||||
|
"label": "docker-run: debug",
|
||||||
|
"dependsOn": [
|
||||||
|
"docker-build: debug"
|
||||||
|
],
|
||||||
|
"dockerRun": {},
|
||||||
|
"netCore": {
|
||||||
|
"appProject": "${workspaceFolder}/EFB.csproj",
|
||||||
|
"enableDebugging": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docker-run",
|
||||||
|
"label": "docker-run: release",
|
||||||
|
"dependsOn": [
|
||||||
|
"docker-build: release"
|
||||||
|
],
|
||||||
|
"dockerRun": {},
|
||||||
|
"netCore": {
|
||||||
|
"appProject": "${workspaceFolder}/EFB.csproj"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -23,18 +23,17 @@ namespace EFB.Controllers
|
|||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
//Check to see what point on the application the user is at and where they should be sent
|
//Check to see what point on the application the user is at and where they should be sent
|
||||||
UserModel User = HttpContext.Session.GetObject<UserModel>("User");
|
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
||||||
if (User != null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
if (User.Route == null)
|
|
||||||
{
|
|
||||||
return RedirectToAction("Index", "Route");
|
|
||||||
}else{
|
|
||||||
return RedirectToAction("Index", "App");
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
return RedirectToAction("Index", "Home");
|
return RedirectToAction("Index", "Home");
|
||||||
}
|
}
|
||||||
|
if (user.Route == null)
|
||||||
|
{
|
||||||
|
return RedirectToAction("Index", "Route");
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
|
@ -26,10 +26,16 @@ namespace EFB.Controllers
|
|||||||
{
|
{
|
||||||
//Retrieve and Check current user status
|
//Retrieve and Check current user status
|
||||||
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
||||||
if(user == null) return RedirectToAction("Index", "Home");
|
if(user == null){
|
||||||
|
TempData["Error"] = "You must be logged in before you are able to view the FlightSim Page";
|
||||||
|
return RedirectToAction("Index", "Home");
|
||||||
|
}
|
||||||
|
|
||||||
//Retrieve the user's latest sim position and construct it into FlightsimModel
|
//Retrieve the user's latest sim position and construct it into FlightsimModel
|
||||||
if (user.Route == null) return RedirectToAction("Index", "Route");
|
if (user.Route == null){
|
||||||
|
TempData["Error"] = "You must have a route planned before you are able to view the Flightsim page";
|
||||||
|
return RedirectToAction("Index", "Route");
|
||||||
|
}
|
||||||
|
|
||||||
SimPositionModel latestPositionModel = await Mongo.GetLatestData(user.EMail);
|
SimPositionModel latestPositionModel = await Mongo.GetLatestData(user.EMail);
|
||||||
|
|
||||||
|
@ -46,10 +46,16 @@ namespace EFB.Controllers
|
|||||||
public async Task<IActionResult> New(string departure, string arrival, string cruise)
|
public async Task<IActionResult> New(string departure, string arrival, string cruise)
|
||||||
{
|
{
|
||||||
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
||||||
if (!(user == null || user.UserToken.IsExpired()))
|
if (user == null || user.UserToken.IsExpired())
|
||||||
{//If the user is still authenticated
|
{//If the user is still authenticated
|
||||||
if (FormAuthenticator.ValidateICAOCode(departure) && FormAuthenticator.ValidateICAOCode(arrival))
|
return RedirectToAction("Index", "Home");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FormAuthenticator.ValidateICAOCode(departure) || !FormAuthenticator.ValidateICAOCode(arrival))
|
||||||
{//If the user has entered valid ICAOs
|
{//If the user has entered valid ICAOs
|
||||||
|
TempData["Error"] = "Invalid Departure or Arrival ICAO";
|
||||||
|
return RedirectToAction("Index", "Route");
|
||||||
|
}
|
||||||
|
|
||||||
uint cruiseAlt;
|
uint cruiseAlt;
|
||||||
|
|
||||||
@ -99,24 +105,23 @@ namespace EFB.Controllers
|
|||||||
TempData["Departure"] = departure;
|
TempData["Departure"] = departure;
|
||||||
TempData["Arrival"] = arrival;
|
TempData["Arrival"] = arrival;
|
||||||
return RedirectToAction("Index", "Route");
|
return RedirectToAction("Index", "Route");
|
||||||
|
|
||||||
}
|
|
||||||
TempData["Error"] = "Invalid Departure or Arrival ICAO";
|
|
||||||
return RedirectToAction("Index", "Route");
|
|
||||||
}
|
|
||||||
return RedirectToAction("Index", "Home");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<IActionResult> Poll(string departure, string arrival, uint cruise)
|
public async Task<IActionResult> Poll(string departure, string arrival, uint cruise)
|
||||||
{
|
{
|
||||||
if (HttpContext.Session.GetString("User") != null)
|
if (HttpContext.Session.GetString("User") == null)
|
||||||
{//If the user is currently logged in
|
{//If the user is not currently logged in
|
||||||
|
TempData["Error"] = "Please login before trying to plan a route";
|
||||||
|
return RedirectToAction("Index", "Route");
|
||||||
|
}
|
||||||
|
|
||||||
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
|
||||||
|
|
||||||
if (user.RouteToken != null)
|
if (user.RouteToken == null)
|
||||||
{//If the user has a route object (e.g, they have been to the route page)
|
{//If the user has a route object (e.g, they have been to the route page)
|
||||||
|
return RedirectToAction("Index", "Route");
|
||||||
|
}
|
||||||
//Make calls to the server to fetch route
|
//Make calls to the server to fetch route
|
||||||
bool collected = false;
|
bool collected = false;
|
||||||
int pollCount = 0;
|
int pollCount = 0;
|
||||||
@ -180,23 +185,11 @@ namespace EFB.Controllers
|
|||||||
user.Cruise = cruise;
|
user.Cruise = cruise;
|
||||||
HttpContext.Session.SetObject("User", user);
|
HttpContext.Session.SetObject("User", user);
|
||||||
|
|
||||||
return RedirectToAction("Index", "Route");
|
return RedirectToAction("Index", "App");
|
||||||
}
|
}
|
||||||
|
|
||||||
TempData["Error"] = $"Unable to get route after {pollCount} Attempts!";
|
TempData["Error"] = $"Unable to get route after {pollCount} Attempts!";
|
||||||
return RedirectToAction("Index", "Route");
|
return RedirectToAction("Index", "Route");
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return RedirectToAction("Index", "Route");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return RedirectToAction("Index", "Route");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,8 +31,12 @@ namespace EFB.Controllers
|
|||||||
|
|
||||||
public async Task<IActionResult> Login(string email, string password){
|
public async Task<IActionResult> Login(string email, string password){
|
||||||
|
|
||||||
if (Form.FormAuthenticator.ValidateEMail(email))
|
if (!Form.FormAuthenticator.ValidateEMail(email))
|
||||||
{
|
{
|
||||||
|
TempData["Error"] = "Please enter a valid E-Mail";
|
||||||
|
return RedirectToAction("Index", "Home");
|
||||||
|
}
|
||||||
|
|
||||||
//API Helper
|
//API Helper
|
||||||
APIInterface API = new APIInterface();
|
APIInterface API = new APIInterface();
|
||||||
|
|
||||||
@ -55,14 +59,18 @@ namespace EFB.Controllers
|
|||||||
TempData["Error"] = response.Error;
|
TempData["Error"] = response.Error;
|
||||||
TempData["email"] = email;
|
TempData["email"] = email;
|
||||||
return RedirectToAction("Index", "Home");
|
return RedirectToAction("Index", "Home");
|
||||||
}else{
|
}
|
||||||
|
|
||||||
//Type cast required but we know response will be of known type
|
//Type cast required but we know response will be of known type
|
||||||
LoginResponse login = response.Result;
|
LoginResponse login = response.Result;
|
||||||
|
|
||||||
//Generate User Session
|
//Generate User Session
|
||||||
if (login.error == null)
|
if (login.error != null)
|
||||||
{
|
{
|
||||||
|
TempData["Error"] = login.error_description;
|
||||||
|
TempData["email"] = email;
|
||||||
|
return RedirectToAction("Index", "Home");
|
||||||
|
}
|
||||||
|
|
||||||
UserModel user = new UserModel{
|
UserModel user = new UserModel{
|
||||||
EMail = email,
|
EMail = email,
|
||||||
UserToken = new TokenModel{
|
UserToken = new TokenModel{
|
||||||
@ -74,19 +82,6 @@ namespace EFB.Controllers
|
|||||||
//Using Session Extensions (Store the user session)
|
//Using Session Extensions (Store the user session)
|
||||||
HttpContext.Session.SetObject("User", user);
|
HttpContext.Session.SetObject("User", user);
|
||||||
return RedirectToAction("Index", "App");
|
return RedirectToAction("Index", "App");
|
||||||
}else{
|
|
||||||
TempData["Error"] = login.error_description;
|
|
||||||
TempData["email"] = email;
|
|
||||||
return RedirectToAction("Index", "Home");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
TempData["Error"] = "Please enter a valid E-Mail";
|
|
||||||
return RedirectToAction("Index", "Home");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal AS base
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
ENV ASPNETCORE_URLS=http://+:5000
|
||||||
|
|
||||||
|
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||||
|
# For more info, please refer to https://aka.ms/vscode-docker-dotnet-configure-containers
|
||||||
|
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
||||||
|
USER appuser
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["EFB.csproj", "./"]
|
||||||
|
RUN dotnet restore "EFB.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/."
|
||||||
|
RUN dotnet build "EFB.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish "EFB.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "EFB.dll"]
|
@ -7,5 +7,6 @@
|
|||||||
<PackageReference Include="MySql.Data" Version="*"/>
|
<PackageReference Include="MySql.Data" Version="*"/>
|
||||||
<PackageReference Include="MongoDB.Driver" Version="*"/>
|
<PackageReference Include="MongoDB.Driver" Version="*"/>
|
||||||
<PackageReference Include="MongoDB.Bson" Version="*"/>
|
<PackageReference Include="MongoDB.Bson" Version="*"/>
|
||||||
|
<PackageReference Include="libmetar" Version="*"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
32
Metar/Metar.cs
Normal file
32
Metar/Metar.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using libmetar.Services;
|
||||||
|
|
||||||
|
namespace EFB.Metar
|
||||||
|
{
|
||||||
|
public static class Metar
|
||||||
|
{
|
||||||
|
private static MetarService metarService { get; set; } = new MetarService();
|
||||||
|
private static TafService tafService { get; set; } = new TafService();
|
||||||
|
|
||||||
|
|
||||||
|
public static async Task<string> GetMETAR(string ICAO){
|
||||||
|
return (await metarService.GetRawAsync(ICAO)).Raw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<List<string>> GetTAF(string ICAO){
|
||||||
|
var downloadedTAF = (await tafService.GetRawAsync(ICAO)).RawSplit;
|
||||||
|
List<string> TAF = new List<string>();
|
||||||
|
|
||||||
|
foreach (var line in downloadedTAF)
|
||||||
|
{
|
||||||
|
TAF.Add(line);
|
||||||
|
}
|
||||||
|
return TAF;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -63,7 +63,7 @@ namespace EFB.Models
|
|||||||
|
|
||||||
Dictionary<string, string> formData = new Dictionary<string, string>();
|
Dictionary<string, string> formData = new Dictionary<string, string>();
|
||||||
|
|
||||||
formData.Add("token", Environment.GetEnvironmentVariable("ChartFoxAPIKey", EnvironmentVariableTarget.User));
|
formData.Add("token", Environment.GetEnvironmentVariable("ChartFoxAPIKey"));
|
||||||
FormUrlEncodedContent body = new FormUrlEncodedContent(formData);
|
FormUrlEncodedContent body = new FormUrlEncodedContent(formData);
|
||||||
|
|
||||||
//make Charts request
|
//make Charts request
|
||||||
|
@ -39,7 +39,7 @@ namespace EFB.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<NavdataModel[]> Populate(){
|
public static async Task<NavdataModel[]> Populate(){
|
||||||
string password = Environment.GetEnvironmentVariable("MySQLPassword", EnvironmentVariableTarget.User);
|
string password = Environment.GetEnvironmentVariable("MySQLPassword");
|
||||||
MySqlConnection con = new MySqlConnection($"server=server.luke-else.co.uk;userid=root;password={password};database=EFB");
|
MySqlConnection con = new MySqlConnection($"server=server.luke-else.co.uk;userid=root;password={password};database=EFB");
|
||||||
con.Open();
|
con.Open();
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace EFB.MongoData
|
|||||||
//function that is responsible to getting the user's latest sim position from the MongoDB
|
//function that is responsible to getting the user's latest sim position from the MongoDB
|
||||||
public static async Task<SimPositionModel> GetLatestData(string email){
|
public static async Task<SimPositionModel> GetLatestData(string email){
|
||||||
MongoClient client = new MongoClient(
|
MongoClient client = new MongoClient(
|
||||||
Environment.GetEnvironmentVariable("MongoDBConnectionString", EnvironmentVariableTarget.User)
|
Environment.GetEnvironmentVariable("MongoDBConnectionString")
|
||||||
);
|
);
|
||||||
MongoDatabaseBase database = (MongoDatabaseBase)client.GetDatabase("EFB");
|
MongoDatabaseBase database = (MongoDatabaseBase)client.GetDatabase("EFB");
|
||||||
MongoCollectionBase<SimPositionModel> collection = (MongoCollectionBase<SimPositionModel>)database.GetCollection<SimPositionModel>("Simdata");
|
MongoCollectionBase<SimPositionModel> collection = (MongoCollectionBase<SimPositionModel>)database.GetCollection<SimPositionModel>("Simdata");
|
||||||
|
48
Views/App/Index.cshtml
Normal file
48
Views/App/Index.cshtml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
@using EFB.Metar;
|
||||||
|
@model EFB.Models.UserModel;
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Welcome";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="row d-flex">
|
||||||
|
<div class="card-body col-md-12 bg-primary">
|
||||||
|
<div class="container jumbotron">
|
||||||
|
<h3>Current Session - @Model.EMail</h3>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row d-flex">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4>Departure</h4>
|
||||||
|
@Model.Departure
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
@await Metar.GetMETAR(Model.Departure)
|
||||||
|
|
||||||
|
<h4>Cruise</h4>
|
||||||
|
@Model.Cruise ft
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4>Arrival</h4>
|
||||||
|
@Model.Arrival
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
@await Metar.GetMETAR(Model.Arrival)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<h4>Route</h4>
|
||||||
|
@Model.Route
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
|||||||
@using Newtonsoft.Json;
|
@using Newtonsoft.Json;
|
||||||
|
@using EFB.Metar;
|
||||||
@model EFB.Models.ViewChartModel;
|
@model EFB.Models.ViewChartModel;
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Welcome";
|
ViewData["Title"] = "Welcome";
|
||||||
@ -80,6 +81,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<h4>Current Weather</h4>
|
||||||
|
@await Metar.GetMETAR(@Model.Charts.ICAO);
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -99,4 +104,6 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
16
docker-compose.debug.yml
Normal file
16
docker-compose.debug.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Please refer https://aka.ms/HTTPSinContainer on how to setup an https developer certificate for your ASP .NET Core service.
|
||||||
|
|
||||||
|
version: '3.4'
|
||||||
|
|
||||||
|
services:
|
||||||
|
efb:
|
||||||
|
image: efb
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
ports:
|
||||||
|
- 5000:5000
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
volumes:
|
||||||
|
- ~/.vsdbg:/remote_debugger:rw
|
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Please refer https://aka.ms/HTTPSinContainer on how to setup an https developer certificate for your ASP .NET Core service.
|
||||||
|
|
||||||
|
version: '3.4'
|
||||||
|
|
||||||
|
services:
|
||||||
|
efb:
|
||||||
|
image: efb
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
ports:
|
||||||
|
- 5000:5000
|
||||||
|
environment:
|
||||||
|
- MongoDBConnectionString=
|
||||||
|
- MySQLPassword=
|
||||||
|
- ChartFoxAPIKey=
|
Reference in New Issue
Block a user