feat(layout): 좌측하단 내비게이션 드로어에 버전 정보 및 배포 일시 추가 및 빌드 자동화 연계
Deploy to Production / Build & Deploy to Production (push) Successful in 1m35s
Snapshot Admin Deployment / build-and-deploy (push) Failing after 46s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 8s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 6s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Successful in 1m35s
Snapshot Admin Deployment / build-and-deploy (push) Failing after 46s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 8s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 6s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
This commit is contained in:
@@ -79,6 +79,15 @@ jobs:
|
|||||||
--no-build \
|
--no-build \
|
||||||
-o ./publish-output
|
-o ./publish-output
|
||||||
|
|
||||||
|
- name: Generate Build Info
|
||||||
|
run: |
|
||||||
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||||
|
BUILD_TIME=$(date -d "+9 hours" +'%Y-%m-%d %H:%M:%S KST')
|
||||||
|
mkdir -p ./publish-output/wwwroot
|
||||||
|
printf '{\n "version": "1.0.%s-%s",\n "built": "%s"\n}\n' "${{ github.run_number }}" "$COMMIT_HASH" "$BUILD_TIME" > ./publish-output/wwwroot/version.json
|
||||||
|
echo "✓ Generated version info: 1.0.${{ github.run_number }}-$COMMIT_HASH @ $BUILD_TIME"
|
||||||
|
|
||||||
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ jobs:
|
|||||||
echo "[deploy] publishing .NET 10 Blazor app"
|
echo "[deploy] publishing .NET 10 Blazor app"
|
||||||
dotnet publish src/dotnet/QuantEngine.Web/QuantEngine.Web.csproj -c Release -o ./publish
|
dotnet publish src/dotnet/QuantEngine.Web/QuantEngine.Web.csproj -c Release -o ./publish
|
||||||
|
|
||||||
|
- name: Generate Build Info
|
||||||
|
run: |
|
||||||
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||||
|
BUILD_TIME=$(date -d "+9 hours" +'%Y-%m-%d %H:%M:%S KST')
|
||||||
|
mkdir -p ./publish/wwwroot
|
||||||
|
printf '{\n "version": "1.0.%s-%s",\n "built": "%s"\n}\n' "${{ github.run_number }}" "$COMMIT_HASH" "$BUILD_TIME" > ./publish/wwwroot/version.json
|
||||||
|
echo "✓ Generated version info: 1.0.${{ github.run_number }}-$COMMIT_HASH @ $BUILD_TIME"
|
||||||
|
|
||||||
|
|
||||||
- name: Compress Artifact
|
- name: Compress Artifact
|
||||||
run: |
|
run: |
|
||||||
echo "[deploy] compressing publish output"
|
echo "[deploy] compressing publish output"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment WebHostEnvironment
|
||||||
|
|
||||||
<MudLayout>
|
<MudLayout>
|
||||||
<MudAppBar Elevation="1">
|
<MudAppBar Elevation="1">
|
||||||
@@ -9,11 +10,19 @@
|
|||||||
<MudIconButton Icon="@Icons.Material.Filled.Settings" Color="Color.Inherit" />
|
<MudIconButton Icon="@Icons.Material.Filled.Settings" Color="Color.Inherit" />
|
||||||
</MudAppBar>
|
</MudAppBar>
|
||||||
|
|
||||||
<MudDrawer @bind-Open="@drawerOpen" Elevation="1">
|
<MudDrawer @bind-Open="@drawerOpen" Elevation="1" Class="d-flex flex-column h-100">
|
||||||
<MudDrawerHeader>
|
<MudDrawerHeader>
|
||||||
<MudText Typo="Typo.h6">Menu</MudText>
|
<MudText Typo="Typo.h6">Menu</MudText>
|
||||||
</MudDrawerHeader>
|
</MudDrawerHeader>
|
||||||
|
|
||||||
<NavMenu />
|
<NavMenu />
|
||||||
|
|
||||||
|
<MudSpacer />
|
||||||
|
|
||||||
|
<div class="px-4 py-3 mt-auto" style="border-top: 1px solid rgba(0,0,0,0.08); font-size: 11px; color: var(--mud-palette-text-secondary); line-height: 1.5; background-color: rgba(0,0,0,0.01);">
|
||||||
|
<div style="font-weight: 500; margin-bottom: 2px;">QuantEngine v@appVersion</div>
|
||||||
|
<div style="font-size: 10px; opacity: 0.85;">배포: @buildTime</div>
|
||||||
|
</div>
|
||||||
</MudDrawer>
|
</MudDrawer>
|
||||||
|
|
||||||
<MudMainContent>
|
<MudMainContent>
|
||||||
@@ -32,9 +41,39 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool drawerOpen = true;
|
private bool drawerOpen = true;
|
||||||
|
private string appVersion = "Local Debug";
|
||||||
|
private string buildTime = "N/A";
|
||||||
|
|
||||||
private void DrawerToggle()
|
private void DrawerToggle()
|
||||||
{
|
{
|
||||||
drawerOpen = !drawerOpen;
|
drawerOpen = !drawerOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var versionFilePath = Path.Combine(WebHostEnvironment.WebRootPath, "version.json");
|
||||||
|
if (File.Exists(versionFilePath))
|
||||||
|
{
|
||||||
|
var jsonContent = File.ReadAllText(versionFilePath);
|
||||||
|
using var doc = System.Text.Json.JsonDocument.Parse(jsonContent);
|
||||||
|
var root = doc.RootElement;
|
||||||
|
|
||||||
|
if (root.TryGetProperty("version", out var versionProp))
|
||||||
|
{
|
||||||
|
appVersion = versionProp.GetString() ?? "Local Debug";
|
||||||
|
}
|
||||||
|
if (root.TryGetProperty("built", out var builtProp))
|
||||||
|
{
|
||||||
|
buildTime = builtProp.GetString() ?? "N/A";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Fail-safe default fallback values
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user