Translate other parts

pull/436/head
Lorenzo 2025-06-25 21:01:34 +02:00
parent 3ab99647aa
commit cdac12bb2f
11 changed files with 899 additions and 652 deletions

View File

@ -20,14 +20,18 @@
</div>
<div class="flex-center actions">
<fs-button class="m-10" icon="ion:arrow-back-outline" @click="prev()"></fs-button>
<fs-button class="m-10" type="primary" icon-right="ion:arrow-forward-outline" @click="next()"></fs-button>
<fs-button class="m-10" icon="ion:arrow-back-outline" @click="prev()">{{ t('guide.buttons.prev') }}</fs-button>
<fs-button class="m-10" type="primary" icon-right="ion:arrow-forward-outline" @click="next()">{{ t('guide.buttons.next') }}</fs-button>
</div>
</div>
</template>
<script setup lang="tsx">
import { FsRender } from "@fast-crud/fast-crud";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
import SimpleSteps from "./simple-steps.vue";
type Step = {
title: string;
@ -46,129 +50,150 @@ import { computed, nextTick, ref } from "vue";
const steps = ref<Step[]>([
{
title: "创建证书申请流水线",
description: "演示证书申请任务如何配置",
title: t("guide.createCertPipeline.title"),
description: t("guide.createCertPipeline.description"),
items: [
{
title: "教程演示内容",
descriptions: ["本教程演示如何自动申请证书并部署到Nginx上", "仅需3步全自动申请部署证书"],
title: t("guide.createCertPipeline.items.tutorialTitle"),
descriptions: [
t("guide.createCertPipeline.items.tutorialDesc1"),
t("guide.createCertPipeline.items.tutorialDesc2"),
],
body: () => {
return <SimpleSteps></SimpleSteps>;
},
},
{
image: "/static/doc/images/1-add.png",
title: "创建证书流水线",
descriptions: ["点击添加证书流水线,填写证书申请信息"],
title: t("guide.createCertPipeline.items.createTitle"),
descriptions: [t("guide.createCertPipeline.items.createDesc")],
},
{
image: "/static/doc/images/3-add-success.png",
title: "流水线创建成功",
descriptions: ["点击手动触发即可申请证书"],
title: t("guide.createCertPipeline.items.successTitle"),
descriptions: [t("guide.createCertPipeline.items.successDesc")],
},
{
title: "接下来演示如何自动部署证书",
descriptions: ["如果您只需要申请证书,那么到这一步就可以了"],
title: t("guide.createCertPipeline.items.nextTitle"),
descriptions: [t("guide.createCertPipeline.items.nextDesc")],
},
],
},
{
title: "添加部署证书任务",
description: "这里演示部署证书到Nginx",
title: t("guide.addDeployTask.title"),
description: t("guide.addDeployTask.description"),
items: [
{
image: "/static/doc/images/5-1-add-host.png",
title: "添加证书部署任务",
descriptions: ["这里演示自动部署证书到nginx", "本系统提供海量部署插件,满足您的各种部署需求"],
title: t("guide.addDeployTask.items.addTaskTitle"),
descriptions: [
t("guide.addDeployTask.items.addTaskDesc1"),
t("guide.addDeployTask.items.addTaskDesc2"),
],
},
{
image: "/static/doc/images/5-2-add-host.png",
title: "填写任务参数",
descriptions: ["填写主机上证书文件的路径", "选择主机ssh登录授权"],
title: t("guide.addDeployTask.items.fillParamsTitle"),
descriptions: [
t("guide.addDeployTask.items.fillParamsDesc1"),
t("guide.addDeployTask.items.fillParamsDesc2"),
],
},
{
image: "/static/doc/images/5-3-add-host.png",
title: "让新证书生效",
descriptions: ["执行重启脚本", "让证书生效"],
title: t("guide.addDeployTask.items.activateCertTitle"),
descriptions: [
t("guide.addDeployTask.items.activateCertDesc1"),
t("guide.addDeployTask.items.activateCertDesc2"),
],
},
{
image: "/static/doc/images/5-4-add-host.png",
title: "部署任务添加成功",
descriptions: ["现在可以运行"],
title: t("guide.addDeployTask.items.taskSuccessTitle"),
descriptions: [t("guide.addDeployTask.items.taskSuccessDesc")],
},
{
image: "/static/doc/images/5-5-plugin-list.png",
title: "本系统提供茫茫多的部署插件",
descriptions: ["您可以根据自身需求将证书部署到各种应用和平台"],
title: t("guide.addDeployTask.items.pluginsTitle"),
descriptions: [t("guide.addDeployTask.items.pluginsDesc")],
},
],
},
{
title: "运行与测试",
description: "演示流水线运行,查看日志,成功后跳过等",
title: t('guide.runAndTestTask.runAndTestTitle'),
description: t('guide.runAndTestTask.runAndTestDescription'),
items: [
{
image: "/static/doc/images/9-start.png",
title: "运行测试一下",
descriptions: ["点击手动触发按钮,即可测试运行"],
title: t('guide.runAndTestTask.runTestOnce'),
descriptions: [t('guide.runAndTestTask.clickManualTriggerToTest')],
},
{
image: "/static/doc/images/10-1-log.png",
title: "查看日志",
descriptions: ["点击任务可以查看状态和日志"],
title: t('guide.runAndTestTask.viewLogs'),
descriptions: [t('guide.runAndTestTask.clickTaskToViewStatusAndLogs')],
},
{
image: "/static/doc/images/11-1-error.png",
title: "执行失败如何排查",
descriptions: ["查看错误日志"],
title: t('guide.runAndTestTask.howToTroubleshootFailure'),
descriptions: [t('guide.runAndTestTask.viewErrorLogs')],
},
{
image: "/static/doc/images/11-2-error.png",
title: "执行失败如何排查",
descriptions: ["查看错误日志", "这里报的是nginx容器不存在修改命令改成正确的nginx容器名称即可"],
title: t('guide.runAndTestTask.howToTroubleshootFailure'),
descriptions: [
t('guide.runAndTestTask.viewErrorLogs'),
t('guide.runAndTestTask.nginxContainerNotExistFix'),
],
},
{
image: "/static/doc/images/12-1-log-success.png",
title: "执行成功",
descriptions: ["修改正确后,重新点击手动触发,重新运行一次,执行成功"],
title: t('guide.runAndTestTask.executionSuccess'),
descriptions: [t('guide.runAndTestTask.retryAfterFix')],
},
{
image: "/static/doc/images/12-2-skip-log.png",
title: "成功后自动跳过",
descriptions: ["可以看到成功过的将会自动跳过,不会重复执行,只有当参数变更或者证书更新了,才会重新运行"],
title: t('guide.runAndTestTask.autoSkipAfterSuccess'),
descriptions: [t('guide.runAndTestTask.successSkipExplanation')],
},
{
image: "/static/doc/images/13-1-result.png",
title: "查看证书部署成功",
descriptions: ["访问nginx上的网站可以看到证书已经部署成功"],
title: t('guide.runAndTestTask.viewCertDeploymentSuccess'),
descriptions: [t('guide.runAndTestTask.visitNginxToSeeCert')],
},
{
image: "/static/doc/images/13-3-download.png",
title: "还可以下载证书,手动部署",
descriptions: ["如果还没有好用的部署插件,没办法自动部署,你还可以下载证书,手动部署"],
title: t('guide.runAndTestTask.downloadCertManualDeploy'),
descriptions: [t('guide.runAndTestTask.downloadIfNoAutoDeployPlugin')],
},
],
},
{
title: "设置定时执行和邮件通知",
description: "自动运行",
title: t('guide.scheduleAndEmailTask.title'),
description: t('guide.scheduleAndEmailTask.description'),
items: [
{
image: "/static/doc/images/14-timer.png",
title: "设置定时执行",
descriptions: ["流水线测试成功,接下来配置定时触发,以后每天定时执行就不用管了", "推荐配置每天运行一次在到期前35天才会重新申请新证书并部署没到期前会自动跳过不会重复申请。"],
title: t('guide.scheduleAndEmailTask.setSchedule'),
descriptions: [
t('guide.scheduleAndEmailTask.pipelineSuccessThenSchedule'),
t('guide.scheduleAndEmailTask.recommendDailyRun'),
],
},
{
image: "/static/doc/images/15-1-email.png",
title: "设置邮件通知",
descriptions: ["建议选择监听'错误时'和'错误转成功'两种即可,在意外失败时可以尽快去排查问题,(基础版需要配置邮件服务器)"],
},
{
title: "教程结束",
descriptions: ["感谢观看,希望对你有所帮助"],
},
title: t('guide.scheduleAndEmailTask.setEmailNotification'),
descriptions: [
t('guide.scheduleAndEmailTask.suggestErrorAndRecoveryEmails'),
t('guide.scheduleAndEmailTask.basicVersionNeedsMailServer'),
],
},
{
title: t('guide.scheduleAndEmailTask.tutorialEndTitle'),
descriptions: [t('guide.scheduleAndEmailTask.thanksForWatching')],
},
],
}
]);
const current = ref(0);

View File

@ -150,4 +150,39 @@ export default {
manual: "Manual Execution",
timer: "Scheduled Execution",
},
sysResources: {
sysRoot: "System Management",
sysConsole: "Console",
sysSettings: "System Settings",
cnameSetting: "CNAME Service Settings",
emailSetting: "Email Server Settings",
siteSetting: "Site Personalization",
headerMenus: "Top Menu Settings",
sysAccess: "System-level Authorization",
sysPlugin: "Plugin Management",
sysPluginEdit: "Edit Plugin",
sysPluginConfig: "Certificate Plugin Configuration",
accountBind: "Account Binding",
permissionManager: "Permission Management",
roleManager: "Role Management",
userManager: "User Management",
suiteManager: "Suite Management",
suiteSetting: "Suite Settings",
orderManager: "Order Management",
userSuites: "User Suites",
},
certificateRepo: {
title: "Certificate Repository",
sub: "Certificates generated from pipeline"
},
certificateNotGenerated: "Certificate not yet generated, please run the pipeline first",
viewCertificateTitle: "View Certificate",
close: "Close",
viewCert: {
title: "View Certificate"
},
download: {
title: "Download Certificate"
},
};

View File

@ -0,0 +1,71 @@
export default {
createCertPipeline: {
title: "Create Certificate Application Pipeline",
description: "Demonstrate how to configure a certificate application task",
items: {
tutorialTitle: "Tutorial Demo Content",
tutorialDesc1: "This tutorial demonstrates how to automatically apply for a certificate and deploy it to Nginx",
tutorialDesc2: "Only 3 steps, fully automatic application and deployment",
createTitle: "Create Certificate Pipeline",
createDesc: "Click to add a certificate pipeline and fill in the certificate application information",
successTitle: "Pipeline Created Successfully",
successDesc: "Click manual trigger to apply for the certificate",
nextTitle: "Next, demonstrate how to automatically deploy the certificate",
nextDesc: "If you only need to apply for a certificate, you can stop here",
},
},
buttons: {
prev: "Previous Step",
next: "Next Step",
},
addDeployTask: {
title: "Add Deployment Certificate Task",
description: "Demonstrate deployment of certificate to Nginx",
items: {
addTaskTitle: "Add Certificate Deployment Task",
addTaskDesc1: "Demonstrate automatic deployment of certificate to nginx",
addTaskDesc2: "Our system provides numerous deployment plugins to meet your needs",
fillParamsTitle: "Fill Task Parameters",
fillParamsDesc1: "Fill in the certificate file path on the host",
fillParamsDesc2: "Select SSH login authorization for the host",
activateCertTitle: "Make New Certificate Effective",
activateCertDesc1: "Execute restart script",
activateCertDesc2: "Make the certificate effective",
taskSuccessTitle: "Deployment Task Added Successfully",
taskSuccessDesc: "Now you can run it",
pluginsTitle: "Our System Provides Numerous Deployment Plugins",
pluginsDesc: "You can deploy certificates to various applications and platforms according to your needs",
},
},
runAndTestTask: {
runAndTestTitle: "Run and Test",
runAndTestDescription: "Demonstrate pipeline running, view logs, skip on success, etc.",
runTestOnce: "Run a Test",
clickManualTriggerToTest: "Click the manual trigger button to test the run",
viewLogs: "View Logs",
clickTaskToViewStatusAndLogs: "Click the task to view status and logs",
howToTroubleshootFailure: "How to Troubleshoot Failure",
viewErrorLogs: "View error logs",
nginxContainerNotExistFix: "Shows nginx container not found error, fix by changing to correct nginx container name",
executionSuccess: "Execution Success",
retryAfterFix: "After fixing, click manual trigger again to rerun successfully",
autoSkipAfterSuccess: "Auto Skip After Success",
successSkipExplanation: "Successful runs will be skipped automatically, rerun only if parameters or certificates update",
viewCertDeploymentSuccess: "View Certificate Deployment Success",
visitNginxToSeeCert: "Visit website on nginx to see certificate deployed successfully",
downloadCertManualDeploy: "Download Certificate for Manual Deployment",
downloadIfNoAutoDeployPlugin: "If no deployment plugin available, download certificate for manual deployment",
},
scheduleAndEmailTask: {
title: "Set Scheduled Execution and Email Notifications",
description: "Automatic running",
setSchedule: "Set Scheduled Execution",
pipelineSuccessThenSchedule: "Pipeline tests succeed, then configure scheduled triggers so it runs automatically daily",
recommendDailyRun: "Recommend configuring to run once daily; new certs requested 35 days before expiry and auto-skipped otherwise",
setEmailNotification: "Set Email Notifications",
suggestErrorAndRecoveryEmails: "Suggest listening for 'On Error' and 'Error to Success' to quickly troubleshoot failures (basic version requires mail server setup)",
basicVersionNeedsMailServer: "(basic version requires configuring mail server)",
tutorialEndTitle: "Tutorial End",
thanksForWatching: "Thank you for watching, hope it helps you",
}
}

View File

@ -4,6 +4,7 @@ import vip from './vip';
import tutorial from './tutorial';
import preferences from './preferences';
import ui from './ui';
import guide from './guide';
export default {
certd,
@ -11,5 +12,6 @@ export default {
vip,
ui,
tutorial,
preferences
preferences,
guide
};

View File

@ -37,7 +37,7 @@ export default {
title: "框架",
home: "首页",
},
certd: {
title: "证书自动化",
pipeline: "证书自动化流水线",
pipelineEdit: "编辑流水线",
@ -59,7 +59,7 @@ export default {
suiteBuy: "套餐购买",
myTrade: "我的订单",
paymentReturn: "支付返回",
},
user: {
greeting: "您好",
profile: "账号信息",
@ -156,4 +156,39 @@ export default {
manual: "手动执行",
timer: "定时执行",
},
sysResources: {
sysRoot: "系统管理",
sysConsole: "控制台",
sysSettings: "系统设置",
cnameSetting: "CNAME服务设置",
emailSetting: "邮件服务器设置",
siteSetting: "站点个性化",
headerMenus: "顶部菜单设置",
sysAccess: "系统级授权",
sysPlugin: "插件管理",
sysPluginEdit: "编辑插件",
sysPluginConfig: "证书插件配置",
accountBind: "账号绑定",
permissionManager: "权限管理",
roleManager: "角色管理",
userManager: "用户管理",
suiteManager: "套餐管理",
suiteSetting: "套餐设置",
orderManager: "订单管理",
userSuites: "用户套餐",
},
certificateRepo: {
title: "证书仓库",
sub: "从流水线生成的证书"
},
certificateNotGenerated: "证书还未生成,请先运行流水线",
viewCertificateTitle: "查看证书",
close: "关闭",
viewCert: {
title: "查看证书"
},
download: {
title: "下载证书"
},
};

View File

@ -0,0 +1,71 @@
export default {
createCertPipeline: {
title: "创建证书申请流水线",
description: "演示证书申请任务如何配置",
items: {
tutorialTitle: "教程演示内容",
tutorialDesc1: "本教程演示如何自动申请证书并部署到Nginx上",
tutorialDesc2: "仅需3步全自动申请部署证书",
createTitle: "创建证书流水线",
createDesc: "点击添加证书流水线,填写证书申请信息",
successTitle: "流水线创建成功",
successDesc: "点击手动触发即可申请证书",
nextTitle: "接下来演示如何自动部署证书",
nextDesc: "如果您只需要申请证书,那么到这一步就可以了",
},
},
buttons: {
prev: "上一步",
next: "下一步",
},
addDeployTask: {
title: "添加部署证书任务",
description: "这里演示部署证书到Nginx",
items: {
addTaskTitle: "添加证书部署任务",
addTaskDesc1: "这里演示自动部署证书到nginx",
addTaskDesc2: "本系统提供海量部署插件,满足您的各种部署需求",
fillParamsTitle: "填写任务参数",
fillParamsDesc1: "填写主机上证书文件的路径",
fillParamsDesc2: "选择主机ssh登录授权",
activateCertTitle: "让新证书生效",
activateCertDesc1: "执行重启脚本",
activateCertDesc2: "让证书生效",
taskSuccessTitle: "部署任务添加成功",
taskSuccessDesc: "现在可以运行",
pluginsTitle: "本系统提供茫茫多的部署插件",
pluginsDesc: "您可以根据自身需求将证书部署到各种应用和平台",
},
},
runAndTestTask: {
runAndTestTitle: "运行与测试",
runAndTestDescription: "演示流水线运行,查看日志,成功后跳过等",
runTestOnce: "运行测试一下",
clickManualTriggerToTest: "点击手动触发按钮,即可测试运行",
viewLogs: "查看日志",
clickTaskToViewStatusAndLogs: "点击任务可以查看状态和日志",
howToTroubleshootFailure: "执行失败如何排查",
viewErrorLogs: "查看错误日志",
nginxContainerNotExistFix: "这里报的是nginx容器不存在修改命令改成正确的nginx容器名称即可",
executionSuccess: "执行成功",
retryAfterFix: "修改正确后,重新点击手动触发,重新运行一次,执行成功",
autoSkipAfterSuccess: "成功后自动跳过",
successSkipExplanation: "可以看到成功过的将会自动跳过,不会重复执行,只有当参数变更或者证书更新了,才会重新运行",
viewCertDeploymentSuccess: "查看证书部署成功",
visitNginxToSeeCert: "访问nginx上的网站可以看到证书已经部署成功",
downloadCertManualDeploy: "还可以下载证书,手动部署",
downloadIfNoAutoDeployPlugin: "如果还没有好用的部署插件,没办法自动部署,你还可以下载证书,手动部署",
},
scheduleAndEmailTask: {
title: "设置定时执行和邮件通知",
description: "自动运行",
setSchedule: "设置定时执行",
pipelineSuccessThenSchedule: "流水线测试成功,接下来配置定时触发,以后每天定时执行就不用管了",
recommendDailyRun: "推荐配置每天运行一次在到期前35天才会重新申请新证书并部署没到期前会自动跳过不会重复申请。",
setEmailNotification: "设置邮件通知",
suggestErrorAndRecoveryEmails: "建议选择监听'错误时'和'错误转成功'两种即可,在意外失败时可以尽快去排查问题,(基础版需要配置邮件服务器)",
basicVersionNeedsMailServer: "(基础版需要配置邮件服务器)",
tutorialEndTitle: "教程结束",
thanksForWatching: "感谢观看,希望对你有所帮助",
}
}

View File

@ -4,6 +4,7 @@ import vip from './vip';
import tutorial from './tutorial';
import preferences from './preferences';
import ui from './ui';
import guide from './guide';
export default {
certd,
@ -11,5 +12,6 @@ export default {
vip,
ui,
tutorial,
preferences
preferences,
guide
};

View File

@ -1,7 +1,7 @@
import LayoutBasic from "/@/layout/layout-basic.vue";
import type { RouteRecordRaw } from "vue-router";
import i18n from '../../locales/i18n';
import i18n from '/@/locales/i18n';
import { mergeRouteModules } from "/@/vben/utils";
const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts*", {

View File

@ -1,10 +1,11 @@
import LayoutPass from "/@/layout/layout-pass.vue";
import { useSettingStore } from "/@/store/settings";
import aboutResource from "/@/router/source/modules/about";
import i18n from '/@/locales/i18n';
export const sysResources = [
{
title: "系统管理",
title: i18n.global.t('certd.sysResources.sysRoot'),
name: "SysRoot",
path: "/sys",
redirect: "/sys/settings",
@ -15,7 +16,7 @@ export const sysResources = [
},
children: [
{
title: "控制台",
title: i18n.global.t('certd.sysResources.sysConsole'),
name: "SysConsole",
path: "/sys/console",
component: "/sys/console/index.vue",
@ -30,7 +31,7 @@ export const sysResources = [
},
{
title: "系统设置",
title: i18n.global.t('certd.sysResources.sysSettings'),
name: "SysSettings",
path: "/sys/settings",
component: "/sys/settings/index.vue",
@ -40,7 +41,7 @@ export const sysResources = [
},
},
{
title: "CNAME服务设置",
title: i18n.global.t('certd.sysResources.cnameSetting'),
name: "CnameSetting",
path: "/sys/cname/provider",
component: "/sys/cname/provider/index.vue",
@ -51,7 +52,7 @@ export const sysResources = [
},
},
{
title: "邮件服务器设置",
title: i18n.global.t('certd.sysResources.emailSetting'),
name: "EmailSetting",
path: "/sys/settings/email",
component: "/sys/settings/email/index.vue",
@ -62,7 +63,7 @@ export const sysResources = [
},
},
{
title: "站点个性化",
title: i18n.global.t('certd.sysResources.siteSetting'),
name: "SiteSetting",
path: "/sys/site",
component: "/sys/site/index.vue",
@ -76,7 +77,7 @@ export const sysResources = [
},
},
{
title: "顶部菜单设置",
title: i18n.global.t('certd.sysResources.headerMenus'),
name: "HeaderMenus",
path: "/sys/settings/header-menus",
component: "/sys/settings/header-menus/index.vue",
@ -91,7 +92,7 @@ export const sysResources = [
},
},
{
title: "系统级授权",
title: i18n.global.t('certd.sysResources.sysAccess'),
name: "SysAccess",
path: "/sys/access",
component: "/sys/access/index.vue",
@ -106,7 +107,7 @@ export const sysResources = [
},
},
{
title: "插件管理",
title: i18n.global.t('certd.sysResources.sysPlugin'),
name: "SysPlugin",
path: "/sys/plugin",
component: "/sys/plugin/index.vue",
@ -117,7 +118,7 @@ export const sysResources = [
},
},
{
title: "编辑插件",
title: i18n.global.t('certd.sysResources.sysPluginEdit'),
name: "SysPluginEdit",
path: "/sys/plugin/edit",
component: "/sys/plugin/edit.vue",
@ -129,7 +130,7 @@ export const sysResources = [
},
},
{
title: "证书插件配置",
title: i18n.global.t('certd.sysResources.sysPluginConfig'),
name: "SysPluginConfig",
path: "/sys/plugin/config",
component: "/sys/plugin/config.vue",
@ -143,7 +144,7 @@ export const sysResources = [
},
},
{
title: "账号绑定",
title: i18n.global.t('certd.sysResources.accountBind'),
name: "AccountBind",
path: "/sys/account",
component: "/sys/account/index.vue",
@ -154,19 +155,18 @@ export const sysResources = [
},
},
{
title: "权限管理",
title: i18n.global.t('certd.sysResources.permissionManager'),
name: "PermissionManager",
path: "/sys/authority/permission",
component: "/sys/authority/permission/index.vue",
meta: {
icon: "ion:list-outline",
//需要校验权限
permission: "sys:auth:per:view",
keepAlive: true,
},
},
{
title: "角色管理",
title: i18n.global.t('certd.sysResources.roleManager'),
name: "RoleManager",
path: "/sys/authority/role",
component: "/sys/authority/role/index.vue",
@ -177,7 +177,7 @@ export const sysResources = [
},
},
{
title: "用户管理",
title: i18n.global.t('certd.sysResources.userManager'),
name: "UserManager",
path: "/sys/authority/user",
component: "/sys/authority/user/index.vue",
@ -189,7 +189,7 @@ export const sysResources = [
},
{
title: "套餐管理",
title: i18n.global.t('certd.sysResources.suiteManager'),
name: "SuiteManager",
path: "/sys/suite",
redirect: "/sys/suite/setting",
@ -204,7 +204,7 @@ export const sysResources = [
},
children: [
{
title: "套餐设置",
title: i18n.global.t('certd.sysResources.suiteSetting'),
name: "SuiteSetting",
path: "/sys/suite/setting",
component: "/sys/suite/setting/index.vue",
@ -218,7 +218,7 @@ export const sysResources = [
},
},
{
title: "订单管理",
title: i18n.global.t('certd.sysResources.orderManager'),
name: "OrderManager",
path: "/sys/suite/trade",
component: "/sys/suite/trade/index.vue",
@ -233,7 +233,7 @@ export const sysResources = [
},
},
{
title: "用户套餐",
title: i18n.global.t('certd.sysResources.userSuites'),
name: "UserSuites",
path: "/sys/suite/user-suite",
component: "/sys/suite/user-suite/index.vue",

View File

@ -1,5 +1,6 @@
// @ts-ignore
import { useI18n } from "vue-i18n";
//
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, useFormWrapper, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { certInfoApi } from "./api";
import dayjs from "dayjs";
@ -10,6 +11,7 @@ import CertView from "/@/views/certd/pipeline/cert-view.vue";
import { useCertUpload } from "/@/views/certd/pipeline/cert-upload/use";
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const { t } = useI18n();
const api = certInfoApi;
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
return await api.GetList(query);
@ -37,14 +39,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const viewCert = async (row: any) => {
const cert = await api.GetCert(row.id);
if (!cert) {
notification.error({ message: "证书还未生成,请先运行流水线" });
notification.error({ message: t("certd.certificateNotGenerated") });
return;
}
model.success({
title: "查看证书",
title: t("certd.modal.viewCertificateTitle"),
maskClosable: true,
okText: "关闭",
okText: t("certd.modal.close"),
width: 800,
content: () => {
return <CertView cert={cert}></CertView>;
@ -100,7 +102,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
view: { show: false },
viewCert: {
order: 3,
title: "查看证书",
title: t("certd.viewCert.title"),
type: "link",
icon: "ph:certificate",
async click({ row }) {
@ -115,17 +117,18 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
download: {
order: 9,
title: "下载证书",
title: t("certd.download.title"),
type: "link",
icon: "ant-design:download-outlined",
async click({ row }) {
if (!row.certFile) {
notification.error({ message: "证书还未生成,请先运行流水线" });
notification.error({ message: t("certd.certificateNotGenerated") });
return;
}
window.open("/api/monitor/cert/download?id=" + row.id);
},
},
},
},
columns: {

View File

@ -2,8 +2,8 @@
<fs-page>
<template #header>
<div class="title">
证书仓库
<span class="sub">从流水线生成的证书</span>
{{ t("certd.certificateRepo.title") }}
<span class="sub">{{ t("certd.certificateRepo.sub") }}</span>
</div>
</template>
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
@ -14,6 +14,9 @@
import { onActivated, onMounted } from "vue";
import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
defineOptions({
name: "CertStore",