集成维护面板

This commit is contained in:
cli 2025-03-14 14:04:49 +08:00
parent 8ac429efef
commit 3b2e1c6e9c
13 changed files with 220 additions and 78 deletions

View File

@ -12,5 +12,20 @@
/// </summary> /// </summary>
public const string DefaultCookieName = "JiShe.CollectBus.Host"; public const string DefaultCookieName = "JiShe.CollectBus.Host";
/// <summary>
/// SwaggerUi 端点
/// </summary>
public const string SwaggerUiEndPoint = "/swagger";
/// <summary>
/// Hangfire 端点
/// </summary>
public const string HangfireDashboardEndPoint = "/hangfire";
/// <summary>
/// CAP 端点
/// </summary>
public const string CapDashboardEndPoint = "/cap";
} }
} }

View File

@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace JiShe.CollectBus.Host.Controllers
{
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("/Monitor");
}
}
}

View File

@ -1,33 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace JiShe.CollectBus.Host.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
}
}

View File

@ -0,0 +1,171 @@
@page
@using JiShe.CollectBus.Host
@model JiShe.CollectBus.Host.Pages.Monitor
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<title>后端服务</title>
</head>
<body>
<div class="container projects">
<div class="projects-header page-header">
<h2>后端服务列表</h2>
@* <p>这些项目或者是对Bootstrap进行了有益的补充或者是基于Bootstrap开发的</p> *@
</div>
<div class="row">
<div class="col-sm-6 col-md-4 col-lg-3">
<div class="thumbnail" style="height: 180px">
<a href="@CollectBusHostConst.SwaggerUiEndPoint" target="_blank">
<img class="lazy" src="/images/swagger.png" width="300" height="150"/>
</a>
<div class="caption">
<h3>
<a href="@CollectBusHostConst.SwaggerUiEndPoint" target="_blank">SwaggerUI</a>
</h3>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div class="thumbnail" style="height: 180px">
<a href="@CollectBusHostConst.HangfireDashboardEndPoint" target="_blank">
<img class="lazy" src="/images/hangfire.png" width="300" height="150"/>
</a>
<div class="caption">
<h3>
<a href="@CollectBusHostConst.HangfireDashboardEndPoint" target="_blank">Hangfire面板</a>
</h3>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div class="thumbnail" style="height: 180px">
<a href="@CollectBusHostConst.CapDashboardEndPoint" target="_blank">
<img class="lazy" src="/images/cap.png" width="300" height="150"/>
</a>
<div class="caption">
<h3>
<a href="@CollectBusHostConst.CapDashboardEndPoint" target="_blank">CAP</a>
</h3>
</div>
</div>
</div>
@* <div class="col-sm-6 col-md-4 col-lg-3">
<div class="thumbnail" style="height: 180px">
<a href="@CollectBusHostConst.MoreEndPoint" target="_blank">
<img class="lazy" src="/images/more.png" width="300" height="150"/>
</a>
<div class="caption">
<h3>
<a href="@CollectBusHostConst.MoreEndPoint" target="_blank">了解更多...</a>
</h3>
</div>
</div>
</div> *@
</div>
</div>
</body>
</html>
<style>
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.container {
width: 1170 px;
padding-right: 15 px;
padding-left: 15 px;
margin-right: auto;
margin-left: auto;
}
.projects-header {
width: 60%;
text-align: center;
font-weight: 200;
display: block;
margin: 60 px auto 40 px !important;
}
.page-header {
padding-bottom: 9px;
margin: 40px auto;
border-bottom: 1 px solid #eee;
}
.projects-header h2 {
font-size: 42px;
letter-spacing: -1px;
}
h2 {
margin-top: 20 px;
margin-bottom: 10 px;
font-weight: 500;
line-height: 1.1;
color: inherit;
/* text-align: center; */
}
p {
margin: 0 0 10 px;
}
.row {
margin-right: -15 px;
margin-left: -15 px;
}
.col-lg-3 {
width: 25%;
}
.projects .thumbnail {
display: block;
margin-right: auto;
margin-left: auto;
text-align: center;
margin-bottom: 30 px;
border-radius: 0;
}
.thumbnail {
display: block;
padding: 4px;
line-height: 1.42857143;
background-color: #fff;
border: 1 px solid #ddd;
.transition(border 0.2s ease-in-out);
}
a {
color: #337ab7;
text-decoration: none;
background-color: transparent;
}
.projects .thumbnail img {
max-width: 100%;
height: auto;
}
.thumbnail a > img,
.thumbnail > img {
margin-right: auto;
margin-left: auto;
}
img {
vertical-align: middle;
}
/* .projects .thumbnail .caption {
overflow-y: hidden;
color: #555;
} */
.caption {
padding: 9px;
overflow-y: hidden;
color: #555;
}
</style>

View File

@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace JiShe.CollectBus.Host.Pages
{
public class Monitor : PageModel
{
public void OnGet()
{
}
}
}

View File

@ -1,38 +1,9 @@
{ {
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:38293",
"sslPort": 44329
}
},
"profiles": { "profiles": {
"http": { "JiShe.CollectBus.Host": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "applicationUrl": "http://localhost:44315",
"applicationUrl": "http://localhost:5063",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7232;http://localhost:5063",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

View File

@ -1,13 +0,0 @@
namespace JiShe.CollectBus.Host
{
public class WeatherForecast
{
public DateOnly Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long