mirror of
https://github.com/certd/certd.git
synced 2026-06-29 07:07:36 +08:00
chore: 完善第三方依赖动态加载
This commit is contained in:
@@ -40,4 +40,7 @@ export default {
|
||||
pluginManagement: "Plugin Management",
|
||||
pluginBetaWarning: "Custom plugins are in BETA and may have breaking changes in future",
|
||||
pleaseSelectRecord: "Please select records first",
|
||||
clearRuntimeDeps: "Clear Runtime Deps Cache",
|
||||
clearRuntimeDepsConfirm: "Are you sure to clear the runtime dependencies cache? Required dependencies will be reinstalled on the next pipeline execution.",
|
||||
clearRuntimeDepsSuccess: "Runtime dependencies cache cleared successfully",
|
||||
};
|
||||
|
||||
@@ -40,4 +40,7 @@ export default {
|
||||
pluginManagement: "插件管理",
|
||||
pluginBetaWarning: "自定义插件处于BETA测试版,后续可能会有破坏性变更",
|
||||
pleaseSelectRecord: "请先勾选记录",
|
||||
clearRuntimeDeps: "清理第三方依赖缓存",
|
||||
clearRuntimeDepsConfirm: "确定要清理第三方依赖缓存吗?清理后下次执行流水线时将重新安装所需依赖。",
|
||||
clearRuntimeDepsSuccess: "第三方依赖缓存清理成功",
|
||||
};
|
||||
|
||||
@@ -143,3 +143,10 @@ export async function GetPluginByName(name: string): Promise<PluginConfigBean> {
|
||||
data: { name },
|
||||
});
|
||||
}
|
||||
|
||||
export async function ClearRuntimeDeps(): Promise<void> {
|
||||
return await request({
|
||||
url: "/sys/settings/clearRuntimeDeps",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useI18n } from "/src/locales";
|
||||
import { Ref, ref, computed } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
//@ts-ignore
|
||||
import yaml from "js-yaml";
|
||||
import { usePluginImport } from "./use-import";
|
||||
@@ -83,6 +83,23 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
await openImportDialog({ crudExpose });
|
||||
},
|
||||
},
|
||||
clearRuntimeDeps: {
|
||||
show: true,
|
||||
icon: "ion:trash-outline",
|
||||
text: t("certd.clearRuntimeDeps"),
|
||||
type: "primary",
|
||||
danger: true,
|
||||
async click() {
|
||||
Modal.confirm({
|
||||
title: t("certd.confirm"),
|
||||
content: t("certd.clearRuntimeDepsConfirm"),
|
||||
async onOk() {
|
||||
await api.ClearRuntimeDeps();
|
||||
message.success(t("certd.clearRuntimeDepsSuccess"));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
table: {
|
||||
|
||||
Reference in New Issue
Block a user