Browse Source

fix: MySQL 性能参数区分版本显示 (#2474)

pull/2479/head
ssongliu 1 year ago committed by GitHub
parent
commit
b8d2d4e7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      frontend/src/views/database/mysql/setting/index.vue
  2. 4
      frontend/src/views/database/mysql/setting/variables/index.vue

2
frontend/src/views/database/mysql/setting/index.vue

@ -304,7 +304,7 @@ const loadVariables = async () => {
variablesRef.value!.acceptParams({
type: props.type,
database: props.database,
mysqlVersion: mysqlVersion.value,
version: mysqlVersion.value,
variables: res.data,
});
};

4
frontend/src/views/database/mysql/setting/variables/index.vue

@ -76,7 +76,7 @@
</el-input>
<span class="input-help">{{ $t('database.readRndBufferSizeHelper') }}</span>
</el-form-item>
<el-form-item v-if="showCacheSize" label="query_cache_size" prop="query_cache_size">
<el-form-item v-if="showCacheSize()" label="query_cache_size" prop="query_cache_size">
<el-input clearable v-model.number="mysqlVariables.query_cache_size">
<template #append>MB</template>
</el-input>
@ -303,7 +303,7 @@ const onSaveVariables = async () => {
};
const showCacheSize = () => {
return currentDB.version.startsWith('5.7');
return currentDB.version?.startsWith('5.7');
};
defineExpose({
acceptParams,

Loading…
Cancel
Save