chore: redefine the actuator page as the overview page (#5509)

#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

#### What this PR does / why we need it:

将原来的 Actuator 页面改为 Overview。

#### Which issue(s) this PR fixes:

Fixes #5508 

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/5516/head
Ryan Wang 2024-03-15 23:30:11 +08:00 committed by GitHub
parent 0843747abc
commit 5cf4eae583
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 44 additions and 44 deletions

View File

@ -209,7 +209,7 @@ onMounted(() => {
class="mt-auto p-4 text-center text-sm" class="mt-auto p-4 text-center text-sm"
> >
<span class="text-gray-600">Powered by </span> <span class="text-gray-600">Powered by </span>
<RouterLink to="/actuator" class="hover:text-gray-600"> <RouterLink to="/overview" class="hover:text-gray-600">
Halo Halo
</RouterLink> </RouterLink>
</footer> </footer>

View File

@ -110,25 +110,25 @@ interface CopyItem {
const handleCopy = () => { const handleCopy = () => {
if (!isSupported.value) { if (!isSupported.value) {
Toast.warning(t("core.actuator.actions.copy.toast_browser_not_supported")); Toast.warning(t("core.overview.actions.copy.toast_browser_not_supported"));
return; return;
} }
const copyItems: CopyItem[] = [ const copyItems: CopyItem[] = [
{ {
label: t("core.actuator.fields.external_url"), label: t("core.overview.fields.external_url"),
value: globalInfo.value?.externalUrl || "", value: globalInfo.value?.externalUrl || "",
}, },
{ {
label: t("core.actuator.fields.start_time"), label: t("core.overview.fields.start_time"),
value: formatDatetime(startup.value?.timeline.startTime) || "", value: formatDatetime(startup.value?.timeline.startTime) || "",
}, },
{ {
label: t("core.actuator.fields.version"), label: t("core.overview.fields.version"),
value: info.value?.build?.version || "", value: info.value?.build?.version || "",
}, },
{ {
label: t("core.actuator.fields.build_time"), label: t("core.overview.fields.build_time"),
value: formatDatetime(info.value?.build?.time) || "", value: formatDatetime(info.value?.build?.time) || "",
}, },
{ {
@ -144,28 +144,28 @@ const handleCopy = () => {
.trim() || "", .trim() || "",
}, },
{ {
label: t("core.actuator.fields.database"), label: t("core.overview.fields.database"),
value: value:
[info.value?.database.name, info.value?.database.version] [info.value?.database.name, info.value?.database.version]
.filter(Boolean) .filter(Boolean)
.join(" / ") || "", .join(" / ") || "",
}, },
{ {
label: t("core.actuator.fields.os"), label: t("core.overview.fields.os"),
value: value:
[info.value?.os.name, info.value?.os.version] [info.value?.os.name, info.value?.os.version]
.filter(Boolean) .filter(Boolean)
.join(" / ") || "", .join(" / ") || "",
}, },
{ {
label: t("core.actuator.fields.activated_theme"), label: t("core.overview.fields.activated_theme"),
value: themeStore.activatedTheme?.spec.displayName || "", value: themeStore.activatedTheme?.spec.displayName || "",
href: href:
themeStore.activatedTheme?.spec.repo || themeStore.activatedTheme?.spec.repo ||
themeStore.activatedTheme?.spec.homepage, themeStore.activatedTheme?.spec.homepage,
}, },
{ {
label: t("core.actuator.fields.enabled_plugins"), label: t("core.overview.fields.enabled_plugins"),
children: plugins.value?.map((plugin) => ({ children: plugins.value?.map((plugin) => ({
value: plugin.spec.displayName, value: plugin.spec.displayName,
href: plugin.spec.repo || plugin.spec.homepage, href: plugin.spec.repo || plugin.spec.homepage,
@ -223,7 +223,7 @@ const handleDownloadLogfile = () => {
</script> </script>
<template> <template>
<VPageHeader :title="$t('core.actuator.title')"> <VPageHeader :title="$t('core.overview.title')">
<template #icon> <template #icon>
<IconTerminalBoxLine class="mr-2 self-center" /> <IconTerminalBoxLine class="mr-2 self-center" />
</template> </template>
@ -245,18 +245,18 @@ const handleDownloadLogfile = () => {
> >
<div> <div>
<h3 class="text-lg font-medium leading-6 text-gray-900"> <h3 class="text-lg font-medium leading-6 text-gray-900">
{{ $t("core.actuator.header.titles.general") }} {{ $t("core.overview.header.titles.general") }}
</h3> </h3>
</div> </div>
</div> </div>
<div class="border-t border-gray-200"> <div class="border-t border-gray-200">
<VDescription> <VDescription>
<VDescriptionItem :label="$t('core.actuator.fields.external_url')"> <VDescriptionItem :label="$t('core.overview.fields.external_url')">
<span v-if="globalInfo?.externalUrl"> <span v-if="globalInfo?.externalUrl">
{{ globalInfo?.externalUrl }} {{ globalInfo?.externalUrl }}
</span> </span>
<span v-else> <span v-else>
{{ $t("core.actuator.fields_values.external_url.not_setup") }} {{ $t("core.overview.fields_values.external_url.not_setup") }}
</span> </span>
<VAlert <VAlert
v-if="!isExternalUrlValid" v-if="!isExternalUrlValid"
@ -266,18 +266,18 @@ const handleDownloadLogfile = () => {
:closable="false" :closable="false"
> >
<template #description> <template #description>
{{ $t("core.actuator.alert.external_url_invalid") }} {{ $t("core.overview.alert.external_url_invalid") }}
</template> </template>
</VAlert> </VAlert>
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem <VDescriptionItem
v-if="startup?.timeline.startTime" v-if="startup?.timeline.startTime"
:label="$t('core.actuator.fields.start_time')" :label="$t('core.overview.fields.start_time')"
:content="formatDatetime(startup?.timeline.startTime)" :content="formatDatetime(startup?.timeline.startTime)"
/> />
<VDescriptionItem <VDescriptionItem
v-if="themeStore.activatedTheme" v-if="themeStore.activatedTheme"
:label="$t('core.actuator.fields.activated_theme')" :label="$t('core.overview.fields.activated_theme')"
> >
<VTag @click="$router.push({ name: 'ThemeDetail' })"> <VTag @click="$router.push({ name: 'ThemeDetail' })">
<template v-if="themeStore.activatedTheme.spec.logo" #leftIcon> <template v-if="themeStore.activatedTheme.spec.logo" #leftIcon>
@ -292,7 +292,7 @@ const handleDownloadLogfile = () => {
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem <VDescriptionItem
v-permission="['system:plugins:view']" v-permission="['system:plugins:view']"
:label="$t('core.actuator.fields.enabled_plugins')" :label="$t('core.overview.fields.enabled_plugins')"
> >
<VLoading v-if="isPluginsLoading" /> <VLoading v-if="isPluginsLoading" />
<span v-else-if="!plugins?.length"> <span v-else-if="!plugins?.length">
@ -331,7 +331,7 @@ const handleDownloadLogfile = () => {
> >
<div> <div>
<h3 class="text-lg font-medium leading-6 text-gray-900"> <h3 class="text-lg font-medium leading-6 text-gray-900">
{{ $t("core.actuator.header.titles.environment") }} {{ $t("core.overview.header.titles.environment") }}
</h3> </h3>
</div> </div>
</div> </div>
@ -339,7 +339,7 @@ const handleDownloadLogfile = () => {
<VDescription> <VDescription>
<VDescriptionItem <VDescriptionItem
v-if="info.build" v-if="info.build"
:label="$t('core.actuator.fields.version')" :label="$t('core.overview.fields.version')"
> >
<a <a
:href="`https://github.com/halo-dev/halo/releases/tag/v${info.build.version}`" :href="`https://github.com/halo-dev/halo/releases/tag/v${info.build.version}`"
@ -351,7 +351,7 @@ const handleDownloadLogfile = () => {
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem <VDescriptionItem
v-if="info.build" v-if="info.build"
:label="$t('core.actuator.fields.build_time')" :label="$t('core.overview.fields.build_time')"
:content="formatDatetime(info.build.time)" :content="formatDatetime(info.build.time)"
/> />
<VDescriptionItem v-if="info.git" label="Git Commit"> <VDescriptionItem v-if="info.git" label="Git Commit">
@ -369,7 +369,7 @@ const handleDownloadLogfile = () => {
[info.java.runtime.name, info.java.runtime.version].join(' / ') [info.java.runtime.name, info.java.runtime.version].join(' / ')
" "
/> />
<VDescriptionItem :label="$t('core.actuator.fields.database')"> <VDescriptionItem :label="$t('core.overview.fields.database')">
<span> <span>
{{ [info.database.name, info.database.version].join(" / ") }} {{ [info.database.name, info.database.version].join(" / ") }}
</span> </span>
@ -381,23 +381,23 @@ const handleDownloadLogfile = () => {
:closable="false" :closable="false"
> >
<template #description> <template #description>
{{ $t("core.actuator.alert.h2_warning") }} {{ $t("core.overview.alert.h2_warning") }}
</template> </template>
</VAlert> </VAlert>
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem :label="$t('core.actuator.fields.os')"> <VDescriptionItem :label="$t('core.overview.fields.os')">
{{ info.os.name }} {{ info.os.version }} / {{ info.os.arch }} {{ info.os.name }} {{ info.os.version }} / {{ info.os.arch }}
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem <VDescriptionItem
:label="$t('core.actuator.fields.timezone')" :label="$t('core.overview.fields.timezone')"
:content="globalInfo?.timeZone" :content="globalInfo?.timeZone"
/> />
<VDescriptionItem <VDescriptionItem
:label="$t('core.actuator.fields.locale')" :label="$t('core.overview.fields.locale')"
:content="globalInfo?.locale" :content="globalInfo?.locale"
/> />
<VDescriptionItem <VDescriptionItem
:label="$t('core.actuator.fields.log')" :label="$t('core.overview.fields.log')"
vertical-center vertical-center
> >
<VButton size="sm" @click="handleDownloadLogfile()"> <VButton size="sm" @click="handleDownloadLogfile()">

View File

@ -1,22 +1,22 @@
import { definePlugin } from "@halo-dev/console-shared"; import { definePlugin } from "@halo-dev/console-shared";
import { IconTerminalBoxLine } from "@halo-dev/components"; import { IconTerminalBoxLine } from "@halo-dev/components";
import BasicLayout from "@console/layouts/BasicLayout.vue"; import BasicLayout from "@console/layouts/BasicLayout.vue";
import Actuator from "./Actuator.vue"; import Overview from "./Overview.vue";
import { markRaw } from "vue"; import { markRaw } from "vue";
export default definePlugin({ export default definePlugin({
components: {}, components: {},
routes: [ routes: [
{ {
path: "/actuator", path: "/overview",
name: "OverviewRoot", // fixme: actuator will be renamed to overview in the future name: "OverviewRoot",
component: BasicLayout, component: BasicLayout,
meta: { meta: {
title: "core.actuator.title", title: "core.overview.title",
searchable: true, searchable: true,
permissions: ["system:actuator:manage"], permissions: ["system:actuator:manage"],
menu: { menu: {
name: "core.sidebar.menu.items.actuator", name: "core.sidebar.menu.items.overview",
group: "system", group: "system",
icon: markRaw(IconTerminalBoxLine), icon: markRaw(IconTerminalBoxLine),
priority: 3, priority: 3,
@ -25,8 +25,8 @@ export default definePlugin({
children: [ children: [
{ {
path: "", path: "",
name: "Actuator", name: "Overview",
component: Actuator, component: Overview,
}, },
], ],
}, },

View File

@ -86,7 +86,7 @@ core:
plugins: Plugins plugins: Plugins
users: Users users: Users
settings: Settings settings: Settings
actuator: Actuator overview: Overview
backup: Backup backup: Backup
tools: Tools tools: Tools
operations: operations:
@ -1171,8 +1171,8 @@ core:
title: Delete title: Delete
setting: setting:
title: Settings title: Settings
actuator: overview:
title: Actuator title: Overview
actions: actions:
copy: copy:
toast_browser_not_supported: The current browser does not support copying toast_browser_not_supported: The current browser does not support copying

View File

@ -69,7 +69,7 @@ core:
plugins: Complementos plugins: Complementos
users: Usuarios users: Usuarios
settings: Configuraciones settings: Configuraciones
actuator: Actuador overview: Visión general
backup: Respaldo backup: Respaldo
operations: operations:
logout: logout:
@ -953,8 +953,8 @@ core:
authentication_url: URL de inicio de sesión authentication_url: URL de inicio de sesión
setting: setting:
title: Configuraciones title: Configuraciones
actuator: overview:
title: Actuador title: Visión general
actions: actions:
copy: copy:
toast_browser_not_supported: El navegador actual no admite la función de copiado toast_browser_not_supported: El navegador actual no admite la función de copiado

View File

@ -84,7 +84,7 @@ core:
plugins: 插件 plugins: 插件
users: 用户 users: 用户
settings: 设置 settings: 设置
actuator: 概览 overview: 概览
backup: 备份 backup: 备份
tools: 工具 tools: 工具
operations: operations:
@ -1113,7 +1113,7 @@ core:
description: 确定要删除该消息吗? description: 确定要删除该消息吗?
setting: setting:
title: 设置 title: 设置
actuator: overview:
title: 系统概览 title: 系统概览
actions: actions:
copy: copy:

View File

@ -84,7 +84,7 @@ core:
plugins: 插件 plugins: 插件
users: 用戶 users: 用戶
settings: 設置 settings: 設置
actuator: 概覽 overview: 概覽
backup: 備份 backup: 備份
tools: 工具 tools: 工具
operations: operations:
@ -1101,7 +1101,7 @@ core:
title: 刪除訊息 title: 刪除訊息
setting: setting:
title: 設置 title: 設置
actuator: overview:
title: 系統概覽 title: 系統概覽
actions: actions:
copy: copy: