dbeaver/pro#5129 cb 6095 sql editor buttons shortcut labels are hardcoded (#3696)

* dbeaver/pro#5129 feat: use action item bindings API to get binding label

removes hardcoded shortcuts
adds formatting for shortcuts, uses OS-specific shortcuts

* dbeaver/pro#5129 feat: add example of manual using getBindingLabel function

* dbeaver/pro#5129 feat: use menu api for sql editor actions

* dbeaver/pro#5129 fix: lint async

* dbeaver/pro#5129 fix: remove wrong action icons

move private methods to the end of files

* dbeaver/pro#5129 refactor: use context via useDataContextLink hook

* dbeaver/pro#5129 refactor: DRY ACTIONS

* dbeaver/pro#5129 fix: DRY ACTIONS

* dbeaver/pro#5129 fix: action titles

* dbeaver/pro#5129 fix: DI after devel merge

* dbeaver/pro#5129 bonus: fix text content in dropdowns

---------

Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
Co-authored-by: Alexey Potsetsuev <wrouds@gmail.com>
This commit is contained in:
Sychev Andrey
2025-09-10 21:04:03 +08:00
committed by GitHub
co-authored by Daria Marutkina Alexey Potsetsuev
parent c5190b2567
commit ab813e21ab
30 changed files with 306 additions and 232 deletions
@@ -46,6 +46,7 @@ import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService.js';
import { DATA_CONTEXT_SQL_EDITOR_DATA } from './SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.js';
import { SQL_EDITOR_TOOLS_MENU } from './SqlEditor/SQL_EDITOR_TOOLS_MENU.js';
import { SQL_EDITOR_TOOLS_MORE_MENU } from './SqlEditor/SQL_EDITOR_TOOLS_MORE_MENU.js';
import { SQL_EDITOR_ACTIONS_MENU } from './SqlEditor/SQL_EDITOR_ACTIONS_MENU.js';
import { getSqlEditorName } from './getSqlEditorName.js';
import type { ISqlEditorTabState } from './ISqlEditorTabState.js';
import { SqlEditorSettingsService } from './SqlEditorSettingsService.js';
@@ -53,6 +54,12 @@ import { SqlEditorSettingsService } from './SqlEditorSettingsService.js';
const SYNC_DELAY = 5 * 60 * 1000;
const ScriptImportDialog = importLazyComponent(() => import('./SqlEditor/ScriptImportDialog.js').then(m => m.ScriptImportDialog));
const EXECUTIONS_ACTIONS = [
ACTION_SQL_EDITOR_EXECUTE,
ACTION_SQL_EDITOR_EXECUTE_NEW,
ACTION_SQL_EDITOR_EXECUTE_SCRIPT,
ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN,
];
@injectable(() => [
MenuService,
@@ -207,6 +214,15 @@ export class MenuBootstrap extends Bootstrap {
getItems: (context, items) => [...items, ACTION_SAVE],
});
this.menuService.addCreator({
menus: [SQL_EDITOR_ACTIONS_MENU],
contexts: [DATA_CONTEXT_SQL_EDITOR_DATA, DATA_CONTEXT_SQL_EDITOR_STATE],
getItems: (context, items) => [
...items,
...EXECUTIONS_ACTIONS,
],
});
this.keyBindingService.addKeyBindingHandler({
id: 'sql-editor-save',
binding: KEY_BINDING_SAVE,
@@ -227,13 +243,10 @@ export class MenuBootstrap extends Bootstrap {
this.actionService.addHandler({
id: 'sql-editor-actions',
actions: [
ACTION_SQL_EDITOR_EXECUTE,
ACTION_SQL_EDITOR_EXECUTE_NEW,
ACTION_SQL_EDITOR_EXECUTE_SCRIPT,
...EXECUTIONS_ACTIONS,
ACTION_SQL_EDITOR_FORMAT,
ACTION_REDO,
ACTION_UNDO,
ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN,
],
contexts: [DATA_CONTEXT_SQL_EDITOR_DATA],
isActionApplicable: (contexts, action): boolean => {
@@ -245,12 +258,7 @@ export class MenuBootstrap extends Bootstrap {
if (
!sqlEditorData.isExecutionAllowed &&
[
ACTION_SQL_EDITOR_EXECUTE,
ACTION_SQL_EDITOR_EXECUTE_NEW,
ACTION_SQL_EDITOR_EXECUTE_SCRIPT,
ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN,
].includes(action)
EXECUTIONS_ACTIONS.includes(action)
) {
return false;
}
@@ -259,6 +267,11 @@ export class MenuBootstrap extends Bootstrap {
return !!sqlEditorData.dataSource?.hasFeature(ESqlDataSourceFeatures.script) && !sqlEditorData.activeSegmentMode.activeSegmentMode;
}
if (action === ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN) {
return !!sqlEditorData.dataSource?.hasFeature(ESqlDataSourceFeatures.query) &&
!!sqlEditorData.dialect?.supportsExplainExecutionPlan;
}
// TODO we have to add check for output action ?
if (
!sqlEditorData.dataSource?.hasFeature(ESqlDataSourceFeatures.query) &&
@@ -271,6 +284,11 @@ export class MenuBootstrap extends Bootstrap {
},
isDisabled: (context, action) => {
const data = context.get(DATA_CONTEXT_SQL_EDITOR_DATA)!;
if (EXECUTIONS_ACTIONS.includes(action)) {
return data.isDisabled || data.isScriptEmpty;
}
switch (action) {
case ACTION_SQL_EDITOR_FORMAT:
return data.isDisabled || data.isScriptEmpty || data.readonly;
@@ -278,6 +296,15 @@ export class MenuBootstrap extends Bootstrap {
return false;
},
getActionInfo: (context, action) => {
if (EXECUTIONS_ACTIONS.includes(action)) {
return {
...action.info,
label: '',
};
}
return action.info;
},
handler: this.sqlEditorActionHandler.bind(this),
});
@@ -7,14 +7,18 @@
*/
import { observer } from 'mobx-react-lite';
import { ActionIconButton, getComputed, preventFocusHandler, s, useS, useTranslate } from '@cloudbeaver/core-blocks';
import { preventFocusHandler, s, useS } from '@cloudbeaver/core-blocks';
import { useDataContextLink } from '@cloudbeaver/core-data-context';
import { useMenu } from '@cloudbeaver/core-view';
import type { ISqlEditorTabState } from '../ISqlEditorTabState.js';
import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures.js';
import { DATA_CONTEXT_SQL_EDITOR_DATA } from './DATA_CONTEXT_SQL_EDITOR_DATA.js';
import { DATA_CONTEXT_SQL_EDITOR_STATE } from '../DATA_CONTEXT_SQL_EDITOR_STATE.js';
import type { ISQLEditorData } from './ISQLEditorData.js';
import style from './SQLEditorActions.module.css';
import { SqlEditorActionsMenu } from './SqlEditorActionsMenu.js';
import { SqlEditorTools } from './SqlEditorTools.js';
import { SQL_EDITOR_ACTIONS_MENU } from './SQL_EDITOR_ACTIONS_MENU.js';
interface Props {
data: ISQLEditorData;
@@ -22,58 +26,21 @@ interface Props {
className?: string;
}
export const SQLEditorActions = observer<Props>(function SQLEditorActions({ data, state }) {
export const SQLEditorActions = observer<Props>(function SQLEditorActions({ data, state, className }) {
const styles = useS(style);
const translate = useTranslate();
const isActiveSegmentMode = getComputed(() => data.activeSegmentMode.activeSegmentMode);
const disabled = getComputed(() => data.isScriptEmpty || data.isDisabled);
const isQuery = data.dataSource?.hasFeature(ESqlDataSourceFeatures.query);
const isExecutable = data.isExecutionAllowed;
const menu = useMenu({ menu: SQL_EDITOR_ACTIONS_MENU });
useDataContextLink(menu.context, (context, id) => {
context.set(DATA_CONTEXT_SQL_EDITOR_STATE, state, id);
});
useDataContextLink(menu.context, (context, id) => {
context.set(DATA_CONTEXT_SQL_EDITOR_DATA, data, id);
});
return (
<div className={s(styles, { container: true })}>
<div className={s(styles, { container: true }, className)}>
<div className={s(styles, { actions: true })} onMouseDown={preventFocusHandler}>
{isExecutable && (
<>
{isQuery && (
<>
<ActionIconButton
name="/icons/sql_exec.svg"
disabled={disabled}
title={translate('sql_editor_sql_execution_button_tooltip')}
img
onClick={data.executeQuery}
/>
<ActionIconButton
name="/icons/sql_exec_new.svg"
disabled={disabled}
title={translate('sql_editor_sql_execution_new_tab_button_tooltip')}
img
onClick={data.executeQueryNewTab}
/>
</>
)}
<ActionIconButton
name="/icons/sql_script_exec.svg"
disabled={disabled}
hidden={isActiveSegmentMode}
title={translate('sql_editor_sql_execution_script_button_tooltip')}
img
onClick={data.executeScript}
/>
{isQuery && data.dialect?.supportsExplainExecutionPlan && (
<ActionIconButton
name="/icons/sql_execution_plan.svg"
disabled={disabled}
hidden={isActiveSegmentMode}
title={translate('sql_editor_execution_plan_button_tooltip')}
img
onClick={data.showExecutionPlan}
/>
)}
</>
)}
<SqlEditorActionsMenu state={state} />
<SqlEditorActionsMenu state={state} context={menu.context} />
</div>
<SqlEditorTools data={data} state={state} />
</div>
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2025 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
@@ -10,4 +10,5 @@ import { createAction } from '@cloudbeaver/core-view';
export const ACTION_SQL_EDITOR_EXECUTE = createAction('sql-editor-execute', {
icon: '/icons/sql_exec.svg',
label: 'sql_editor_sql_execution_button_tooltip',
tooltip: 'sql_editor_sql_execution_button_tooltip',
});
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2025 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
@@ -10,4 +10,5 @@ import { createAction } from '@cloudbeaver/core-view';
export const ACTION_SQL_EDITOR_EXECUTE_NEW = createAction('sql-editor-execute-new', {
icon: '/icons/sql_exec_new.svg',
label: 'sql_editor_sql_execution_new_tab_button_tooltip',
tooltip: 'sql_editor_sql_execution_new_tab_button_tooltip',
});
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2025 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
@@ -10,4 +10,5 @@ import { createAction } from '@cloudbeaver/core-view';
export const ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN = createAction('sql-editor-show-execution-plan', {
icon: '/icons/sql_execution_plan.svg',
label: 'sql_editor_execution_plan_button_tooltip',
tooltip: 'sql_editor_execution_plan_button_tooltip',
});
@@ -14,15 +14,15 @@ export default [
['sql_editor_placeholder', 'Execute query with Ctrl+Enter to see results'],
['sql_editor_hint_empty', 'There is no proposals...'],
['sql_editor_tools_more_menu_tooltip', 'More tools'],
['sql_editor_execution_plan_button_tooltip', 'Explain execution plan (Shift + Ctrl + E)'],
['sql_editor_output_logs_button_tooltip', 'Show server output (Shift + Ctrl + O)'],
['sql_editor_execution_plan_button_tooltip', 'Explain execution plan'],
['sql_editor_output_logs_button_tooltip', 'Show server output'],
['sql_editor_output_logs_tab_title', 'Output'],
['sql_editor_output_logs_input_placeholder', 'Enter a part of a message to search for here'],
['sql_editor_output_logs_wrap_mode', 'Wrap mode'],
['sql_editor_sql_execution_button_tooltip', 'Execute SQL Statement (Ctrl + Enter)'],
['sql_editor_sql_execution_new_tab_button_tooltip', 'Execute SQL Statement in new tab (Ctrl + \\)(Shift + Ctrl + Enter)'],
['sql_editor_sql_execution_script_button_tooltip', 'Execute SQL Script (Alt + X)'],
['sql_editor_sql_format_button_tooltip', 'Format SQL Script (Shift + Ctrl + F)'],
['sql_editor_sql_execution_button_tooltip', 'Execute SQL Statement'],
['sql_editor_sql_execution_new_tab_button_tooltip', 'Execute SQL Statement in new tab'],
['sql_editor_sql_execution_script_button_tooltip', 'Execute SQL Script'],
['sql_editor_sql_format_button_tooltip', 'Format SQL Script'],
['sql_editor_sql_execution_script_lock_tooltip', 'Lock editor to prevent modifications'],
['sql_editor_sql_statistics_unavailable', 'Statistics is not available'],
['sql_editor_sql_execution_executed_queries', 'Executed queries:'],
@@ -13,21 +13,21 @@ export default [
['sql_editor_placeholder', 'Exécuter une requête (appuyez sur Ctrl+Entrée pour voir les résultats)'],
['sql_editor_hint_empty', "Il n'y a aucune proposition..."],
['sql_editor_tools_more_menu_tooltip', "Plus d'outils"],
['sql_editor_execution_plan_button', "Afficher le plan d'exécution (Shift + Ctrl + E)"],
['sql_editor_output_logs_button_tooltip', 'Afficher la sortie du serveur (Shift + Ctrl + O)'],
['sql_editor_execution_plan_button', "Afficher le plan d'exécution"],
['sql_editor_output_logs_button_tooltip', 'Afficher la sortie du serveur'],
['sql_editor_output_logs_tab_title', 'Journaux'],
['sql_editor_output_logs_hint', 'Aucun message du serveur'],
['sql_editor_output_logs_wrap_mode', 'Mode Wrap'],
['sql_editor_execution_plan_button_tooltip', "Afficher le plan d'exécution (Shift + Ctrl + E)"],
['sql_editor_execution_plan_button_tooltip', "Afficher le plan d'exécution"],
['sql_editor_execution_plan_button', "Afficher le plan d'exécution"],
['sql_editor_execution_script_button_tooltip', 'Exécuter le script SQL (Alt + X)'],
['sql_editor_execution_script_button_tooltip', 'Exécuter le script SQL'],
['sql_editor_execution_script_button', 'Exécuter le script SQL'],
['sql_editor_execution_query_button_tooltip', 'Exécuter la déclaration SQL (Ctrl + Entrée)'],
['sql_editor_execution_query_button_tooltip', 'Exécuter la déclaration SQL'],
['sql_editor_execution_query_button', 'Exécuter la déclaration SQL'],
['sql_editor_execution_query_new_tab_button_tooltip', 'Exécuter la déclaration SQL dans un nouvel onglet (Ctrl + \\)(Shift + Ctrl + Entrée)'],
['sql_editor_execution_query_new_tab_button_tooltip', 'Exécuter la déclaration SQL dans un nouvel onglet'],
['sql_editor_execution_query_new_tab_button', 'Exécuter dans un nouvel onglet'],
['sql_editor_execution_query_tooltip', 'Exécuter les requêtes'],
['sql_editor_lock_button_tooltip', "Verrouiller l'éditeur pour éviter les modifications (Shift + Ctrl + F)"],
['sql_editor_lock_button_tooltip', "Verrouiller l'éditeur pour éviter les modifications"],
['sql_editor_lock_button', "Verrouiller l'éditeur"],
['sql_editor_sql_statistics_unavailable', 'Les statistiques SQL ne sont pas disponibles'],
['sql_editor_queries_tab_title', 'Requêtes exécutées'],
@@ -14,15 +14,15 @@ export default [
['sql_editor_placeholder', 'Esegui la query con Ctrl+Enter per vedere i risultati'],
['sql_editor_hint_empty', 'There is no proposals...'],
['sql_editor_tools_more_menu_tooltip', 'Più strumenti'],
['sql_editor_execution_plan_button_tooltip', 'Mostra il piano di esecuzione (Shift + Ctrl + E)'],
['sql_editor_output_logs_button_tooltip', 'Show server output (Shift + Ctrl + O)'],
['sql_editor_execution_plan_button_tooltip', 'Mostra il piano di esecuzione'],
['sql_editor_output_logs_button_tooltip', 'Show server output'],
['sql_editor_output_logs_tab_title', 'Output'],
['sql_editor_output_logs_input_placeholder', 'Enter a part of a message to search for here'],
['sql_editor_output_logs_wrap_mode', 'Wrap mode'],
['sql_editor_sql_execution_button_tooltip', "Esegui l'istruzione SQL (Ctrl + Enter)"],
['sql_editor_sql_execution_new_tab_button_tooltip', "Esegui l'istruzione SQL in una nuova tab (Ctrl + \\)(Shift + Ctrl + Enter)"],
['sql_editor_sql_execution_script_button_tooltip', 'Esegui lo script SQL (Alt + X)'],
['sql_editor_sql_format_button_tooltip', 'Format SQL Script (Shift + Ctrl + F)'],
['sql_editor_sql_execution_button_tooltip', "Esegui l'istruzione SQL"],
['sql_editor_sql_execution_new_tab_button_tooltip', "Esegui l'istruzione SQL in una nuova tab"],
['sql_editor_sql_execution_script_button_tooltip', 'Esegui lo script SQL'],
['sql_editor_sql_format_button_tooltip', 'Format SQL Script'],
['sql_editor_sql_execution_script_lock_tooltip', 'Lock editor to prevent modifications'],
['sql_editor_sql_statistics_unavailable', 'Statistiche non disponibili'],
['sql_editor_sql_execution_executed_queries', 'Executed queries:'],
@@ -14,15 +14,15 @@ export default [
['sql_editor_placeholder', 'Нажмите Ctrl+Enter, чтобы выполнить запрос и увидеть результат'],
['sql_editor_hint_empty', 'Нет авто-дополнений...'],
['sql_editor_tools_more_menu_tooltip', 'Больше инструментов'],
['sql_editor_execution_plan_button_tooltip', 'Посмотреть информацию о плане выполнения запроса (Shift + Ctrl + E)'],
['sql_editor_output_logs_button_tooltip', 'Показать вывод сервера (Shift + Ctrl + O)'],
['sql_editor_execution_plan_button_tooltip', 'Посмотреть информацию о плане выполнения запроса'],
['sql_editor_output_logs_button_tooltip', 'Показать вывод сервера'],
['sql_editor_output_logs_tab_title', 'Вывод логов'],
['sql_editor_output_logs_input_placeholder', 'Введите часть сообщения для поиска'],
['sql_editor_output_logs_wrap_mode', 'Перенос строк'],
['sql_editor_sql_execution_button_tooltip', 'Выполнить SQL Выражение (Ctrl + Enter)'],
['sql_editor_sql_execution_new_tab_button_tooltip', 'Выполнить SQL Выражение в новой вкладке (Ctrl + \\)(Shift + Ctrl + Enter)'],
['sql_editor_sql_execution_script_button_tooltip', 'Исполнить SQL Скрипт (Alt + X)'],
['sql_editor_sql_format_button_tooltip', 'Форматировать SQL скрипт (Shift + Ctrl + F)'],
['sql_editor_sql_execution_button_tooltip', 'Выполнить SQL Выражение'],
['sql_editor_sql_execution_new_tab_button_tooltip', 'Выполнить SQL Выражение в новой вкладке'],
['sql_editor_sql_execution_script_button_tooltip', 'Исполнить SQL Скрипт'],
['sql_editor_sql_format_button_tooltip', 'Форматировать SQL скрипт'],
['sql_editor_sql_execution_script_lock_tooltip', 'Заблокировать скрипт во избежание изменений'],
['sql_editor_sql_statistics_unavailable', 'Статистика не доступна'],
['sql_editor_sql_execution_executed_queries', 'Выполненные запросы:'],
@@ -14,15 +14,15 @@ export default [
['sql_editor_placeholder', 'Thực thi truy vấn với Ctrl+Enter để xem kết quả'],
['sql_editor_hint_empty', 'Không có đề xuất nào...'],
['sql_editor_tools_more_menu_tooltip', 'Nhiều công cụ hơn'],
['sql_editor_execution_plan_button_tooltip', 'Giải thích kế hoạch thực thi (Shift + Ctrl + E)'],
['sql_editor_output_logs_button_tooltip', 'Hiển thị đầu ra máy chủ (Shift + Ctrl + O)'],
['sql_editor_execution_plan_button_tooltip', 'Giải thích kế hoạch thực thi'],
['sql_editor_output_logs_button_tooltip', 'Hiển thị đầu ra máy chủ'],
['sql_editor_output_logs_tab_title', 'Đầu ra'],
['sql_editor_output_logs_input_placeholder', 'Nhập một phần của tin nhắn để tìm kiếm tại đây'],
['sql_editor_output_logs_wrap_mode', 'Chế độ wrap'],
['sql_editor_sql_execution_button_tooltip', 'Thực thi câu lệnh SQL (Ctrl + Enter)'],
['sql_editor_sql_execution_new_tab_button_tooltip', 'Thực thi câu lệnh SQL trong tab mới (Ctrl + \\)(Shift + Ctrl + Enter)'],
['sql_editor_sql_execution_script_button_tooltip', 'Thực thi kịch bản SQL (Alt + X)'],
['sql_editor_sql_format_button_tooltip', 'Định dạng kịch bản SQL (Shift + Ctrl + F)'],
['sql_editor_sql_execution_button_tooltip', 'Thực thi câu lệnh SQL'],
['sql_editor_sql_execution_new_tab_button_tooltip', 'Thực thi câu lệnh SQL trong tab mới'],
['sql_editor_sql_execution_script_button_tooltip', 'Thực thi kịch bản SQL'],
['sql_editor_sql_format_button_tooltip', 'Định dạng kịch bản SQL'],
['sql_editor_sql_execution_script_lock_tooltip', 'Khóa trình soạn thảo để ngăn sửa đổi'],
['sql_editor_sql_statistics_unavailable', 'Thống kê không khả dụng'],
['sql_editor_sql_execution_executed_queries', 'Các truy vấn đã thực thi:'],
@@ -14,15 +14,15 @@ export default [
['sql_editor_placeholder', '使用Ctrl + Enter执行查询以查看结果'],
['sql_editor_hint_empty', '无提示信息...'],
['sql_editor_tools_more_menu_tooltip', '更多工具'],
['sql_editor_execution_plan_button_tooltip', '解释执行计划(Shift + Ctrl + E)'],
['sql_editor_output_logs_button_tooltip', '显示服务端输出 (Shift + Ctrl + O)'],
['sql_editor_execution_plan_button_tooltip', '解释执行计划'],
['sql_editor_output_logs_button_tooltip', '显示服务端输出'],
['sql_editor_output_logs_tab_title', '输出'],
['sql_editor_output_logs_input_placeholder', '在此处输入要搜索的消息关键词'],
['sql_editor_output_logs_wrap_mode', '换行模式'],
['sql_editor_sql_execution_button_tooltip', '执行SQL语句(Ctrl + Enter)'],
['sql_editor_sql_execution_new_tab_button_tooltip', '在新选项卡中执行SQL语句(Ctrl + \\)(Shift + Ctrl + Enter)'],
['sql_editor_sql_execution_script_button_tooltip', '执行SQL脚本(Alt + X)'],
['sql_editor_sql_format_button_tooltip', '格式化SQL脚本(Shift + Ctrl + F)'],
['sql_editor_sql_execution_button_tooltip', '执行SQL语句'],
['sql_editor_sql_execution_new_tab_button_tooltip', '在新选项卡中执行SQL语句'],
['sql_editor_sql_execution_script_button_tooltip', '执行SQL脚本'],
['sql_editor_sql_format_button_tooltip', '格式化SQL脚本'],
['sql_editor_sql_execution_script_lock_tooltip', '锁定编辑器阻止修改'],
['sql_editor_sql_statistics_unavailable', '统计不可用'],
['sql_editor_sql_execution_queries', '查询:'],