Skip to content

Commit

Permalink
fix(backend): spider工具箱相关问题修复 #1482 (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia authored Oct 26, 2023
1 parent cbcef89 commit a4b0830
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 51 deletions.
2 changes: 1 addition & 1 deletion dbm-ui/frontend/src/components/tools-table-input/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
}

&:focus {
border-color: 1px solid #3a84ff;
border-color: #3a84ff;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@

.table-edit-select {
position: relative;
height: 40px;
height: 42px;
overflow: hidden;
color: #63656e;
cursor: pointer;
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2259,5 +2259,6 @@
"克隆成功": "克隆成功",
"以此类推": "以此类推",
"主从集群": "主从集群",
"请输入部署数量": "请输入部署数量",
"这行勿动!新增翻译请在上一行添加!": ""
}
4 changes: 2 additions & 2 deletions dbm-ui/frontend/src/views/mysql/common/edit/DateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@

.bk-date-picker {
.bk-date-picker-editor {
height: 40px;
line-height: 40px;
height: 42px;
line-height: 42px;
border-color: transparent;
border-radius: 0;

Expand Down
4 changes: 2 additions & 2 deletions dbm-ui/frontend/src/views/mysql/common/edit/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
.table-edit-input {
position: relative;
display: block;
height: 40px;
height: 42px;
cursor: pointer;
background: #fff;

Expand Down Expand Up @@ -289,7 +289,7 @@
left: 0;
width: 100%;
max-height: 300px;
min-height: 40px;
min-height: 42px;
padding: 8px 16px;
overflow: auto;
font-size: 12px;
Expand Down
4 changes: 2 additions & 2 deletions dbm-ui/frontend/src/views/mysql/common/edit/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
.table-edit-select {
position: relative;
display: flex;
height: 40px;
height: 42px;
overflow: hidden;
color: #63656e;
cursor: pointer;
Expand Down Expand Up @@ -295,7 +295,7 @@
margin-right: 16px;
margin-left: 16px;
overflow: hidden;
line-height: 40px;
line-height: 42px;
text-overflow: ellipsis;
white-space: pre;
}
Expand Down
8 changes: 4 additions & 4 deletions dbm-ui/frontend/src/views/mysql/common/edit/Tag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@
background: rgb(255 221 221 / 20%);

.placeholder {
line-height: 40px;
line-height: 42px;
}
}
}
}

.bk-tag-input {
.bk-tag-input-trigger {
min-height: 40px;
min-height: 42px;
border-color: transparent;
border-radius: 0;

Expand All @@ -132,8 +132,8 @@

.placeholder {
top: 0;
height: 40px;
line-height: 40px;
height: 42px;
line-height: 42px;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@
position: relative;
display: flex;
width: 100%;
height: 42px;
align-items: center;
padding: 0 25px 0 17px;
overflow: hidden;
border: solid transparent 1px;
Expand Down Expand Up @@ -236,11 +238,11 @@
position: absolute;
inset: 0;
display: flex;
// padding-right: 10px;
padding-right: 35px;
font-size: 14px;
color: #ea3636;
align-items: center;
justify-content: center;
justify-content: flex-end;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
-->

<template>
<BkLoading :loading="isLoading || isClusterDataLoading">
<TableEditInput
ref="editRef"
:model-value="localValue"
:placeholder="t('请先输入集群')"
readonly
:rules="rules" />
</BkLoading>
<RenderText
ref="editRef"
:data="localValue"
:is-loading="isLoading || isClusterDataLoading"
:placeholder="t('请先输入集群')"
:rules="rules" />
</template>
<script setup lang="ts">
import _ from 'lodash';
Expand All @@ -36,7 +34,7 @@
import type SpiderModel from '@services/model/spider/spider';
import { getDetail } from '@services/spider';

import TableEditInput from '@views/mysql/common/edit/Input.vue';
import RenderText from '@components/tools-table-common/RenderText.vue';

interface Props {
clusterId: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<TableEditInput
ref="editRef"
v-model="localDomain"
:placeholder="t('请输入')"
:placeholder="t('请输入或选择集群')"
:rules="rules" />
</div>
</template>
Expand All @@ -35,7 +35,7 @@

import { useGlobalBizs } from '@stores';

import TableEditInput from '@views/spider-manage/common/edit/Input.vue';
import TableEditInput from '@components/tools-table-input/index.vue';

import { random } from '@utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import { getRemoteParis } from '@services/mysqlCluster';

import TableEditSelect from '@views/mysql/common/edit/Select.vue';
import TableEditSelect from '@components/tools-table-select/index.vue';

interface Props {
modelValue: string,
Expand All @@ -55,12 +55,12 @@

const list = [
{
id: 'all',
name: t('整个集群'),
value: 'all',
label: t('整个集群'),
},
{
id: 'partial',
name: t('部分实例'),
value: 'partial',
label: t('部分实例'),
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@

.bk-date-picker {
.bk-date-picker-editor {
height: 40px;
line-height: 40px;
height: 42px;
line-height: 42px;
border-color: transparent;
border-radius: 0;

Expand Down
4 changes: 2 additions & 2 deletions dbm-ui/frontend/src/views/spider-manage/common/edit/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
position: relative;
display: block;
width: 100%;
height: 40px;
height: 42px;
cursor: pointer;
background: #fff;

Expand Down Expand Up @@ -296,7 +296,7 @@
right: 0;
left: 0;
max-height: 300px;
min-height: 40px;
min-height: 42px;
padding: 8px 16px;
overflow-y: auto;
font-size: 12px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<TableEditInput
ref="editRef"
v-model="localDomain"
multi-input
:placeholder="t('请输入集群')"
:rules="rules" />
</div>
Expand All @@ -39,7 +38,7 @@

import { useGlobalBizs } from '@stores';

import TableEditInput from '@views/mysql/common/edit/Input.vue';
import TableEditInput from '@components/tools-table-input/index.vue';

import { random } from '@utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';

import TableEditSelect from '@views/mysql/common/edit/Select.vue';
import TableEditSelect from '@components/tools-table-select/index.vue';

interface Props {
modelValue: string
Expand All @@ -46,16 +46,16 @@

const list = [
{
id: 'truncate_table',
name: t('清除表数据_truncatetable'),
value: 'truncate_table',
label: t('清除表数据_truncatetable'),
},
{
id: 'drop_table',
name: t('清除表数据和结构_droptable'),
value: 'drop_table',
label: t('清除表数据和结构_droptable'),
},
{
id: 'drop_database',
name: t('删除整库_dropdatabase'),
value: 'drop_database',
label: t('删除整库_dropdatabase'),
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import { watch } from 'vue';
import { useI18n } from 'vue-i18n';

import TableEditDateTime from '@views/mysql/common/edit/DateTime.vue';
import TableEditDateTime from '@views/spider-manage/common/edit/DateTime.vue';

interface Props {
startTime?: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';

import TableEditDateTime from '@views/mysql/common/edit/DateTime.vue';
import TableEditDateTime from '@views/spider-manage/common/edit/DateTime.vue';

interface Exposes {
getValue: (field: string) => Promise<Record<'start_time', string>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

import { ipv4 } from '@common/regex';

import TableEditInput from '@views/spider-manage/common/edit/Input.vue';
import TableEditInput from '@components/tools-table-input/index.vue';

import { random } from '@utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<TableEditInput
ref="editRef"
v-model="localValue"
:placeholder="$t('请输入')"
:placeholder="$t('请输入部署数量')"
:rules="rules" />
</BkLoading>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
<div class="ticket-details__item">
<span class="ticket-details__item-label">{{ t('校验时间') }}:</span>
<span class="ticket-details__item-value">
{{ ticketDetails.details.trigger_checksum_type === 'timer' ? t('定时执行') : t('立即执行') }}
{{ isTimer ? t('定时执行') : t('立即执行') }}
</span>
</div>
<div class="ticket-details__item">
<div
v-if="isTimer"
class="ticket-details__item">
<span class="ticket-details__item-label">{{ t('定时执行时间') }}:</span>
<span class="ticket-details__item-value">{{ ticketDetails.details.trigger_checksum_time }}</span>
</div>
Expand Down Expand Up @@ -77,10 +79,11 @@

const { t } = useI18n();

// eslint-disable-next-line vue/no-setup-props-destructure
const { infos } = props.ticketDetails.details;
const tableData = ref<RowData[]>([]);

// eslint-disable-next-line vue/no-setup-props-destructure
const { infos } = props.ticketDetails.details;
const isTimer = props.ticketDetails.details.trigger_checksum_type === 'timer';
const columns = [
{
label: t('目标集群'),
Expand Down

0 comments on commit a4b0830

Please sign in to comment.