mirror of https://github.com/certd/certd
Merge remote-tracking branch 'origin/v2-dev' into v2-dev
commit
c67a9215e3
|
@ -682,4 +682,20 @@ export default {
|
|||
setAsDefault: "Set as Default",
|
||||
disabledLabel: "Disabled",
|
||||
confirmToggleStatus: "Are you sure to {action}?",
|
||||
template: {
|
||||
title: "Pipeline Template",
|
||||
edit: "Pipeline Template Edit",
|
||||
importCreate: "Pipeline Batch Create",
|
||||
// intro: "可根据模版批量创建流水线",
|
||||
intro: "Batch create pipeline based on template",
|
||||
createTemplate: "Create Template",
|
||||
useTemplate: "Use This Template",
|
||||
batchCreate: "Batch Create Pipeline",
|
||||
singleCreate: "Create Single Pipeline",
|
||||
importCreate: "Batch Import Create",
|
||||
templateName: "Template Name",
|
||||
enterTemplateName: "Please enter template name",
|
||||
copyPipelineConfig: "Copy this pipeline configuration as template source",
|
||||
pipeline: "Pipeline",
|
||||
},
|
||||
};
|
||||
|
|
|
@ -685,4 +685,20 @@ export default {
|
|||
setAsDefault: "设为默认",
|
||||
disabledLabel: "禁用",
|
||||
confirmToggleStatus: "确定要{action}吗?",
|
||||
|
||||
template: {
|
||||
title: "流水线模版",
|
||||
edit: "流水线模版编辑",
|
||||
importCreate: "流水线模版批量创建",
|
||||
intro: "可根据模版批量创建流水线",
|
||||
createTemplate: "创建模版",
|
||||
useTemplate: "使用此模板",
|
||||
batchCreate: "批量创建流水线",
|
||||
singleCreate: "创建单个流水线",
|
||||
importCreate: "批量导入创建",
|
||||
templateName: "模板名称",
|
||||
enterTemplateName: "请输入模板名称",
|
||||
copyPipelineConfig: "复制该流水线配置作为模板来源",
|
||||
pipeline: "流水线",
|
||||
},
|
||||
};
|
||||
|
|
|
@ -44,7 +44,7 @@ export const certdResources = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: "流水线模版",
|
||||
title: "certd.template.title",
|
||||
name: "PipelineTemplate",
|
||||
path: "/certd/pipeline/template",
|
||||
component: "/certd/pipeline/template/index.vue",
|
||||
|
@ -54,7 +54,7 @@ export const certdResources = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: "流水线模版编辑",
|
||||
title: "certd.template.edit",
|
||||
name: "PipelineTemplateEdit",
|
||||
path: "/certd/pipeline/template/edit",
|
||||
component: "/certd/pipeline/template/edit.vue",
|
||||
|
@ -63,7 +63,7 @@ export const certdResources = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: "流水线模版批量创建",
|
||||
title: "certd.template.importCreate",
|
||||
name: "PipelineTemplateImport",
|
||||
path: "/certd/pipeline/template/import",
|
||||
component: "/certd/pipeline/template/import/index.vue",
|
||||
|
|
|
@ -5,8 +5,10 @@ import { useModal } from "/@/use/use-modal";
|
|||
import createCrudOptionsPipeline from "../crud";
|
||||
import * as pipelineApi from "../api";
|
||||
import { useTemplate } from "/@/views/certd/pipeline/template/use";
|
||||
import { useI18n } from "/@/locales";
|
||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const api = templateApi;
|
||||
const { t } = useI18n();
|
||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||
return await api.GetList(query);
|
||||
};
|
||||
|
@ -65,7 +67,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
show: true,
|
||||
buttons: {
|
||||
add: {
|
||||
text: "创建模版",
|
||||
text: t("certd.template.createTemplate"),
|
||||
type: "primary",
|
||||
show: true,
|
||||
},
|
||||
|
@ -119,13 +121,13 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
title: {
|
||||
title: "模版名称",
|
||||
title: t("certd.template.templateName"),
|
||||
type: "text",
|
||||
search: {
|
||||
show: true,
|
||||
},
|
||||
form: {
|
||||
rules: [{ required: true, message: "请输入模版名称" }],
|
||||
rules: [{ required: true, message: t("certd.template.enterTemplateName") }],
|
||||
},
|
||||
column: {
|
||||
width: 400,
|
||||
|
@ -141,7 +143,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
pipelineId: {
|
||||
title: "流水线ID",
|
||||
title: t("certd.template.pipeline"),
|
||||
type: "table-select",
|
||||
search: { show: true },
|
||||
dict: dict({
|
||||
|
@ -160,7 +162,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
form: {
|
||||
show: true,
|
||||
helper: "复制该流水线配置作为模版来源",
|
||||
helper: t("certd.template.copyPipelineConfig"),
|
||||
component: {
|
||||
valuesFormat: {
|
||||
labelFormatter: (item: any) => {
|
||||
|
@ -191,7 +193,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
useCreate: {
|
||||
title: "使用此模版",
|
||||
title: t("certd.template.useTemplate"),
|
||||
form: { show: false },
|
||||
column: {
|
||||
conditionalRender: false,
|
||||
|
@ -208,14 +210,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
return (
|
||||
<a class={"flex items-center"} onClick={create}>
|
||||
<fs-icon icon={"ion:duplicate-outline"}></fs-icon>
|
||||
<span class={"ml-5"}>创建单个流水线</span>
|
||||
<span class={"ml-5"}>{t("certd.template.singleCreate")}</span>
|
||||
</a>
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
useImport: {
|
||||
title: "使用此模版",
|
||||
title: t("certd.template.useTemplate"),
|
||||
form: { show: false },
|
||||
column: {
|
||||
conditionalRender: false,
|
||||
|
@ -224,7 +226,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
return (
|
||||
<router-link class={"flex items-center"} to={{ path: "/certd/pipeline/template/import", query: { templateId: row.id } }}>
|
||||
<fs-icon icon={"ion:duplicate"}></fs-icon>
|
||||
<span class={"ml-5"}>批量创建流水线</span>
|
||||
<span class={"ml-5"}>{t("certd.template.batchCreate")}</span>
|
||||
</router-link>
|
||||
);
|
||||
},
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<fs-page>
|
||||
<template #header>
|
||||
<div class="title flex items-center">
|
||||
流水线模版
|
||||
{{ t("certd.template.title") }}
|
||||
<span class="ml-10 sub flex items-center">
|
||||
<span>可根据模版批量创建流水线 </span>
|
||||
<span>{{ t("certd.template.intro") }} </span>
|
||||
<vip-button class="ml-10" mode="button" />
|
||||
</span>
|
||||
</div>
|
||||
|
@ -17,12 +17,12 @@
|
|||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
|
||||
import { useI18n } from "vue-i18n";
|
||||
defineOptions({
|
||||
name: "PipelineTemplate",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
|
||||
const { t } = useI18n();
|
||||
// 页面打开后获取列表数据
|
||||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
|
|
|
@ -217,7 +217,6 @@ export default defineComponent({
|
|||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "../../../style/theme/index.less";
|
||||
|
||||
.login-page.main {
|
||||
//margin: 20px !important;
|
||||
|
@ -229,7 +228,6 @@ export default defineComponent({
|
|||
//}
|
||||
|
||||
.login-title {
|
||||
color: @primary-color;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin: 20px;
|
||||
|
@ -274,7 +272,6 @@ export default defineComponent({
|
|||
transition: color 0.3s;
|
||||
|
||||
&:hover {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,6 @@ export default defineComponent({
|
|||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "../../../style/theme/index.less";
|
||||
.user-layout-register {
|
||||
label {
|
||||
font-size: 14px;
|
||||
|
@ -294,7 +293,6 @@ export default defineComponent({
|
|||
transition: color 0.3s;
|
||||
|
||||
&:hover {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue