mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
chore: pre publish
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<a-layout class="fs-framework">
|
||||
<a-layout-sider v-model:collapsed="asideCollapsed" :trigger="null" collapsible>
|
||||
<div class="header-logo">
|
||||
<img src="/images/logo/rect-black.svg" />
|
||||
<span v-if="!asideCollapsed" class="title">FsAdmin</span>
|
||||
<img src="/images/logo/logo.svg" />
|
||||
<span v-if="!asideCollapsed" class="title">Certd</span>
|
||||
</div>
|
||||
<div class="aside-menu">
|
||||
<fs-menu :scroll="true" :menus="asideMenus" :expand-selected="!asideCollapsed" />
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<div class="top flex flex-col items-center justify-center">
|
||||
<div class="header flex flex-row items-center">
|
||||
<img src="/images/logo/rect-black.svg" class="logo" alt="logo" />
|
||||
<span class="title">FsAdmin</span>
|
||||
<span class="title"></span>
|
||||
</div>
|
||||
<div class="desc">fast-crud,开发crud快如闪电</div>
|
||||
<div class="desc"></div>
|
||||
</div>
|
||||
|
||||
<router-view />
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 44px;
|
||||
height: 80px;
|
||||
vertical-align: top;
|
||||
margin-right: 16px;
|
||||
border-style: none;
|
||||
|
||||
@@ -1,27 +1,8 @@
|
||||
export const headerResource = [
|
||||
{
|
||||
title: "文档",
|
||||
path: "http://fast-crud.docmirror.cn/"
|
||||
path: "http://github.com/certd/certd"
|
||||
},
|
||||
{
|
||||
title: "其他Demo",
|
||||
name: "demo",
|
||||
children: [
|
||||
{
|
||||
title: "Element版",
|
||||
path: "http://fast-crud.docmirror.cn/element/"
|
||||
},
|
||||
{
|
||||
title: "VbenAdmin",
|
||||
path: "http://fast-crud.docmirror.cn/vben/"
|
||||
},
|
||||
{
|
||||
title: "cool-admin-vue",
|
||||
path: "http://fast-crud.docmirror.cn/cool/"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
title: "源码",
|
||||
name: "source",
|
||||
@@ -31,42 +12,18 @@ export const headerResource = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: "fast-crud",
|
||||
children: [
|
||||
{
|
||||
title: "github",
|
||||
path: "http://github.com/fast-crud/fast-crud",
|
||||
meta: {
|
||||
icon: "ion:logo-github"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "gitee",
|
||||
path: "http://gitee.com/fast-crud/fast-crud",
|
||||
meta: {
|
||||
icon: "ion:logo-octocat"
|
||||
}
|
||||
}
|
||||
]
|
||||
title: "github",
|
||||
path: "http://github.com/certd/certd",
|
||||
meta: {
|
||||
icon: "ion:logo-github"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "fs-admin",
|
||||
children: [
|
||||
{
|
||||
title: "github",
|
||||
path: "http://github.com/fast-crud/fs-admin-antdv",
|
||||
meta: {
|
||||
icon: "ion:logo-github"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "gitee",
|
||||
path: "http://gitee.com/fast-crud/fs-admin-antdv",
|
||||
meta: {
|
||||
icon: "ion:logo-octocat"
|
||||
}
|
||||
}
|
||||
]
|
||||
title: "gitee",
|
||||
path: "http://gitee.com/certd/certd",
|
||||
meta: {
|
||||
icon: "ion:logo-octocat"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import * as api from "./api";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ref, shallowRef } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, DialogOpenOption, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
|
||||
import { nanoid } from "nanoid";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
@@ -142,7 +143,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp
|
||||
},
|
||||
title: {
|
||||
title: "流水线名称",
|
||||
type: "text",
|
||||
type: "link",
|
||||
search: {
|
||||
show: true,
|
||||
component: {
|
||||
@@ -150,7 +151,15 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp
|
||||
}
|
||||
},
|
||||
column: {
|
||||
width: 300
|
||||
width: 300,
|
||||
component: {
|
||||
on: {
|
||||
// 注意:必须要on前缀
|
||||
onClick({ row }) {
|
||||
router.push({ path: "/certd/pipeline/detail", query: { id: row.id, editMode: "false" } });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
lastHistoryTime: {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<fs-page v-if="pipeline" class="page-pipeline-edit">
|
||||
<template #header>
|
||||
<div class="title">
|
||||
<fs-button icon="ion:left" @click="goBack" />
|
||||
<pi-editable v-model="pipeline.title" :hover-show="false" :disabled="!editMode"></pi-editable>
|
||||
</div>
|
||||
<div class="more">
|
||||
@@ -144,16 +145,16 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, provide, Ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import PiTaskForm from "./component/task-form/index.vue";
|
||||
import PiTriggerForm from "./component/trigger-form/index.vue";
|
||||
import PiTaskView from "./component/task-view/index.vue";
|
||||
import PiStatusShow from "./component/status-show.vue";
|
||||
import _ from "lodash";
|
||||
import _ from "lodash-es";
|
||||
import { message, Modal, notification } from "ant-design-vue";
|
||||
import { pluginManager } from "/@/views/certd/pipeline/pipeline/plugin";
|
||||
import { nanoid } from "nanoid";
|
||||
import { PipelineDetail, PipelineOptions, RunHistory, Runnable } from "/@/views/certd/pipeline/pipeline/type";
|
||||
import { statusUtil } from "./utils/util.status";
|
||||
import PiHistoryTimelineItem from "/@/views/certd/pipeline/pipeline/component/history-timeline-item.vue";
|
||||
export default defineComponent({
|
||||
name: "PipelineEdit",
|
||||
@@ -184,6 +185,11 @@ export default defineComponent({
|
||||
|
||||
const currentHistory: Ref<any> = ref({});
|
||||
|
||||
const router = useRouter();
|
||||
function goBack() {
|
||||
router.back();
|
||||
}
|
||||
|
||||
const loadCurrentHistoryDetail = async () => {
|
||||
console.log("load history logs");
|
||||
const detail: RunHistory = await props.options?.getHistoryDetail({ historyId: currentHistory.value.id });
|
||||
@@ -258,7 +264,7 @@ export default defineComponent({
|
||||
() => {
|
||||
return props.pipelineId;
|
||||
},
|
||||
async (value) => {
|
||||
async (value: any) => {
|
||||
if (!value) {
|
||||
return;
|
||||
}
|
||||
@@ -294,7 +300,7 @@ export default defineComponent({
|
||||
|
||||
function useTaskView() {
|
||||
const taskViewRef: Ref<any> = ref(null);
|
||||
const taskViewOpen = (task) => {
|
||||
const taskViewOpen = (task: any) => {
|
||||
taskViewRef.value.open(task);
|
||||
};
|
||||
return {
|
||||
@@ -305,10 +311,10 @@ export default defineComponent({
|
||||
|
||||
const taskView = useTaskView();
|
||||
|
||||
const taskAdd = (stage: any, stageIndex: number, onSuccess?) => {
|
||||
const taskAdd = (stage: any, stageIndex: number, onSuccess?: any) => {
|
||||
currentStageIndex.value = stageIndex;
|
||||
currentTaskIndex.value = stage.tasks.length;
|
||||
taskFormRef.value.taskAdd((type, value) => {
|
||||
taskFormRef.value.taskAdd((type: any, value: any) => {
|
||||
if (type === "save") {
|
||||
stage.tasks.push(value);
|
||||
if (onSuccess) {
|
||||
@@ -317,14 +323,14 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
};
|
||||
const taskEdit = (stage, stageIndex, task, taskIndex, onSuccess?) => {
|
||||
const taskEdit = (stage: any, stageIndex: number, task: any, taskIndex: number, onSuccess?: any) => {
|
||||
currentStageIndex.value = stageIndex;
|
||||
currentTaskIndex.value = taskIndex;
|
||||
if (taskFormRef.value == null) {
|
||||
return;
|
||||
}
|
||||
if (props.editMode) {
|
||||
taskFormRef.value.taskEdit(task, (type, value) => {
|
||||
taskFormRef.value.taskEdit(task, (type: string, value: any) => {
|
||||
if (type === "delete") {
|
||||
stage.tasks.splice(taskIndex, 1);
|
||||
if (stage.tasks.length === 0) {
|
||||
@@ -347,9 +353,9 @@ export default defineComponent({
|
||||
return { taskAdd, taskEdit, taskFormRef, ...taskView };
|
||||
}
|
||||
|
||||
function useStage(useTaskRet) {
|
||||
function useStage(useTaskRet: any) {
|
||||
const stageAdd = (stageIndex = pipeline.value.stages.length) => {
|
||||
const stage = {
|
||||
const stage: any = {
|
||||
id: nanoid(),
|
||||
title: "新阶段",
|
||||
tasks: [],
|
||||
@@ -371,18 +377,18 @@ export default defineComponent({
|
||||
function useTrigger() {
|
||||
const triggerFormRef: Ref<any> = ref(null);
|
||||
const triggerAdd = () => {
|
||||
triggerFormRef.value.triggerAdd((type, value) => {
|
||||
triggerFormRef.value.triggerAdd((type: string, value: any) => {
|
||||
if (type === "save") {
|
||||
pipeline.value.triggers.push(value);
|
||||
}
|
||||
});
|
||||
};
|
||||
const triggerEdit = (trigger, index) => {
|
||||
const triggerEdit = (trigger: any, index: number) => {
|
||||
if (triggerFormRef.value == null) {
|
||||
return;
|
||||
}
|
||||
if (props.editMode) {
|
||||
triggerFormRef.value.triggerEdit(trigger, (type, value) => {
|
||||
triggerFormRef.value.triggerEdit(trigger, (type: string, value: any) => {
|
||||
if (type === "delete") {
|
||||
pipeline.value.triggers.splice(index, 1);
|
||||
} else if (type === "save") {
|
||||
@@ -390,7 +396,7 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
} else {
|
||||
triggerFormRef.value.triggerView(trigger, (type, value) => {});
|
||||
triggerFormRef.value.triggerView(trigger, (type: string, value: any) => {});
|
||||
}
|
||||
};
|
||||
return {
|
||||
@@ -463,7 +469,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function useHistory() {
|
||||
const historyView = (history) => {
|
||||
const historyView = (history: any) => {
|
||||
changeCurrentHistory(history);
|
||||
console.log("currentPipeline", pipeline);
|
||||
};
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div class="d2-page-cover">
|
||||
<div class="d2-page-cover__title" @click="$open('https://github.com/certd/certd')">
|
||||
<div class="title-line">Certd v{{ version }}</div>
|
||||
</div>
|
||||
<p class="d2-page-cover__sub-title">让你的证书永不过期</p>
|
||||
<div class="content">
|
||||
<img src="./image/preview.png" class="preview_img" />
|
||||
</div>
|
||||
<div class="footer_box">
|
||||
<div class="left"></div>
|
||||
<div class="right">
|
||||
<div>如果觉得好用,请不要吝啬你的star哟!</div>
|
||||
<a href="https://gitee.com/certd/certd" target="_blank"><img src="https://gitee.com/certd/certd/badge/star.svg?theme=dark" alt="star" /></a>
|
||||
<a href="https://github.com/certd/certd" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/certd/certd?logo=github" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { defineComponent, ref } from "vue";
|
||||
export default defineComponent({
|
||||
name: "PageContent",
|
||||
setup() {
|
||||
const version = ref(import.meta.env.VITE_APP_VERSION);
|
||||
|
||||
return {
|
||||
version
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.d2-page-cover {
|
||||
.logo {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.d2-page-cover__logo {
|
||||
img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
.d2-page-cover__title {
|
||||
margin: 20px;
|
||||
font-weight: bold;
|
||||
display: -webkit-flex; /* Safari */
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.title-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.d2-page-cover__sub-title {
|
||||
margin: 0px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.d2-page-cover__build-time {
|
||||
margin: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20px;
|
||||
width: 80%;
|
||||
.preview_img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.footer_box {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.right {
|
||||
display: flex;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
& > * {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<fs-page class="home—index">
|
||||
<page-cover />
|
||||
<page-content />
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from "vue";
|
||||
import PageCover from "./page-cover/index.vue";
|
||||
import PageContent from "./content/index.vue";
|
||||
export default defineComponent({
|
||||
components: { PageCover },
|
||||
components: { PageContent },
|
||||
setup() {}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<a-form
|
||||
ref="formRef"
|
||||
class="user-layout-login"
|
||||
name="custom-validation"
|
||||
:model="formState"
|
||||
:rules="rules"
|
||||
v-bind="layout"
|
||||
@finish="handleFinish"
|
||||
@finishFailed="handleFinishFailed"
|
||||
>
|
||||
<a-form ref="formRef" class="user-layout-login" name="custom-validation" :model="formState" :rules="rules" v-bind="layout" @finish="handleFinish" @finishFailed="handleFinishFailed">
|
||||
<!-- <div class="login-title">登录</div>-->
|
||||
<a-tabs :active-key="formState.loginType" :tab-bar-style="{ textAlign: 'center', borderBottom: 'unset' }">
|
||||
<a-tab-pane key="password" tab="用户名密码登录">
|
||||
@@ -24,12 +15,7 @@
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item has-feedback name="password">
|
||||
<a-input-password
|
||||
v-model:value="formState.password"
|
||||
placeholder="请输入密码"
|
||||
size="large"
|
||||
autocomplete="off"
|
||||
>
|
||||
<a-input-password v-model:value="formState.password" placeholder="请输入密码" size="large" autocomplete="off">
|
||||
<template #prefix>
|
||||
<span class="iconify" data-icon="ion:lock-closed-outline" data-inline="false"></span>
|
||||
</template>
|
||||
@@ -47,12 +33,7 @@
|
||||
<a-form-item has-feedback name="imgCode">
|
||||
<a-row :gutter="16">
|
||||
<a-col class="gutter-row" :span="16">
|
||||
<a-input
|
||||
v-model:value="formState.imgCode"
|
||||
placeholder="请输入图片验证码"
|
||||
size="large"
|
||||
autocomplete="off"
|
||||
>
|
||||
<a-input v-model:value="formState.imgCode" placeholder="请输入图片验证码" size="large" autocomplete="off">
|
||||
<template #prefix>
|
||||
<span class="iconify" data-icon="ion:image-outline" data-inline="false"></span>
|
||||
</template>
|
||||
@@ -74,13 +55,7 @@
|
||||
</a-input>
|
||||
</a-col>
|
||||
<a-col class="gutter-row" :span="8">
|
||||
<a-button
|
||||
class="getCaptcha"
|
||||
tabindex="-1"
|
||||
:disabled="smsSendBtnDisabled"
|
||||
@click="sendSmsCode"
|
||||
v-text="smsTime <= 0 ? '发送' : smsTime + ' s'"
|
||||
></a-button>
|
||||
<a-button class="getCaptcha" tabindex="-1" :disabled="smsSendBtnDisabled" @click="sendSmsCode" v-text="smsTime <= 0 ? '发送' : smsTime + ' s'"></a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
|
||||
Reference in New Issue
Block a user