From d846d30b6442091a3756df0f9c5bee5906fddd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Sat, 7 Dec 2024 12:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=91=E6=8E=A7=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E9=A1=B5=E9=9D=A2=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/AppDayStat/_List_Search.cshtml | 29 ++++++++++++++----- .../Controllers/AppConsumeController.cs | 1 + .../Controllers/AppServiceController.cs | 1 + Stardust.Web/Views/Shared/_App_Nav.cshtml | 4 +-- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/Stardust.Web/Areas/Monitors/Views/AppDayStat/_List_Search.cshtml b/Stardust.Web/Areas/Monitors/Views/AppDayStat/_List_Search.cshtml index 6a583482..b5f679a5 100644 --- a/Stardust.Web/Areas/Monitors/Views/AppDayStat/_List_Search.cshtml +++ b/Stardust.Web/Areas/Monitors/Views/AppDayStat/_List_Search.cshtml @@ -8,22 +8,37 @@ var page = ViewBag.Page as Pager; var dic = AppTracer.FindAllWithCache().ToDictionary(e => e.ID, e => e + ""); + + // 优先使用monitorId var appId = page["appId"].ToInt(-1); - if(appId<=0)appId=page["monitorId"].ToInt(-1); + var monitorId = page["monitorId"].ToInt(-1); + // if (appId <= 0) appId = monitorId; + // if (monitorId > 0) page["appId"] = (appId = monitorId) + ""; + + // 星尘监控,子系统内部跳转到当前页,只有appId;外部跳转到当前页,有appId和monitorId + var app = AppTracer.FindByID(appId); + if (appId > 0 && monitorId <= 0) + { + monitorId = appId; + if (app != null) appId = app.AppId; + } + else if (appId > 0 && monitorId > 0) + { + app = AppTracer.FindByID(monitorId); + } } @if (appId > 0) { - var app = AppTracer.FindByID(appId);
- @app + @app
- @Html.ActionLink("每分钟", null, "appMinuteStat", new { appId }) - @Html.ActionLink("每天", null, "appDayStat", new { monitorId=appId }) + @Html.ActionLink("每分钟", null, "appMinuteStat", new { appId = monitorId }) + @Html.ActionLink("每天", null, "appDayStat", new { appId, monitorId })
}
- - @Html.ForDropDownList("appId", dic, page["appId"], "全部", true) + + @Html.ForDropDownList("monitorId", dic, page["monitorId"], "全部", true)
@await Html.PartialAsync("_DateRange") \ No newline at end of file diff --git a/Stardust.Web/Areas/Registry/Controllers/AppConsumeController.cs b/Stardust.Web/Areas/Registry/Controllers/AppConsumeController.cs index c036d92e..f1a82cee 100644 --- a/Stardust.Web/Areas/Registry/Controllers/AppConsumeController.cs +++ b/Stardust.Web/Areas/Registry/Controllers/AppConsumeController.cs @@ -19,6 +19,7 @@ static AppConsumeController() var df = ListFields.GetField("ServiceName") as ListField; df.DisplayName = "{ServiceName}"; df.Url = "/Registry/Service?name={ServiceName}"; + df.Target = "_blank"; } { var df = ListFields.GetField("NodeName") as ListField; diff --git a/Stardust.Web/Areas/Registry/Controllers/AppServiceController.cs b/Stardust.Web/Areas/Registry/Controllers/AppServiceController.cs index 042cadfa..38e48908 100644 --- a/Stardust.Web/Areas/Registry/Controllers/AppServiceController.cs +++ b/Stardust.Web/Areas/Registry/Controllers/AppServiceController.cs @@ -19,6 +19,7 @@ static AppServiceController() var df = ListFields.GetField("ServiceName") as ListField; df.DisplayName = "{ServiceName}"; df.Url = "/Registry/Service?name={ServiceName}"; + df.Target = "_blank"; } { var df = ListFields.GetField("NodeName") as ListField; diff --git a/Stardust.Web/Views/Shared/_App_Nav.cshtml b/Stardust.Web/Views/Shared/_App_Nav.cshtml index 3737686a..76afa864 100644 --- a/Stardust.Web/Views/Shared/_App_Nav.cshtml +++ b/Stardust.Web/Views/Shared/_App_Nav.cshtml @@ -70,8 +70,8 @@ dic["发布中心"] = $"/Deployment/AppDeploy?appId={appId}&deployId={deploy?.Id}"; if (deploy != null) { - dic["文件版本"] = $"/Deployment/AppDeployVersion?appId={appId}&deployId={deploy.Id}"; - dic["节点发布"] = $"/Deployment/AppDeployNode?enable=1&appId={appId}&deployId={deploy.Id}"; + dic["上传新版本"] = $"/Deployment/AppDeployVersion?appId={appId}&deployId={deploy.Id}"; + dic["部署节点"] = $"/Deployment/AppDeployNode?enable=1&appId={appId}&deployId={deploy.Id}"; } var monitor = AppTracer.FindByID(monitorId);