Commit Graph
49 Commits
Author SHA1 Message Date
二丫讲梵 69ef418d5f fix(backup): enhance backup configuration and history management 2026-09-09 00:15:12 +08:00
t8y2 4a3d1b1db3 fix(elasticsearch): paginate beyond the result window
Closes #8426
2026-09-08 23:11:14 +08:00
二丫讲梵 0bdf232487 feat(elasticsearch): add hit document view and field type detection 2026-09-04 01:01:32 +08:00
onenewcode e43e36e7a4 fix(elasticsearch): fall back to from size without shard doc 2026-09-01 13:18:42 +08:00
onenewcode 8f3134dce8 feat(elasticsearch): add mapping, settings, stats and clear actions 2026-08-31 22:31:35 +08:00
Lan-zk 73a7b3f2c7 feat(es): paginate past 10k documents via pit and search_after 2026-08-30 03:57:03 +08:00
t8y2 255faf0e4c fix(elasticsearch): support OpenSearch Dashboards proxy XSRF
Closes #7075
2026-08-24 12:37:43 +00:00
zipg e97c9ab5d7 feat(dynamodb): support querying, editing, and exporting 2026-08-17 03:27:44 +08:00
JcEvoX cce36ae058 feat(elasticsearch): allow disabling connectivity checks 2026-08-13 20:11:52 +08:00
JcEvoX 901f5ca3d4 feat(elasticsearch): add index grouping pattern support 2026-08-10 23:38:10 +08:00
Eddy Lei a5e46fd659 feat(query): show database server messages in query results 2026-08-07 15:18:32 +08:00
t8y2 78a61334a5 fix(elasticsearch): preserve legacy type on delete 2026-08-01 13:43:54 +08:00
amwps290 a6a072294a feat(spatial): add SRID-aware geometry previews 2026-07-31 22:31:51 +08:00
t8y2 12373868ec fix(elasticsearch): preserve legacy document type on update 2026-07-31 17:08:21 +08:00
t8y2 350096b4f7 feat(easysearch): add first-class database support 2026-07-30 19:03:09 +08:00
weiyong a49137ae8b feat(elasticsearch): add custom checks and tabular REST results 2026-07-27 18:55:37 +08:00
onenewcode f07509b5ad fix(elasticsearch): correct totals and CAT JSON output 2026-07-23 17:06:23 +08:00
zipg 834ad772c6 feat(elasticsearch): support Kibana proxy connections 2026-07-20 00:53:49 +08:00
onenewcode 5bcad3adc6 feat(mongo): add whole-document JSON editing 2026-07-16 18:21:01 +08:00
zipg da7eedb49c feat(elasticsearch): improve REST commands and visual filters 2026-07-16 16:31:15 +08:00
zipg 9234c33e24 fix(mongodb): preserve BSON dates in copied inserts 2026-07-15 21:01:40 +08:00
t8y2 7a434b0674 fix(elasticsearch): preserve document numeric precision 2026-07-15 16:07:05 +08:00
onenewcode 24c63b6012 feat(elasticsearch): render REST JSON responses 2026-07-12 10:49:25 +08:00
DengQingNian e429c8945b feat(mysql): edit column charset and collation 2026-07-10 15:13:57 +08:00
Guoyu Su a9e679ec7e fix(elasticsearch): parse aggregations before empty hits 2026-07-09 21:25:33 +08:00
t8y2 4e5232b105 fix(elasticsearch): preserve plain text REST responses 2026-07-09 13:32:26 +08:00
onenewcode 1b13d2176b fix(metadata): unify enum column metadata 2026-07-08 21:02:53 +08:00
t8y2 299a9843f3 fix(elasticsearch): pass routing for document writes 2026-07-01 00:43:14 +08:00
t8y2 c57e18bf3e fix: resolve clippy warnings and missing struct fields in tests 2026-06-16 00:55:32 +08:00
t8y2 048549ec0e fix(elasticsearch): encode index path segments 2026-06-15 21:28:25 +08:00
t8y2 0fdff98200 fix(elasticsearch): route rest queries before sql parsing 2026-06-12 17:15:25 +08:00
t8y2 9fbafa9a6d fix(elasticsearch): strip metadata fields from writes 2026-06-11 19:44:58 +08:00
t8y2 bd3585f057 fix: draw selected cell left border for first visible column in canvas mode 2026-06-11 19:35:08 +08:00
t8y2 7923f4915e fix(elasticsearch): apply document filters in browser 2026-06-11 18:56:38 +08:00
John Jin 354d21d086 feat(grid): 列是否可排序 (#935) 2026-06-09 16:43:53 +08:00
t8y2 ee65fa660d fix(db): always bypass system proxy for all HTTP-based database drivers
Replace per-driver proxy bypass logic with a shared http_client_builder()
that always calls .no_proxy(). Previously ES and rqlite only bypassed for
localhost, causing remote connections to be routed through system proxy
(like Clash Verge) and failing — the same issue #922 fixed for ClickHouse.
2026-06-09 16:42:04 +08:00
Yong Studtandt8y2 98342184af feat(elasticsearch): translate SELECT * WHERE to ES DSL in-process (#910)
* feat(elasticsearch): translate SELECT * WHERE to ES DSL in-process

`SELECT *` with clauses our hand-written parser doesn't cover (WHERE, IN, BETWEEN, LIKE, IS NULL, ...) is now parsed with sqlparser-rs and translated to a /_search body locally — we no longer hand it off to ES's _sql endpoint.

Why: _sql refuses several common shapes — LIKE on a text field with no .keyword sub-field (the typical filebeat / log-shipper mapping), and SELECT * over docs containing an array field like host.ip. Both translate cleanly to raw DSL. Going through _sql/translate doesn't help either — that lives in the same ES SQL engine and inherits the same restrictions.

Translation:
- field = 'v'                  → term
- field LIKE 'prefix%'         → prefix (optimised)
- field LIKE '%x%'             → wildcard, case_insensitive
- field IN ('a','b')           → terms
- field BETWEEN a AND b        → range gte/lte
- field >/<>=/<=               → range
- field IS NULL / IS NOT NULL  → bool.must_not.exists / exists
- A AND B AND C                → flattened bool.must
- A OR B                       → bool.should, minimum_should_match: 1
- NOT A                        → bool.must_not
- ORDER BY f ASC|DESC          → sort
- LIMIT N OFFSET M             → size / from

SQL LIKE patterns: % → *, _ → ?, backslash escapes preserved, user-written * / ? in patterns escaped back to literals.

Input runs through the existing adapt_elasticsearch_sql_query first so hyphenated indices (filebeat-7.17.1-…) and @timestamp-style identifiers reach sqlparser as double-quoted identifiers.

Also: 0-hit _search bodies now surface as an empty grid (with an _id column placeholder) instead of falling back to the raw status/response JSON view — `.filter(|h| !h.is_empty())` was masking the empty-result case.

Adds docs/screenshot-es-sql-where.png demonstrating SELECT * with WHERE log.offset = N on a long field — would 400 through _sql, works through the in-process translator.

Follows up on #874.

* chore(test): fill ConnectionConfig::idle_timeout_secs in test fixtures

After the new pub idle_timeout_secs: u64 field was added to ConnectionConfig, 11 #[cfg(test)] / tests fixture constructors still built the struct without it, so `cargo test --workspace --locked` and `cargo clippy --all-targets` would fail with E0063 against the test profile. `cargo check` alone passed because the lib path doesn't compile tests.

Filled in with default_idle_timeout_secs() (matches the field's own #[serde(default = …)]) so future bumps to the default flow through automatically.

---------

Co-authored-by: t8y2 <1156263951@qq.com>
2026-06-09 11:59:49 +08:00
Yong Studt 2628fb8374 feat(elasticsearch): add SQL-model execution with mapping-aware completion
- Route SELECT * FROM <index> through /_search for simple browses; aggregates/projections stay on /_sql
- Drive completion columns from /_mapping (flattened dotted fields, multi-fields)
- Switch editor completion to SQL when the active statement starts with SELECT/WITH on ES
- Skip generic SQL semantic diagnostics for ES (hyphenated wildcard indices caused 500s)
- Wire ES into server-side pagination plan; derive completion context from line blocks
- Fix result-grid pagination exceeding in-memory result sets (allRowsLoaded)
2026-06-08 17:53:05 +08:00
54de28d583 feat(grid): show column data types in result header (#669) (#820)
The data grid header only showed column names, and column types were
available only via tableMeta (open-table view). Arbitrary query results
(e.g. `select * from pg_depend`) therefore showed no type at all, which
is exactly the case the reporter hit.

Backend: add `column_types` to QueryResult (serde-default, backward
compatible) and populate it for the native drivers where the type is
readily available — PostgreSQL, MySQL, SQL Server, ClickHouse. Other
drivers leave it empty for now (no behavior change); schemaless stores
(Mongo/Redis/ES) have no column types.

Frontend: render a type row under each column name in the grid header,
color-coded by type. The type is resolved from tableMeta first (richer,
includes precision) and falls back to the query result's column_types by
index. Add a `showColumnTypesInHeader` setting (default on) and keep the
msgpack tab-result cache compatible. The source-selection logic is
extracted to lib/dataGridColumnType.ts with unit tests.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:45:46 +08:00
t8y2 e3fec0f5d9 fix(elasticsearch): improve local TLS connection handling 2026-06-03 18:29:30 +08:00
田振洲 c03b57c179 feat: add per-connection configurable connect timeout
Add a `connect_timeout_secs` field to ConnectionConfig that allows users
to configure the database connection timeout per connection (1-300s,
default 5s). Previously all connections used a hardcoded 5-second timeout.

- Add connect_timeout_secs field with serde default and clamp logic
- Add parse_connect_timeout_with_fallback to honor URL params over config
- Pass user-configured timeout to all drivers (MySQL, Postgres, Redis,
  MongoDB, ClickHouse, SQL Server, Elasticsearch) and TCP probe
- Add UI input in connection dialog SSH tab
- Add i18n keys for en/zh-CN/es
2026-05-28 14:24:54 +08:00
t8y2 d326cb0ced fix: scope query connections by client session 2026-05-25 17:23:36 +08:00
t8y2 f84335e986 fix(elasticsearch): parse aggregation query results into table format (#344)
Previously, aggregation queries (date_histogram, terms, etc.) with
`size: 0` returned empty results because the empty hits array was
matched but contained no documents, ignoring the aggregations data.
2026-05-20 10:12:20 +08:00
t8y2 f4566221b1 feat(query): add paged result fetching 2026-05-17 00:10:18 +08:00
t8y2 321ebc2636 fix: support HTTPS and self-signed certs for Elasticsearch connections
ES 8.x enables HTTPS with self-signed certs by default. When SSL is
toggled on, use https:// scheme and accept invalid certificates.

Closes #234
2026-05-13 14:07:01 +08:00
t8y2 8bea7e40c3 feat(elasticsearch): support REST queries in SQL editor (#132)
Execute GET/POST/PUT/DELETE queries like Kibana Dev Tools.
Search results are displayed as table rows with _id + _source fields.
Also hide database selector for Elasticsearch connections.
2026-05-07 11:41:33 +08:00
t8y2 41445ff474 chore: add rustfmt.toml and apply unified code formatting 2026-05-05 14:16:18 +08:00
t8y2 edcdd652ae fix(connection): reduce failed connection timeout
Closes #86
2026-05-05 14:13:07 +08:00
t8y2 cf4f25fd52 feat: extract dbx-core crate for web deployment support
Refactor all database drivers, query execution, schema operations, and
business logic into a shared `dbx-core` crate. The Tauri desktop app
becomes a thin shell delegating to dbx-core, enabling future web and
CLI frontends to reuse the same core.
2026-05-05 03:16:24 +08:00