🔨 批量执行.

This commit is contained in:
lijiahangmax
2024-03-21 01:32:25 +08:00
parent eb9e184d79
commit 2a144cfa57
12 changed files with 165 additions and 102 deletions

View File

@@ -112,6 +112,7 @@
const defaultForm = (): ExecCommandRequest => {
return {
command: '',
timeout: 0,
};
};
@@ -220,8 +221,8 @@
@command-gap: @form-width + @history-width + 32px;
.exec-container {
width: calc(100% - 32px);
height: calc(100% - 32px);
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
position: absolute;
@@ -265,4 +266,23 @@
}
}
:deep(.panel-header) {
width: 100%;
height: 28px;
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: flex-start;
h3, > span {
margin: 0;
overflow: hidden;
white-space: nowrap;
}
h3 {
color: var(--color-text-1);
}
}
</style>

View File

@@ -1,13 +1,15 @@
<template>
<div class="layout-container full">
<!-- 执行面板 -->
<exec-panel v-show="!logVisible"
@submit="openLog" />
<div v-show="!logVisible" class="panel-wrapper">
<exec-panel @submit="openLog" />
</div>
<!-- 执行日志 -->
<exec-log-panel v-if="logVisible"
ref="log"
:visibleBack="true"
@back="setLogVisible(false)" />
<div v-if="logVisible" class="panel-wrapper">
<exec-log-panel ref="log"
:visibleBack="true"
@back="setLogVisible(false)" />
</div>
</div>
</template>
@@ -48,23 +50,10 @@
<style lang="less" scoped>
:deep(.panel-header) {
.panel-wrapper {
width: 100%;
height: 28px;
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: flex-start;
h3, > span {
margin: 0;
overflow: hidden;
white-space: nowrap;
}
h3 {
color: var(--color-text-1);
}
height: 100%;
position: relative;
}
</style>

View File

@@ -163,7 +163,7 @@
<a-button v-permission="['asset:exec:exec-command']"
type="text"
size="mini"
@click="() => emits('viewLog', record.id, $event.ctrlKey)">
@click="(e) => emits('viewLog', record.id, e.ctrlKey)">
日志
</a-button>
<!-- 中断 -->

View File

@@ -31,9 +31,6 @@
import ExecTemplateExecDrawer from './components/exec-template-exec-drawer.vue';
import AuthorizedHostModal from '@/components/asset/host/authorized-host-modal/index.vue';
// TODO TEST 选择主机
// TODO openAdd openUpdate 脊柱
const render = ref(false);
const table = ref();
const drawer = ref();