Additional legacy data cleanup
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
title: Cheat Sheet
|
|
||||||
summary: Handy links or quick information on this project.
|
|
||||||
created_date: 2022-04-11
|
|
||||||
updated_date: 2022-04-11
|
|
||||||
---
|
|
||||||
|
|
||||||
# Overview
|
|
||||||
|
|
||||||
This document will contain quick reference information on this project.
|
|
||||||
|
|
||||||
## Dev Team
|
|
||||||
|
|
||||||
| Name | Role | Discord |
|
|
||||||
|--------------------|------------|------------------------|
|
|
||||||
| Jonathan McCaffrey | Maintainer | JonathanMcCaffrey#3544 |
|
|
||||||
|
|
||||||
## Project Links
|
|
||||||
|
|
||||||
| Name | Purpose | Link |
|
|
||||||
|------------|-------------------------------------------------------------------|----------------------------------------------------------------|
|
|
||||||
| Production | Customer facing version of website. `main` branch. | https://www.igpfanreference.com/ |
|
|
||||||
| Develop | Development/testing version of website. `develop` branch. | https://calm-mud-04916b210.1.azurestaticapps.net/ |
|
|
||||||
| GitRepo | Where all the dev work goes. | https://github.com/JonathanMcCaffrey/IGP-Fan-Reference |
|
|
||||||
| CI | Deployment CI logs. See if a new build has successfully released. | https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/actions |
|
|
||||||
|
|
||||||
## Educational Links
|
|
||||||
|
|
||||||
| Name | Purpose | Link |
|
|
||||||
|--------|---------------------------------------|----------------------------------------------------------------|
|
|
||||||
| Blazor | Getting started information on Blazor | https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor |
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
---
|
|
||||||
title: Project Data
|
|
||||||
summary: Using data in this project.
|
|
||||||
created_date: 2022-04-11
|
|
||||||
updated_date: 2022-04-11
|
|
||||||
---
|
|
||||||
|
|
||||||
# Overview
|
|
||||||
|
|
||||||
This document will contain general information on data in this project.
|
|
||||||
|
|
||||||
## General Note
|
|
||||||
|
|
||||||
This project is a work in progress. As such, most of the data in the website doesn't follow the document. Ideally, this
|
|
||||||
will be fixed over time.
|
|
||||||
|
|
||||||
## SQL
|
|
||||||
|
|
||||||
Relational data is stored in a local SQL database.
|
|
||||||
|
|
||||||
This data is converted into JSON so it can be handled by Blazor WASM.
|
|
||||||
|
|
||||||
<i>Currently, Blazor WASM has a bug that prevents SQL from being used in production. Although, given SQL doesn't seem to
|
|
||||||
provide much, aside from increased build times and load times, it might just be best to use the design principals of
|
|
||||||
SQL, and it's interface, without using the actual technology in production.</i>
|
|
||||||
|
|
||||||
The data is then loaded in by a Service, via it's load method.
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
// Using Component
|
|
||||||
protected override async Task OnInitializedAsync()
|
|
||||||
{
|
|
||||||
await AgileService.Load();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
// Loading Service
|
|
||||||
public async Task Load()
|
|
||||||
{
|
|
||||||
if (isLoaded) return;
|
|
||||||
AgileSprintModels =
|
|
||||||
(await httpClient.GetFromJsonAsync<AgileSprintModel[]>("generated/AgileSprintModels.json")
|
|
||||||
?? Array.Empty<AgileSprintModel>()).ToList();
|
|
||||||
AgileTaskModels =
|
|
||||||
(await httpClient.GetFromJsonAsync<AgileTaskModel[]>("generated/AgileTaskModels.json")
|
|
||||||
?? Array.Empty<AgileTaskModel>()).ToList();
|
|
||||||
SortSql();
|
|
||||||
isLoaded = true;
|
|
||||||
NotifyDataChanged();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
We create a `SortSql()` method to handle adjusting the data to match what SQL would of given us.
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
private void SortSql()
|
|
||||||
{
|
|
||||||
foreach (var agileTask in AgileTaskModels!)
|
|
||||||
{
|
|
||||||
if (agileTask.AgileSprintModelId != null)
|
|
||||||
{
|
|
||||||
SprintById(agileTask.AgileSprintModelId.Value)?.AgileTaskModels.Add(agileTask);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
We could also create indexes, or whatever other functionality we lose by SQL not working in production.
|
|
||||||
|
|
||||||
Then it's only a matter of using said data.
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
@if (!agileService.IsLoaded())
|
|
||||||
{
|
|
||||||
<LoadingComponent/>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<LayoutMediumContentComponent>
|
|
||||||
<WebsiteTitleComponent>Agile</WebsiteTitleComponent>
|
|
||||||
<div class="agileViewContainer">
|
|
||||||
@foreach (var sprint in agileService.AgileSprintModels!
|
|
||||||
.OrderBy(e => e.EndDate).Reverse())
|
|
||||||
{
|
|
||||||
<details class="sprintDisplayContainer @sprint.GetSprintType().ToLower()"
|
|
||||||
open="@(sprint.GetSprintType() == SprintType.Current)">
|
|
||||||
<summary class="sprintSummary">
|
|
||||||
<div class="sprintTitle">@sprint.Name</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Localized Strings
|
|
||||||
|
|
||||||
Localized strings are handled in the Localizations.resx file.
|
|
||||||
|
|
||||||
Most text isn't using localized strings yet. And English is the only plan of support in the short term, and probably in
|
|
||||||
the long term as well.
|
|
||||||
|
|
||||||
## Markdown Files
|
|
||||||
|
|
||||||
Documents and Notes are markdown files located in the `wwwroot/content` folder.
|
|
||||||
|
|
||||||
Navigation to these pages is handled via the SQL data.
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
---
|
|
||||||
title: Setup
|
|
||||||
summary: Get set up on developing this web project.
|
|
||||||
created_date: 3/30/2022
|
|
||||||
updated_date: 4/7/2022
|
|
||||||
---
|
|
||||||
|
|
||||||
# Overview
|
|
||||||
|
|
||||||
This document will contain general setup notes for the project.
|
|
||||||
|
|
||||||
## Prerequisite
|
|
||||||
|
|
||||||
To understand content in this document, it is recommended to have some software development experience. Particularly
|
|
||||||
using GitHub and Visual Studio.
|
|
||||||
|
|
||||||
- [GitHub Documentation](https://docs.github.com/en/get-started)
|
|
||||||
|
|
||||||
- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/)
|
|
||||||
|
|
||||||
To make updates to this website, it is recommended to understand HTML/CSS and C#.
|
|
||||||
|
|
||||||
- [C# Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/)
|
|
||||||
- [Mozilla's HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started)
|
|
||||||
- [W3SCHOOLS' HTML Documentation](https://www.w3schools.com/html/)
|
|
||||||
|
|
||||||
Further, you should understand the product and clients this website is for. So it is recommended to play "Immortal:
|
|
||||||
Gates of Pyre".
|
|
||||||
|
|
||||||
- [IGP Website](https://gatesofpyre.com/)
|
|
||||||
- **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not
|
|
||||||
aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps
|
|
||||||
of getting access.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Download and install Visual Studio preview.
|
|
||||||
|
|
||||||
**Note:** Visual Studio Preview currently doesn't work on Mac for this project. Use a PC, or Rider.
|
|
||||||
|
|
||||||
[https://visualstudio.microsoft.com/vs/preview/](https://visualstudio.microsoft.com/vs/preview/)
|
|
||||||
|
|
||||||
When installing, ensure you have selected "Workloads | **ASP.NET and web development**" and "Individual components | **
|
|
||||||
.NET WebAssembly build tools**".
|
|
||||||
|
|
||||||
## Download Project
|
|
||||||
|
|
||||||
Get this project from GitHub.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git
|
|
||||||
```
|
|
||||||
|
|
||||||
## Project Tree
|
|
||||||
|
|
||||||
```
|
|
||||||
C:.
|
|
||||||
├───.github
|
|
||||||
│ └───workflows # Workflows to deploy website
|
|
||||||
├───Components # Components used be website
|
|
||||||
├───Contexts
|
|
||||||
├───IGP
|
|
||||||
│ ├───Pages # Website pages
|
|
||||||
│ └───wwwroot
|
|
||||||
│ ├───css
|
|
||||||
│ ├───generated # Files generated by IGP_Convert. Do not edit
|
|
||||||
│ ├───image
|
|
||||||
│ └───javascript
|
|
||||||
├───IGP_Convert # Converts SQL into JSON for Blazor Wasm
|
|
||||||
├───Model # Data models
|
|
||||||
└───Services # Web services
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running
|
|
||||||
|
|
||||||
- Open `IGP/IGP.sln`.
|
|
||||||
- Click the green RUN button in Visual Studio.
|
|
||||||
- A local copy of the IGP Website should have launched on your machine.
|
|
||||||
|
|
||||||
## Publishing
|
|
||||||
|
|
||||||
Code committed to the `main` branch will automatically be deployed to [production](https://www.igpfanreference.com/).
|
|
||||||
|
|
||||||
Code committed to the `develop` branch will automatically be deployed
|
|
||||||
to [development](https://calm-mud-04916b210.1.azurestaticapps.net/).
|
|
||||||
|
|
||||||
_This is handle via the files in `.github/workflow`. Look into
|
|
||||||
these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works._
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
Nothing that some good internet searches cannot resolved. But you can also contact the project maintainer
|
|
||||||
on [Discord](https://discord.gg/uMq8bMGeeN).
|
|
||||||
Reference in New Issue
Block a user