fdb2 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/public/.vite/manifest.json +11 -9
- package/dist/public/database-monitor.css +109 -86
- package/dist/public/database-monitor.js +153 -33
- package/dist/public/database.js +41 -2
- package/dist/public/explorer.css +303 -252
- package/dist/public/explorer.js +633 -412
- package/dist/public/export.js +7 -7
- package/dist/public/index.js +101 -8
- package/dist/public/layout.js +1 -1
- package/dist/public/{theme.js → modal.js} +88 -2
- package/dist/public/sql-query-editor.css +82 -82
- package/dist/public/sql-query-editor.js +64 -47
- package/dist/scripts/verify-db-support.cjs +93 -7
- package/dist/server/__tests__/excel-export.test.ts +136 -0
- package/dist/server/__tests__/export-progress.test.ts +80 -0
- package/dist/server/__tests__/health-check.test.ts +67 -0
- package/dist/server/__tests__/query-metrics.test.ts +96 -0
- package/dist/server/__tests__/remote-proxy.test.ts +14 -0
- package/dist/server/__tests__/sql-safety.test.ts +36 -0
- package/dist/server/core/dialect.d.ts +3 -0
- package/dist/server/core/dialect.d.ts.map +1 -1
- package/dist/server/core/dialect.js +17 -0
- package/dist/server/core/dialect.js.map +1 -1
- package/dist/server/core/dialect.ts +20 -0
- package/dist/server/core/query-metrics.d.ts +33 -0
- package/dist/server/core/query-metrics.d.ts.map +1 -0
- package/dist/server/core/query-metrics.js +117 -0
- package/dist/server/core/query-metrics.js.map +1 -0
- package/dist/server/core/query-metrics.ts +137 -0
- package/dist/server/core/sql-safety.d.ts +9 -0
- package/dist/server/core/sql-safety.d.ts.map +1 -0
- package/dist/server/core/sql-safety.js +74 -0
- package/dist/server/core/sql-safety.js.map +1 -0
- package/dist/server/core/sql-safety.ts +72 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +211 -17
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.ts +217 -17
- package/dist/server/service/database/base.service.d.ts +15 -0
- package/dist/server/service/database/base.service.d.ts.map +1 -1
- package/dist/server/service/database/base.service.js +108 -0
- package/dist/server/service/database/base.service.js.map +1 -1
- package/dist/server/service/database/base.service.ts +99 -6
- package/dist/server/service/database/clickhouse.service.d.ts.map +1 -1
- package/dist/server/service/database/clickhouse.service.js +9 -35
- package/dist/server/service/database/clickhouse.service.js.map +1 -1
- package/dist/server/service/database/clickhouse.service.ts +9 -44
- package/dist/server/service/database/cockroachdb.service.d.ts.map +1 -1
- package/dist/server/service/database/cockroachdb.service.js +9 -38
- package/dist/server/service/database/cockroachdb.service.js.map +1 -1
- package/dist/server/service/database/cockroachdb.service.ts +10 -49
- package/dist/server/service/database/database.service.d.ts +15 -2
- package/dist/server/service/database/database.service.d.ts.map +1 -1
- package/dist/server/service/database/database.service.js +400 -6
- package/dist/server/service/database/database.service.js.map +1 -1
- package/dist/server/service/database/database.service.ts +402 -7
- package/dist/server/service/database/export-progress.d.ts +43 -0
- package/dist/server/service/database/export-progress.d.ts.map +1 -0
- package/dist/server/service/database/export-progress.js +117 -0
- package/dist/server/service/database/export-progress.js.map +1 -0
- package/dist/server/service/database/export-progress.ts +125 -0
- package/dist/server/service/database/mongodb.service.d.ts +2 -0
- package/dist/server/service/database/mongodb.service.d.ts.map +1 -1
- package/dist/server/service/database/mongodb.service.js +79 -44
- package/dist/server/service/database/mongodb.service.js.map +1 -1
- package/dist/server/service/database/mongodb.service.ts +76 -43
- package/dist/server/service/database/mssql.service.d.ts.map +1 -1
- package/dist/server/service/database/mssql.service.js +10 -9
- package/dist/server/service/database/mssql.service.js.map +1 -1
- package/dist/server/service/database/mssql.service.ts +10 -9
- package/dist/server/service/database/mysql.service.js +10 -10
- package/dist/server/service/database/mysql.service.js.map +1 -1
- package/dist/server/service/database/mysql.service.ts +10 -10
- package/dist/server/service/database/oracle.service.d.ts +4 -0
- package/dist/server/service/database/oracle.service.d.ts.map +1 -1
- package/dist/server/service/database/oracle.service.js +32 -13
- package/dist/server/service/database/oracle.service.js.map +1 -1
- package/dist/server/service/database/oracle.service.ts +33 -13
- package/dist/server/service/database/postgres.service.d.ts.map +1 -1
- package/dist/server/service/database/postgres.service.js +10 -9
- package/dist/server/service/database/postgres.service.js.map +1 -1
- package/dist/server/service/database/postgres.service.ts +10 -9
- package/dist/server/service/database/sap.service.d.ts.map +1 -1
- package/dist/server/service/database/sap.service.js +9 -38
- package/dist/server/service/database/sap.service.js.map +1 -1
- package/dist/server/service/database/sap.service.ts +10 -49
- package/dist/server/service/database/sqlite.service.d.ts.map +1 -1
- package/dist/server/service/database/sqlite.service.js +10 -9
- package/dist/server/service/database/sqlite.service.js.map +1 -1
- package/dist/server/service/database/sqlite.service.ts +10 -9
- package/package.json +1 -1
- package/scripts/verify-db-support.cjs +93 -7
- package/server.js +15 -2
package/dist/public/export.js
CHANGED
|
@@ -54738,9 +54738,9 @@ async function exportDataToExcel(data, headers = {}, filename = "export.xlsx") {
|
|
|
54738
54738
|
headers[key] = key;
|
|
54739
54739
|
});
|
|
54740
54740
|
}
|
|
54741
|
-
downloadFile(await exportToExcel(data, headers), filename);
|
|
54741
|
+
await downloadFile(await exportToExcel(data, headers), filename);
|
|
54742
54742
|
}
|
|
54743
|
-
function exportDataToCSV(data, headers = {}, filename = "export.csv") {
|
|
54743
|
+
async function exportDataToCSV(data, headers = {}, filename = "export.csv") {
|
|
54744
54744
|
if (data.length === 0) {
|
|
54745
54745
|
console.warn("没有数据可导出");
|
|
54746
54746
|
return;
|
|
@@ -54761,17 +54761,17 @@ function exportDataToCSV(data, headers = {}, filename = "export.csv") {
|
|
|
54761
54761
|
return stringValue;
|
|
54762
54762
|
}));
|
|
54763
54763
|
const csvContent = [headerRow.join(","), ...rows.map((row) => row.join(","))].join("\n");
|
|
54764
|
-
downloadFile(new Blob(["" + csvContent], { type: "text/csv;charset=utf-8;" }), filename);
|
|
54764
|
+
await downloadFile(new Blob(["" + csvContent], { type: "text/csv;charset=utf-8;" }), filename);
|
|
54765
54765
|
}
|
|
54766
|
-
function exportDataToJSON(data, filename = "export.json") {
|
|
54766
|
+
async function exportDataToJSON(data, filename = "export.json") {
|
|
54767
54767
|
if (data.length === 0) {
|
|
54768
54768
|
console.warn("没有数据可导出");
|
|
54769
54769
|
return;
|
|
54770
54770
|
}
|
|
54771
54771
|
const jsonContent = JSON.stringify(data, null, 2);
|
|
54772
|
-
downloadFile(new Blob([jsonContent], { type: "application/json;charset=utf-8;" }), filename);
|
|
54772
|
+
await downloadFile(new Blob([jsonContent], { type: "application/json;charset=utf-8;" }), filename);
|
|
54773
54773
|
}
|
|
54774
|
-
function exportDataToSQL(data, tableName, headers = {}, filename = "export.sql") {
|
|
54774
|
+
async function exportDataToSQL(data, tableName, headers = {}, filename = "export.sql") {
|
|
54775
54775
|
if (data.length === 0) {
|
|
54776
54776
|
console.warn("没有数据可导出");
|
|
54777
54777
|
return;
|
|
@@ -54794,7 +54794,7 @@ function exportDataToSQL(data, tableName, headers = {}, filename = "export.sql")
|
|
|
54794
54794
|
}).join(", ") + ")").join(",\n");
|
|
54795
54795
|
const sqlContent = `-- Generated at ${(/* @__PURE__ */ new Date()).toLocaleString()}\n`;
|
|
54796
54796
|
const sqlInsert = `INSERT INTO ${tableName} (${columns.join(", ")})\nVALUES\n${values};`;
|
|
54797
|
-
downloadFile(new Blob([sqlContent + sqlInsert], { type: "text/plain;charset=utf-8;" }), filename);
|
|
54797
|
+
await downloadFile(new Blob([sqlContent + sqlInsert], { type: "text/plain;charset=utf-8;" }), filename);
|
|
54798
54798
|
}
|
|
54799
54799
|
async function downloadFile(blob, filename) {
|
|
54800
54800
|
if (isVscodeWebview()) {
|
package/dist/public/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./layout.js","./rolldown-runtime.js","./vue.js","./layout.css","./explorer.js","./database.js","./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./layout.js","./rolldown-runtime.js","./vue.js","./layout.css","./explorer.js","./database.js","./modal.js","./helpers.js","./export.js","./explorer.css","./database2.js","./database.css","./sql-query-editor.js","./sql-query-editor.css","./query-history.js","./query-history.css","./database-monitor.js","./echarts.js","./database-monitor.css","./vconsole.min.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import { a as __toESM, n as __esmMin, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime.js";
|
|
3
3
|
import { $ as markRaw, A as defineComponent, B as renderList, C as createBlock, F as nextTick, G as watch, H as resolveComponent, I as onBeforeUnmount, J as effectScope, L as onMounted, M as hasInjectionContext, O as createTextVNode, P as inject, Q as isRef, R as onUnmounted, S as createBaseVNode, T as createElementBlock, U as resolveDynamicComponent, V as renderSlot, W as useSlots, Y as getCurrentScope, Z as isReactive, a as init_vue_router, at as unref, b as Fragment, c as createI18n, ct as normalizeStyle, d as init_vue_runtime_esm_bundler, et as onScopeDispose, i as createWebHistory, it as toRefs, j as getCurrentInstance, k as createVNode, l as init_vue_i18n, lt as toDisplayString, n as useTitle, nt as ref, p as createApp, r as createRouter, rt as toRaw, st as normalizeClass, t as init_core, tt as reactive, u as useI18n, w as createCommentVNode, x as computed, y as withModifiers, z as openBlock } from "./vue.js";
|
|
4
4
|
import { i as init_bootstrap, n as init_bootstrap_esm, r as init_bootstrap_icons, t as Modal } from "./bootstrap.js";
|
|
@@ -4602,7 +4602,7 @@ function installListener() {
|
|
|
4602
4602
|
/**
|
|
4603
4603
|
* 发送 API 请求到扩展宿主,resolve 为 { ret, msg, data } 包装体(与桌面端 HTTP 响应体一致)。
|
|
4604
4604
|
*/
|
|
4605
|
-
function vscodeApiRequest(path, data) {
|
|
4605
|
+
function vscodeApiRequest(path, data, timeoutMs = 6e4) {
|
|
4606
4606
|
installListener();
|
|
4607
4607
|
const id = ++seq;
|
|
4608
4608
|
return new Promise((resolve) => {
|
|
@@ -4629,7 +4629,7 @@ function vscodeApiRequest(path, data) {
|
|
|
4629
4629
|
msg: "请求超时: " + path
|
|
4630
4630
|
});
|
|
4631
4631
|
}
|
|
4632
|
-
},
|
|
4632
|
+
}, timeoutMs);
|
|
4633
4633
|
});
|
|
4634
4634
|
}
|
|
4635
4635
|
function installSaveFileListener() {
|
|
@@ -4743,10 +4743,11 @@ function getRequestUrl(api) {
|
|
|
4743
4743
|
}
|
|
4744
4744
|
async function requestServer(url, data, option) {
|
|
4745
4745
|
if (typeof __VS_CODE_ENV__ !== "undefined" && __VS_CODE_ENV__) try {
|
|
4746
|
+
const apiPath = url.replace(/^(http(s)?:)?\/\//, "").replace(/.*?\/api\//, "/api/");
|
|
4746
4747
|
return {
|
|
4747
4748
|
status: 200,
|
|
4748
4749
|
statusText: "OK",
|
|
4749
|
-
data: await vscodeApiRequest(
|
|
4750
|
+
data: await vscodeApiRequest(apiPath, data, /\/api\/database\/exportTableDataTo/i.test(apiPath) ? 1800 * 1e3 : void 0)
|
|
4750
4751
|
};
|
|
4751
4752
|
} catch (error) {
|
|
4752
4753
|
console.error("VSCode 消息桥调用失败:", error);
|
|
@@ -4982,6 +4983,10 @@ var init_zh_CN = __esmMin((() => {
|
|
|
4982
4983
|
close: "关闭",
|
|
4983
4984
|
back: "返回",
|
|
4984
4985
|
export: "导出",
|
|
4986
|
+
exporting: "正在导出中...",
|
|
4987
|
+
exportingProgress: "正在导出中…已扫描 {rows} 行,用时 {seconds} 秒",
|
|
4988
|
+
exportingWriting: "正在写入文件…已扫描 {rows} 行,用时 {seconds} 秒",
|
|
4989
|
+
exportingClient: "正在生成文件…用时 {seconds} 秒",
|
|
4985
4990
|
import: "导入",
|
|
4986
4991
|
copy: "复制",
|
|
4987
4992
|
paste: "粘贴",
|
|
@@ -5667,11 +5672,45 @@ var init_zh_CN = __esmMin((() => {
|
|
|
5667
5672
|
noMetricData: "后端未提供该指标",
|
|
5668
5673
|
tableCountByDatabase: "各数据库表数量",
|
|
5669
5674
|
procedureCountByDatabase: "各数据库存储过程数量",
|
|
5670
|
-
slowQueryUnavailable: "
|
|
5671
|
-
resourcesUnavailable: "
|
|
5675
|
+
slowQueryUnavailable: "暂无超过 2 秒的查询记录(仅采集本进程执行过的查询)",
|
|
5676
|
+
resourcesUnavailable: "当前连接暂无可用的资源指标,不支持的项目会明确标注",
|
|
5672
5677
|
storageNoStats: "暂无统计接口数据",
|
|
5673
5678
|
storageSource: "来自 {n} 个数据库的统计接口",
|
|
5674
5679
|
chartNoData: "暂无数据库统计",
|
|
5680
|
+
metricUnavailable: "{name}:{reason}",
|
|
5681
|
+
reason: {
|
|
5682
|
+
METRIC_UNAVAILABLE: "该指标不可用",
|
|
5683
|
+
METRIC_DATABASE_SIZE_UNAVAILABLE: "数据库大小指标不可用",
|
|
5684
|
+
METRIC_ACTIVE_CONNECTIONS_UNSUPPORTED: "当前数据库类型未提供连接数指标",
|
|
5685
|
+
METRIC_QUERY_FAILED: "指标查询失败(详情见后端错误)",
|
|
5686
|
+
METRIC_SYSTEM_VIEW_REQUIRED: "需要数据库系统视图或额外权限",
|
|
5687
|
+
EXPLAIN_UNSAFE_SQL: "仅支持分析单条无副作用的 SELECT/WITH/SHOW/EXPLAIN 语句",
|
|
5688
|
+
EXPLAIN_MONGODB_UNSUPPORTED: "MongoDB 不支持 SQL EXPLAIN,请使用聚合管道分析",
|
|
5689
|
+
EXPLAIN_DIALECT_UNSUPPORTED: "当前数据库类型没有可用的安全 EXPLAIN 通道",
|
|
5690
|
+
EXPLAIN_FAILED: "EXPLAIN 执行失败(详情见后端错误)",
|
|
5691
|
+
CONNECTIVITY_FAILED: "连通性检查失败",
|
|
5692
|
+
TABLE_LIST_UNAVAILABLE: "表清单不可用,相关检查已跳过",
|
|
5693
|
+
SQLITE_INTEGRITY_CHECK_FAILED: "SQLite integrity_check 未返回 ok",
|
|
5694
|
+
MYSQL_CHECK_TABLE_ERROR: "MySQL CHECK TABLE 返回错误",
|
|
5695
|
+
COCKROACH_INDEX_VALIDITY_UNSUPPORTED: "CockroachDB 未提供等价的只读索引有效性检查",
|
|
5696
|
+
CLICKHOUSE_INTEGRITY_UNSUPPORTED: "ClickHouse CHECK TABLE 不能经当前 SQL 通道执行",
|
|
5697
|
+
ORACLE_INTEGRITY_UNSUPPORTED: "Oracle 结构校验需要额外权限,已跳过",
|
|
5698
|
+
INTEGRITY_UNSUPPORTED: "当前数据库类型没有可用的只读完整性检查",
|
|
5699
|
+
UNKNOWN: "不可用"
|
|
5700
|
+
},
|
|
5701
|
+
queryType: {
|
|
5702
|
+
select: "只读",
|
|
5703
|
+
write: "写入",
|
|
5704
|
+
ddl: "DDL",
|
|
5705
|
+
other: "其他"
|
|
5706
|
+
},
|
|
5707
|
+
failed: "失败",
|
|
5708
|
+
resourceLoadFailed: "资源指标加载失败",
|
|
5709
|
+
slowQueryLoadFailed: "慢查询记录加载失败",
|
|
5710
|
+
explainTitle: "查询执行计划",
|
|
5711
|
+
explainUnsupported: "当前数据库类型或语句不支持执行计划分析",
|
|
5712
|
+
explainFailed: "执行计划分析失败",
|
|
5713
|
+
clearFailed: "清空慢查询记录失败",
|
|
5675
5714
|
tableCount: "表数量",
|
|
5676
5715
|
tableCountTooltip: "表数量: {n}",
|
|
5677
5716
|
procedureCount: "存储过程数量",
|
|
@@ -5756,6 +5795,13 @@ var init_zh_CN = __esmMin((() => {
|
|
|
5756
5795
|
healthCheckConnection: "连接状态",
|
|
5757
5796
|
healthCheckTableIntegrity: "表完整性",
|
|
5758
5797
|
healthCheckIndexStatus: "索引状态",
|
|
5798
|
+
healthCheckTableInventory: "表/集合清单",
|
|
5799
|
+
healthCheckIndexStats: "索引统计",
|
|
5800
|
+
healthCheckIndexValidity: "索引有效性",
|
|
5801
|
+
healthCheckInvalidIndexes: "无效索引 {n} 个",
|
|
5802
|
+
healthCheckIntegrityOk: "完整性检查通过",
|
|
5803
|
+
healthCheckUnsupported: "该数据库类型暂无只读完整性检查能力",
|
|
5804
|
+
healthCheckPartial: "仅检查前 {n} 张表(共 {total} 张)",
|
|
5759
5805
|
healthCheckDiskSpace: "磁盘空间",
|
|
5760
5806
|
unknownError: "未知错误",
|
|
5761
5807
|
toolTitle: "工具",
|
|
@@ -5785,6 +5831,7 @@ var init_zh_CN = __esmMin((() => {
|
|
|
5785
5831
|
disable: "停用",
|
|
5786
5832
|
noSchedule: "暂无备份计划",
|
|
5787
5833
|
unsupportedDialect: "{operation}不支持当前数据库类型:{type}(仅支持 MySQL/PostgreSQL/MSSQL/Oracle)",
|
|
5834
|
+
maintenanceUnsupported: "{operation}暂不支持当前数据库类型:{type}(仅 MySQL / PostgreSQL / CockroachDB / SQLite 提供等价操作)",
|
|
5788
5835
|
fillUsernamePassword: "请填写用户名和密码",
|
|
5789
5836
|
confirmCreateUser: "即将执行以下 DCL 语句(不可自动回滚),请确认:\n{sql}",
|
|
5790
5837
|
confirmCreateUserTitle: "确认创建用户(DCL)",
|
|
@@ -5962,6 +6009,10 @@ var init_en_US = __esmMin((() => {
|
|
|
5962
6009
|
close: "Close",
|
|
5963
6010
|
back: "Back",
|
|
5964
6011
|
export: "Export",
|
|
6012
|
+
exporting: "Exporting...",
|
|
6013
|
+
exportingProgress: "Exporting… {rows} rows scanned, {seconds}s elapsed",
|
|
6014
|
+
exportingWriting: "Writing file… {rows} rows scanned, {seconds}s elapsed",
|
|
6015
|
+
exportingClient: "Generating file… {seconds}s elapsed",
|
|
5965
6016
|
import: "Import",
|
|
5966
6017
|
copy: "Copy",
|
|
5967
6018
|
paste: "Paste",
|
|
@@ -6647,11 +6698,45 @@ var init_en_US = __esmMin((() => {
|
|
|
6647
6698
|
noMetricData: "Metric not provided by backend",
|
|
6648
6699
|
tableCountByDatabase: "Table count by database",
|
|
6649
6700
|
procedureCountByDatabase: "Stored procedure count by database",
|
|
6650
|
-
slowQueryUnavailable: "
|
|
6651
|
-
resourcesUnavailable: "
|
|
6701
|
+
slowQueryUnavailable: "No queries over 2s recorded (only queries executed by this process are sampled)",
|
|
6702
|
+
resourcesUnavailable: "No resource metrics available for this connection; unsupported items are labeled explicitly",
|
|
6652
6703
|
storageNoStats: "No statistics data available",
|
|
6653
6704
|
storageSource: "From statistics of {n} databases",
|
|
6654
6705
|
chartNoData: "No database statistics",
|
|
6706
|
+
metricUnavailable: "{name}: {reason}",
|
|
6707
|
+
reason: {
|
|
6708
|
+
METRIC_UNAVAILABLE: "Metric is unavailable for this dialect",
|
|
6709
|
+
METRIC_DATABASE_SIZE_UNAVAILABLE: "Database size is unavailable",
|
|
6710
|
+
METRIC_ACTIVE_CONNECTIONS_UNSUPPORTED: "This dialect has no connection-count metric",
|
|
6711
|
+
METRIC_QUERY_FAILED: "Metric query failed (see details for backend error)",
|
|
6712
|
+
METRIC_SYSTEM_VIEW_REQUIRED: "Requires database system views or extra privileges",
|
|
6713
|
+
EXPLAIN_UNSAFE_SQL: "Only a single read-only SELECT/WITH/SHOW/EXPLAIN statement can be analyzed",
|
|
6714
|
+
EXPLAIN_MONGODB_UNSUPPORTED: "MongoDB SQL EXPLAIN is unavailable; use aggregation explain",
|
|
6715
|
+
EXPLAIN_DIALECT_UNSUPPORTED: "No safe EXPLAIN channel is available for this dialect",
|
|
6716
|
+
EXPLAIN_FAILED: "EXPLAIN execution failed (see details for backend error)",
|
|
6717
|
+
CONNECTIVITY_FAILED: "Connectivity check failed",
|
|
6718
|
+
TABLE_LIST_UNAVAILABLE: "Table inventory is unavailable; dependent checks were skipped",
|
|
6719
|
+
SQLITE_INTEGRITY_CHECK_FAILED: "SQLite integrity_check did not return ok",
|
|
6720
|
+
MYSQL_CHECK_TABLE_ERROR: "MySQL CHECK TABLE reported an error",
|
|
6721
|
+
COCKROACH_INDEX_VALIDITY_UNSUPPORTED: "CockroachDB has no equivalent read-only index validity check",
|
|
6722
|
+
CLICKHOUSE_INTEGRITY_UNSUPPORTED: "ClickHouse CHECK TABLE cannot run through this SQL channel",
|
|
6723
|
+
ORACLE_INTEGRITY_UNSUPPORTED: "Oracle integrity check needs extra privileges and was skipped",
|
|
6724
|
+
INTEGRITY_UNSUPPORTED: "No read-only integrity check is available for this dialect",
|
|
6725
|
+
UNKNOWN: "Unavailable"
|
|
6726
|
+
},
|
|
6727
|
+
queryType: {
|
|
6728
|
+
select: "Read",
|
|
6729
|
+
write: "Write",
|
|
6730
|
+
ddl: "DDL",
|
|
6731
|
+
other: "Other"
|
|
6732
|
+
},
|
|
6733
|
+
failed: "Failed",
|
|
6734
|
+
resourceLoadFailed: "Failed to load resource metrics",
|
|
6735
|
+
slowQueryLoadFailed: "Failed to load slow queries",
|
|
6736
|
+
explainTitle: "Query Execution Plan",
|
|
6737
|
+
explainUnsupported: "Execution plan is not available for this dialect or statement",
|
|
6738
|
+
explainFailed: "Failed to analyze query",
|
|
6739
|
+
clearFailed: "Failed to clear slow queries",
|
|
6655
6740
|
tableCount: "Table count",
|
|
6656
6741
|
tableCountTooltip: "Table count: {n}",
|
|
6657
6742
|
procedureCount: "Stored procedure count",
|
|
@@ -6736,6 +6821,13 @@ var init_en_US = __esmMin((() => {
|
|
|
6736
6821
|
healthCheckConnection: "Connection Status",
|
|
6737
6822
|
healthCheckTableIntegrity: "Table Integrity",
|
|
6738
6823
|
healthCheckIndexStatus: "Index Status",
|
|
6824
|
+
healthCheckTableInventory: "Table/Collection Inventory",
|
|
6825
|
+
healthCheckIndexStats: "Index Statistics",
|
|
6826
|
+
healthCheckIndexValidity: "Index Validity",
|
|
6827
|
+
healthCheckInvalidIndexes: "{n} invalid indexes",
|
|
6828
|
+
healthCheckIntegrityOk: "Integrity check passed",
|
|
6829
|
+
healthCheckUnsupported: "No read-only integrity check available for this dialect",
|
|
6830
|
+
healthCheckPartial: "Checked the first {n} of {total} tables",
|
|
6739
6831
|
healthCheckDiskSpace: "Disk Space",
|
|
6740
6832
|
unknownError: "Unknown error",
|
|
6741
6833
|
toolTitle: "Tool",
|
|
@@ -6765,6 +6857,7 @@ var init_en_US = __esmMin((() => {
|
|
|
6765
6857
|
disable: "Disable",
|
|
6766
6858
|
noSchedule: "No backup schedules",
|
|
6767
6859
|
unsupportedDialect: "{operation} is not supported for the current database type: {type} (only MySQL/PostgreSQL/MSSQL/Oracle are supported)",
|
|
6860
|
+
maintenanceUnsupported: "{operation} is not supported for the current database type: {type} (equivalent operations are available for MySQL / PostgreSQL / CockroachDB / SQLite only)",
|
|
6768
6861
|
fillUsernamePassword: "Please enter a username and password",
|
|
6769
6862
|
confirmCreateUser: "The following DCL statements will be executed (no automatic rollback). Please confirm:\n{sql}",
|
|
6770
6863
|
confirmCreateUserTitle: "Confirm Create User (DCL)",
|
package/dist/public/layout.js
CHANGED
|
@@ -234,7 +234,7 @@ var init_layout_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
|
234
234
|
setup(__props) {
|
|
235
235
|
const { t } = useI18n();
|
|
236
236
|
const aboutStore = useAboutStore();
|
|
237
|
-
const appVersion = "1.0.
|
|
237
|
+
const appVersion = "1.0.41";
|
|
238
238
|
return (_ctx, _cache) => {
|
|
239
239
|
const _component_router_link = resolveComponent("router-link");
|
|
240
240
|
const _component_router_view = resolveComponent("router-view");
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { n as __esmMin } from "./rolldown-runtime.js";
|
|
2
|
+
import { d as init_vue_runtime_esm_bundler } from "./vue.js";
|
|
3
|
+
import { i as showConfirm, n as init_modal$1, r as showAlert, t as getModalInstance } from "./index.js";
|
|
2
4
|
//#region src/platform/database/utils/theme.ts
|
|
3
5
|
function isDarkTheme() {
|
|
4
6
|
if (typeof document === "undefined") return false;
|
|
@@ -77,6 +79,90 @@ function chartTheme() {
|
|
|
77
79
|
legend: { textStyle: { color: subText } }
|
|
78
80
|
};
|
|
79
81
|
}
|
|
80
|
-
var init_theme = __esmMin((() => {}));
|
|
82
|
+
var init_theme = __esmMin((() => {})), ModalHelper, modal;
|
|
83
|
+
var init_modal = __esmMin((() => {
|
|
84
|
+
init_vue_runtime_esm_bundler();
|
|
85
|
+
init_modal$1();
|
|
86
|
+
ModalHelper = class {
|
|
87
|
+
/**
|
|
88
|
+
* 获取全局modal实例
|
|
89
|
+
*/
|
|
90
|
+
getModal() {
|
|
91
|
+
const instance = getModalInstance();
|
|
92
|
+
if (!instance) {
|
|
93
|
+
console.warn("ModalHelper: Vue实例不存在,使用默认实现");
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
return instance;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 成功提示
|
|
100
|
+
*/
|
|
101
|
+
success(content) {
|
|
102
|
+
const modal = this.getModal();
|
|
103
|
+
if (modal?.success) return modal.success(content);
|
|
104
|
+
return showAlert(content, "success") || Promise.resolve(true);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 错误提示
|
|
108
|
+
*/
|
|
109
|
+
error(content, detail) {
|
|
110
|
+
const modal = this.getModal();
|
|
111
|
+
let errorMessage;
|
|
112
|
+
if (content instanceof Error) {
|
|
113
|
+
errorMessage = content.message;
|
|
114
|
+
console.error("Error details:", {
|
|
115
|
+
name: content.name || detail.name,
|
|
116
|
+
message: content.message || detail.message,
|
|
117
|
+
stack: content.stack || detail.stack
|
|
118
|
+
});
|
|
119
|
+
} else errorMessage = String(content);
|
|
120
|
+
if (modal?.error) return modal.error(errorMessage, detail);
|
|
121
|
+
return showAlert(errorMessage, "error", detail) || Promise.resolve(true);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* 警告提示
|
|
125
|
+
*/
|
|
126
|
+
warning(content) {
|
|
127
|
+
const modal = this.getModal();
|
|
128
|
+
if (modal?.warning) return modal.warning(content);
|
|
129
|
+
return showAlert(content, "warning") || Promise.resolve(true);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* 信息提示
|
|
133
|
+
*/
|
|
134
|
+
info(content) {
|
|
135
|
+
const modal = this.getModal();
|
|
136
|
+
if (modal?.info) return modal.info(content);
|
|
137
|
+
return showAlert(content, "info") || Promise.resolve(true);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* 简单提示(替代alert)
|
|
141
|
+
*/
|
|
142
|
+
alert(content) {
|
|
143
|
+
const modal = this.getModal();
|
|
144
|
+
if (modal?.alert) return modal.alert(content);
|
|
145
|
+
return showAlert(content, "info") || Promise.resolve(true);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* 确认对话框(替代confirm)
|
|
149
|
+
*/
|
|
150
|
+
confirm(content, options) {
|
|
151
|
+
const modal = this.getModal();
|
|
152
|
+
if (modal?.confirm) return modal.confirm({
|
|
153
|
+
...options,
|
|
154
|
+
content
|
|
155
|
+
});
|
|
156
|
+
return showConfirm(content, options) || Promise.resolve(false);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
modal = new ModalHelper();
|
|
160
|
+
modal.info.bind(modal);
|
|
161
|
+
modal.error.bind(modal);
|
|
162
|
+
modal.success.bind(modal);
|
|
163
|
+
modal.warning.bind(modal);
|
|
164
|
+
modal.alert.bind(modal);
|
|
165
|
+
modal.confirm.bind(modal);
|
|
166
|
+
}));
|
|
81
167
|
//#endregion
|
|
82
|
-
export {
|
|
168
|
+
export { isDarkTheme as a, init_theme as i, modal as n, onThemeChange as o, chartTheme as r, init_modal as t };
|