Compare commits

..
6 Commits
Author SHA1 Message Date
ssongliu 54b5cee466 fix: 解决页面加载先后导致的分页错误问题 (#2680)
Refs #2674
2023-10-26 15:31:49 +08:00
ssongliu 8607acbb22 fix: 优化终端界面菜单按钮样式 (#2676)
Refs #2669
2023-10-26 15:29:53 +08:00
ssongliu 13f5ac77c2 fix: 修改计划任务脚本执行状态判断 (#2675)
Refs #2652
2023-10-26 15:29:49 +08:00
zhengkunwang 354f0d0753 fix: 修改部分错误代码 (#2673) 2023-10-26 15:29:35 +08:00
48d4a47ed1 fix: 同步数据库时, 忽略recycle_bin和__recycle_bin__ (#2664)
* fix: 同步数据库时, 忽略recycle_bin改为__recycle_bin__

* fix: 同步数据库时, 忽略recycle_bin和__recycle_bin__

---------

Co-authored-by: tt <www@tt.local>
Co-authored-by: shao <shao@mac.local>
2023-10-26 15:29:24 +08:00
shaoandtt 0f3ea3f434 fix: 同步数据库时, 忽略recycle_bin改为__recycle_bin__ (#2659)
Co-authored-by: tt <www@tt.local>
2023-10-26 15:29:18 +08:00
11 changed files with 39 additions and 38 deletions
-3
View File
@@ -98,9 +98,6 @@ func ExecCronjobWithTimeOut(cmdStr string, workdir string, timeout time.Duration
return "", buserr.New(constant.ErrCmdTimeout)
}
if len(stderr.String()) != 0 {
err = buserr.New(constant.ErrBashExecute)
}
return output.String(), err
}
+1 -1
View File
@@ -269,7 +269,7 @@ func (r *Local) SyncDB(version string) ([]SyncDBInfo, error) {
if len(parts) != 2 {
continue
}
if parts[0] == "SCHEMA_NAME" || parts[0] == "information_schema" || parts[0] == "mysql" || parts[0] == "performance_schema" || parts[0] == "sys" || parts[0] == "recycle_bin" {
if parts[0] == "SCHEMA_NAME" || parts[0] == "information_schema" || parts[0] == "mysql" || parts[0] == "performance_schema" || parts[0] == "sys" || parts[0] == "__recycle_bin__" || parts[0] == "recycle_bin" {
continue
}
dataItem := SyncDBInfo{
+1 -1
View File
@@ -279,7 +279,7 @@ func (r *Remote) SyncDB(version string) ([]SyncDBInfo, error) {
if err = rows.Scan(&dbName, &charsetName); err != nil {
return datas, err
}
if dbName == "information_schema" || dbName == "mysql" || dbName == "performance_schema" || dbName == "sys" || dbName == "recycle_bin" {
if dbName == "information_schema" || dbName == "mysql" || dbName == "performance_schema" || dbName == "sys" || dbName == "__recycle_bin__" || dbName == "recycle_bin" {
continue
}
dataItem := SyncDBInfo{
+2 -1
View File
@@ -192,7 +192,7 @@ const language = useI18n().locale.value;
const paginationConfig = reactive({
cacheSizeKey: 'app-page-size',
currentPage: 1,
pageSize: 60,
pageSize: Number(localStorage.getItem('app-page-size')) || 60,
total: 0,
});
@@ -219,6 +219,7 @@ const search = async (req: App.AppReq) => {
loading.value = true;
req.pageSize = paginationConfig.pageSize;
req.page = paginationConfig.currentPage;
localStorage.setItem('app-page-size', req.pageSize + '');
await SearchApp(req)
.then((res) => {
apps.value = res.data.items;
@@ -337,7 +337,7 @@ let timer: NodeJS.Timer | null = null;
const paginationConfig = reactive({
cacheSizeKey: 'app-installed-page-size',
currentPage: 1,
pageSize: 20,
pageSize: Number(localStorage.getItem('app-installed-page-size')) || 20,
total: 0,
});
const open = ref(false);
@@ -415,6 +415,7 @@ const search = () => {
loading.value = true;
searchReq.page = paginationConfig.currentPage;
searchReq.pageSize = paginationConfig.pageSize;
localStorage.setItem('app-installed', searchReq.pageSize + '');
SearchAppInstalled(searchReq)
.then((res) => {
data.value = res.data.items;
@@ -166,6 +166,7 @@ const search = async () => {
let filterItem = filters.value;
let params = {
name: '',
state: 'all',
page: paginationConfig.currentPage,
pageSize: paginationConfig.pageSize,
filters: filterItem,
+2 -2
View File
@@ -159,7 +159,7 @@
</template>
</el-dialog>
<OperatrDialog @search="search" ref="dialogRef" />
<OperateDialog @search="search" ref="dialogRef" />
<Records @search="search" ref="dialogRecordRef" />
</div>
</template>
@@ -167,7 +167,7 @@
<script lang="ts" setup>
import TableSetting from '@/components/table-setting/index.vue';
import Tooltip from '@/components/tooltip/index.vue';
import OperatrDialog from '@/views/cronjob/operate/index.vue';
import OperateDialog from '@/views/cronjob/operate/index.vue';
import Records from '@/views/cronjob/record/index.vue';
import { loadZero } from '@/utils/util';
import { onMounted, reactive, ref } from 'vue';
+21 -10
View File
@@ -131,8 +131,8 @@
<el-card
v-for="(item, index) in records"
:key="index"
:class="item.id === currentRecord.id ? 'select-card' : 'primary-card'"
@click="forDetail(item)"
class="infinite-list-item"
>
<el-tag v-if="item.status === 'Success'" type="success">
{{ $t('commons.status.success') }}
@@ -143,13 +143,12 @@
<el-tag v-if="item.status === 'Failed'" type="danger">
{{ $t('commons.status.failed') }}
</el-tag>
<span v-if="item.id === currentRecord.id" class="select-card">
<span>
{{ dateFormat(0, 0, item.startTime) }}
</span>
<span v-else>{{ dateFormat(0, 0, item.startTime) }}</span>
</el-card>
</ul>
<div style="margin-top: 10px; font-size: 12px; float: right">
<div class="page-item">
<el-pagination
:page-size="searchInfo.pageSize"
:current-page="searchInfo.page"
@@ -723,28 +722,35 @@ defineExpose({
height: calc(100vh - 416px);
padding: 0;
margin: 0;
.el-card {
border: var(--panel-border) !important;
&:hover {
border: 1px solid var(--el-color-primary) !important;
box-shadow: 2px 2px 2px #888888;
}
display: flex;
align-items: center;
justify-content: center;
height: 40px;
font-size: 14px;
margin: 5px;
cursor: pointer;
}
.select-card {
color: var(--el-color-primary);
border: 1px solid var(--el-color-primary) !important;
box-shadow: 2px 2px 2px #888888;
&::before {
position: absolute;
width: 3px;
height: 40px;
content: '';
background: $primary-color;
border-radius: 10px;
}
}
.el-tag {
margin-right: 15px;
}
}
.select-card {
color: var(--el-color-primary);
}
.descriptionWide {
width: 40%;
@@ -752,6 +758,11 @@ defineExpose({
.description {
width: 30%;
}
.page-item {
margin-top: 10px;
font-size: 12px;
float: right;
}
@media only screen and (max-width: 1000px) {
.mainClass {
+1 -1
View File
@@ -269,7 +269,7 @@ const data = ref();
const paginationConfig = reactive({
cacheSizeKey: 'mysql-page-size',
currentPage: 1,
pageSize: 10,
pageSize: Number(localStorage.getItem('mysql-page-size')) || 10,
total: 0,
orderBy: 'created_at',
order: 'null',
+7 -17
View File
@@ -59,32 +59,22 @@ onUnmounted(() => {
<style lang="scss">
.router_card {
--el-card-border-radius: 8px;
--el-card-padding: 0 !important;
padding: 0px;
padding-bottom: 2px;
padding-top: 2px;
--el-card-padding: 0;
}
.router_card_button {
margin-left: 2px;
.el-radio-button__inner {
min-width: 100px;
height: 100%;
border: 0 !important;
background-color: var(--panel-button-active) !important;
box-shadow: none !important;
border: 2px solid transparent !important;
}
.el-radio-button__original-radio:checked + .el-radio-button__inner {
border-radius: 3px;
color: $primary-color;
background-color: var(--panel-button-active);
box-shadow: 0 0 0 2px $primary-color !important;
}
.el-radio-button:first-child .el-radio-button__inner {
border-radius: 3px;
color: $primary-color;
background-color: var(--panel-button-active);
box-shadow: 0 0 0 2px $primary-color !important;
border-color: $primary-color !important;
border-radius: 4px;
}
}
</style>
+1 -1
View File
@@ -248,7 +248,7 @@ let groups = ref<Group.GroupInfo[]>([]);
const paginationConfig = reactive({
cacheSizeKey: 'website-page-size',
currentPage: 1,
pageSize: 10,
pageSize: Number(localStorage.getItem('website-page-size')) || 10,
total: 0,
});
let req = reactive({