Commit graph

67 commits

Author SHA1 Message Date
Aditya Pimpalkar
051276fc17
feat: add pie chart as dashboard tile (#1704)
Co-authored-by: Aaron Knudtson <87577305+knudtty@users.noreply.github.com>
2026-02-20 11:00:58 -05:00
Tom Alexander
ec54757e1d
feat: Add confirm dialog when closing tile editor w/ changes (#1746)
Fixes: HDX-3201

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-19 18:07:20 +00:00
Drew Davis
5988850a64
fix: Prevent sampled events error when HAVING clause is specified (#1755)
Closes HDX-3442

# Summary

This PR fixes an error in the sampled events panel when a HAVING clause is specified. To fix the error, the HAVING clause is removed from the sampled events config, similar to how the GROUP BY is removed.

## Before

<img width="1498" height="1251" alt="Screenshot 2026-02-19 at 7 33 19 AM" src="https://github.com/user-attachments/assets/6f5ca4d3-7954-4e74-86cc-a335663ca299" />

## After

<img width="1496" height="1272" alt="Screenshot 2026-02-19 at 7 33 32 AM" src="https://github.com/user-attachments/assets/f05101a5-e88f-4a6f-966a-e387c79b96d0" />
2026-02-19 14:14:55 +00:00
Mike Shi
6241c38892
Metric Attribute Explorer (#1703)
<img width="1369" height="1157" alt="image" src="https://github.com/user-attachments/assets/592640b1-9e24-426d-886b-a3afb51410aa" />

Fixes HDX-2282
2026-02-06 15:34:09 +00:00
Drew Davis
3859ceb2d2
test: Add E2E tests for external dashboard APIs (#1691)
Closes HDX-3311

# Summary

This PR adds E2E tests that verify that dashboards created and edited through the external API can be rendered correctly in the UI.

- The tests create a dashboard with all tile types through the external API, then assert that the tile edit form contains the correct values for all of the tile's properties.
- The tests verify that the dashboard can be saved from the UI, proving that the dashboard data conforms to the _internal_ dashboard API's schema, after being created by the external dashboards API
- The tests also validate that dashboard updates and deletes via the external API are reflected in the UI.
2026-02-04 12:36:55 +00:00
Drew Davis
b2089fa998
fix: Prevent dashboard error when metricName is defined for non-metric source (#1649)
Closes HDX-3236

# Summary

This PR fixes an error that occurs when a metricName/metricType is set for a dashboard tile configuration, despite the queried source not being a metric source.

1. Updates in DBEditTimeChartForm prevent us from saving configurations with metricName/metricType for non metric sources
2. Updates in DBDashboardPage ensure that metricName/metricType is ignored for any saved configurations for non-metric sources.

## Demo

A new tile would be saved with a metricName/Type incorrectly when

1. Create the tile
2. Select a metric source
3. Select a metric name
4. Switch back to a non-metric source
5. Save

And the Dashboard tile would then error:

<img width="1288" height="1012" alt="Screenshot 2026-01-23 at 2 39 38 PM" src="https://github.com/user-attachments/assets/4fa4b0bf-355e-47bb-a504-cd03e0dca2d0" />

Now, the configuration is not saved with metricName/Type, and the dashboard does not error for a saved configuration that has a metricName/Type:

<img width="769" height="423" alt="Screenshot 2026-01-23 at 2 43 04 PM" src="https://github.com/user-attachments/assets/92af36aa-dd46-47b8-ae59-d0e4bfcb28af" />
2026-01-23 20:04:20 +00:00
Drew Davis
1603602564
feat: Add HAVING filter to Tables (#1644)
Closes HDX-3230

# Summary

This PR adds a SQL HAVING input to the DBEditTimeChart form when creating table charts.

## Demo

https://github.com/user-attachments/assets/e0ca7de3-a222-473c-9551-696ca6f5c4e2
2026-01-23 14:00:49 +00:00
Drew Davis
ddc54e43f0
feat: Allow customizing empty-period fill value (#1617)
Closes HDX-3220
Closes HDX-1718
Closes HDX-3205

# Summary

This PR adds an option that allows users to customize the 0-fill behavior on time charts. The default behavior remains to fill all empty intervals with 0. The user can now disable the filling behavior. When fill is disabled, series will appear to be interpolated.

This PR also consolidates various display settings into a drawer, replacing the existing Number Format drawer. In the process, various form-related bugs were fixed in the drawer, and micro/nano second input factors were added.

## New Chart Display Settings Drawer

<img width="1697" height="979" alt="Screenshot 2026-01-20 at 9 10 59 AM" src="https://github.com/user-attachments/assets/1683666a-7c56-4018-8e5b-2c6c814f0cd2" />

## Zero-fill behavior

Enabled (default):

<img width="1458" height="494" alt="Screenshot 2026-01-20 at 9 12 45 AM" src="https://github.com/user-attachments/assets/0306644e-d2ff-46d6-998b-eb458d5c9ccc" />

Disabled:

<img width="1456" height="505" alt="Screenshot 2026-01-20 at 9 12 37 AM" src="https://github.com/user-attachments/assets/f084887e-4099-4365-af4f-73eceaf5dc3d" />
2026-01-21 22:13:16 +00:00
Elizabet Oliveira
5b3ce9fc7c
Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
Himanshu Kapoor
190c66b8df
fix: Validate column names when saving dashboard tiles (#1615)
Similar to https://github.com/hyperdxio/hyperdx/pull/1597, verify column names for validation errors when saving dashboard tiles too.


https://github.com/user-attachments/assets/ff9ec648-47da-433f-abe0-cc779aba1a76
2026-01-16 13:11:00 +00:00
Himanshu Kapoor
ac3082a5ac
fix: Validate column name for metrics when creating charts (#1597)
When creating a chart, validate input before executing the query, so that we show a validation error instead of a query execution error if the column name is empty. The error state on a particular input is cleared once the input is populated.

Fixes HDX-1792.

Screenshots

## Before:

<img width="2599" height="791" alt="image" src="https://github.com/user-attachments/assets/3965d6d1-4e2f-444d-80ac-70ba4f148afa" />

## After:

### Error state:

<img width="2184" height="1438" alt="CleanShot 2026-01-13 at 19 57 17@2x" src="https://github.com/user-attachments/assets/86bb5e60-7d60-4f38-a30c-170524dd32d4" />

### Video:


https://github.com/user-attachments/assets/27382379-cb10-43cb-acd4-8f97cc257511
2026-01-15 15:23:20 +00:00
Drew Davis
158ccefa3f
refactor: Add ChartContainer component with toolbar (#1560) 2026-01-07 15:29:35 -05:00
Drew Davis
725dbc2f3b
feat: Align date ranges to chart and MV granularity (Line/Bar charts) (#1533)
Closes HDX-3067
Closes #1331 
Closes #1212 
Closes #1468

# Summary

This PR makes a number of improvements around the way we handle date ranges and granularities, in an effort to minimize discrepancies between aggregate values queried from original data and aggregate values queried from materialized views.

1. Date ranges for Line and Bar chart queries are now (by default) auto-aligned to the chart's granularity. **This is not limited to materialized view queries.** Since the chart granularity is a multiple of the MV granularity, this ensures that the date range is aligned to the MV granularity as well. This also address a number of related issues that point out 0-values or low-values in the first or last data points. This PR also includes an option to disable this behavior for charts in Chart Explorer or Dashboard Tiles.
2. All materialized view queries and all time chart queries are now end-exclusive, to avoid selecting the entirety of the next "time bucket" from the materialized view when the date range is aligned with the materialized view granularity
3. Materialized views are only used for a query with a granularity if the chart query granularity is a multiple of the MV granularity. Previously, we'd use the MV as long as the chart query granularity was at least as large as the MV granularity, but this could cause unequal distributions of data across time buckets. Nearly all available granularities are multiples of all smaller available granularities - so this should only impact queries with granularity 15 minutes with MVs with granularity 10 minutes. 10m granularity support is being removed in #1551 

## Demo

<details>
<summary>Show Complete Intervals Option</summary>

https://github.com/user-attachments/assets/4b903adb-4edf-4481-93d6-2a0c42589a37
</details>
2026-01-07 19:02:14 +00:00
Drew Davis
8213d69b8e
fix: Ensure displayed configs match queried configs in chart explorer (#1527)
Closes HDX-3089
Closes HDX-3083

# Summary

This PR ensures that the Generated SQL and Materialized View Explanations are generated for the same config that is queried. 

Previously, this was not the case because child components (eg. DBTableChart, DBTimeChart, DBNumberChart) would transform the config passed down by DBEditTimeChart or Dashboard.Tile. Now, the same transformations are applied at the parent component.

## Demo

<details>
<summary>Table Tile MV Indicator now correctly ignores granularity</summary>

Note that the time chart tiles cannot use MVs because the granularity is too small, but the table tile can use the MV:

<img width="1495" height="884" alt="Screenshot 2025-12-29 at 9 00 16 AM" src="https://github.com/user-attachments/assets/324d3511-6b86-4bd8-87b0-824b4586bb9b" />
</details>

<details>
<summary>Number and Table Chart generated SQL is correct</summary>

Number Chart has no granularity, group, or order by:

<img width="1493" height="830" alt="Screenshot 2025-12-29 at 9 14 08 AM" src="https://github.com/user-attachments/assets/34202de1-1d55-4675-9883-e15418f2bb2f" />

Table Chart has implicit group by, limit, and order by applied:

<img width="1495" height="837" alt="Screenshot 2025-12-29 at 9 14 00 AM" src="https://github.com/user-attachments/assets/2aa17106-527a-4e34-a76a-a6c1767a1e86" />

</details>
2026-01-06 16:02:02 +00:00
Drew Davis
e78960f3bb
style: Fix style inconsistencies (#1536)
# Summary

This PR fixes various minor style issues and inconsistencies throughout the app.

## Changes

| Consistent ... Button Size in DBEditTimeChart | |
| ----------- | ------ |
| Before | <img width="708" height="74" alt="Screenshot 2025-12-30 at 8 23 01 AM" src="https://github.com/user-attachments/assets/6d6a967d-d5d6-474c-8ff8-4983b0560c5a" /> | 
| After | <img width="708" height="88" alt="Screenshot 2025-12-30 at 8 19 09 AM" src="https://github.com/user-attachments/assets/78cc0ca6-ab2e-4ac3-8c9e-5cd7bbd1bb58" /> |

| Add gap between DBEditTimeChart buttons | |
| ----------- | ------ |
| Before | <img width="415" height="63" alt="Screenshot 2025-12-30 at 8 25 54 AM" src="https://github.com/user-attachments/assets/10ee3481-5753-438d-8685-dc7174afc00c" /> | 
| After | <img width="443" height="58" alt="Screenshot 2025-12-30 at 8 25 23 AM" src="https://github.com/user-attachments/assets/6fe6321f-1dc6-4655-9945-495864847881" />|

| Replace spinner-border with working loading indicators | |
| ----------- | ------ |
| Before (loading indicators missing) | <img width="455" height="324" alt="Screenshot 2025-12-30 at 8 32 34 AM" src="https://github.com/user-attachments/assets/9556cd76-dc2c-40cb-8115-2f0ac21ce120" /> | 
| After | <img width="448" height="242" alt="Screenshot 2025-12-30 at 8 32 46 AM" src="https://github.com/user-attachments/assets/e496abe8-81b6-4d9c-b2f5-c6b4346c3966" /> <img width="236" height="51" alt="Screenshot 2025-12-30 at 8 43 25 AM" src="https://github.com/user-attachments/assets/cbaccd4a-53df-4cd4-a9a6-80a77cdd4e98" /> <img width="206" height="68" alt="Screenshot 2025-12-30 at 8 43 30 AM" src="https://github.com/user-attachments/assets/9db4bb86-52e8-4dc5-ac08-a2efb941a5e5" /> |

| Make histogram display switch consistent with other charts | |
| ----------- | ------ |
| Before | <img width="755" height="474" alt="Screenshot 2025-12-30 at 8 54 57 AM" src="https://github.com/user-attachments/assets/ccb739b3-45c4-4310-8599-79596c05ae6f" /> | 
| After | <img width="377" height="224" alt="Screenshot 2025-12-30 at 8 54 24 AM" src="https://github.com/user-attachments/assets/b767801c-d8cd-4dbf-86db-ba5d97cde7ba" /> |

| Make dashboard toolbar gaps consistent | |
| ----------- | ------ |
| Before | <img width="889" height="63" alt="Screenshot 2025-12-30 at 9 00 22 AM" src="https://github.com/user-attachments/assets/2c210a00-18cf-41d3-8ded-61d061e1be93" /> | 
| After | <img width="884" height="56" alt="Screenshot 2025-12-30 at 8 59 16 AM" src="https://github.com/user-attachments/assets/0d90238e-74b9-4692-8a8e-ac8bbdd3d8d9" /> |

| Make DBEditTimeChart play button margin consistent | |
| ----------- | ------ |
| Before | <img width="670" height="146" alt="Screenshot 2025-12-30 at 9 04 44 AM" src="https://github.com/user-attachments/assets/4705083b-8308-41d0-987d-9d2fa6eefc80" /> | 
| After | <img width="671" height="173" alt="Screenshot 2025-12-30 at 9 03 31 AM" src="https://github.com/user-attachments/assets/10da8177-480f-4bb5-b54d-1f4e69e89a47" /> |
2025-12-30 17:02:35 +00:00
Tom Alexander
468eb92481
chore: update watch uses to useWatch (#1516)
Fixes: HDX-3101

Co-authored-by: Brandon Pereira <7552738+brandon-pereira@users.noreply.github.com>
2025-12-23 16:34:48 +00:00
Drew Davis
a5a04aa92c
feat: Add materialized view support (Beta) (#1507)
Closes HDX-3082

# Summary

This PR back-ports support for materialized views from the EE repo. Note that this feature is in **Beta**, and is subject to significant changes.

This feature is intended to support:

1. Configuring AggregatingMergeTree (or SummingMergeTree) Materialized Views which are associated with a Source
2. Automatically selecting and querying an associated materialized view when a query supports it, in Chart Explorer, Custom Dashboards, the Services Dashboard, and the Search Page Histogram.
3. A UX for understanding what materialized views are available for a source, and whether (and why) it is or is not being used for a particular visualization.

## Note to Reviewer(s)

This is a large PR, but the code has largely already been reviewed.

- For net-new files, types, components, and utility functions, the code does not differ from the EE repo
- Changes to the various services dashboard pages do not differ from the EE repo
- Changes to `useOffsetPaginatedQuery`, `useChartConfig`, and `DBEditTimeChart` differ slightly due to unrelated (to MVs) drift between this repo and the EE repo, and due to the lack of feature toggles in this repo. **This is where slightly closer review would be most valuable.**

## Demo

<details>
<summary>Demo: MV Configuration</summary>

https://github.com/user-attachments/assets/fedf3bcf-892c-4b8d-a788-7e231e23bcc3
</details>

<details>
<summary>Demo: Chart Explorer</summary>

https://github.com/user-attachments/assets/fc8d1efa-7edc-42fc-98f0-75431cc056b8
</details>

<details>
<summary>Demo: Dashboards</summary>

https://github.com/user-attachments/assets/f3cb247e-711f-4d90-95b8-cf977e94f065
</details>

## Known Limitations

This feature is in Beta due to the following known limitations, which will be addressed in subsequent PRs:

1. Visualization start and end time, when not aligned with the granularity of MVs, will result in statistics based on the MV "time buckets" which fall inside the date range. This may not align exactly with the source table data which is in the selected date range.
2. Alerts do not make use of MVs, even if the associated visualization does. Due to (1), this means that alert values may not exactly match the values shown in the associated visualization.

## Differences in OSS vs EE Support

 - In OSS, there is a beta label on the MV configurations section
 - In EE there are feature toggles to enable MV support, in OSS the feature is enabled for all teams, but will only run for sources with MVs configured.

## Testing

To test, a couple of MVs can be created on the default `otel_traces` table, directly in ClickHouse:

<details>

<summary>Example MVs DDL</summary>

```sql
CREATE TABLE default.metrics_rollup_1m
(
    `Timestamp` DateTime,
    `ServiceName` LowCardinality(String),
    `SpanKind` LowCardinality(String),
    `StatusCode` LowCardinality(String),
    `count` SimpleAggregateFunction(sum, UInt64),
    `sum__Duration` SimpleAggregateFunction(sum, UInt64),
    `avg__Duration` AggregateFunction(avg, UInt64),
    `quantile__Duration` AggregateFunction(quantileTDigest(0.5), UInt64),
    `min__Duration` SimpleAggregateFunction(min, UInt64),
    `max__Duration` SimpleAggregateFunction(max, UInt64)
)
ENGINE = AggregatingMergeTree
PARTITION BY toDate(Timestamp)
ORDER BY (Timestamp, StatusCode, SpanKind, ServiceName);

CREATE MATERIALIZED VIEW default.metrics_rollup_1m_mv TO default.metrics_rollup_1m
(
    `Timestamp` DateTime,
    `ServiceName` LowCardinality(String),
    `SpanKind` LowCardinality(String),
    `version` LowCardinality(String),
    `StatusCode` LowCardinality(String),
    `count` UInt64,
    `sum__Duration` Int64,
    `avg__Duration` AggregateFunction(avg, UInt64),
    `quantile__Duration` AggregateFunction(quantileTDigest(0.5), UInt64),
    `min__Duration` SimpleAggregateFunction(min, UInt64),
    `max__Duration` SimpleAggregateFunction(max, UInt64)
)
AS SELECT
    toStartOfMinute(Timestamp) AS Timestamp,
    ServiceName,
    SpanKind,
    StatusCode,
    count() AS count,
    sum(Duration) AS sum__Duration,
    avgState(Duration) AS avg__Duration,
    quantileTDigestState(0.5)(Duration) AS quantile__Duration,
    minSimpleState(Duration) AS min__Duration,
    maxSimpleState(Duration) AS max__Duration
FROM default.otel_traces
GROUP BY
    Timestamp,
    ServiceName,
    SpanKind,
    StatusCode;
```

```sql
CREATE TABLE default.span_kind_rollup_1m
(
    `Timestamp` DateTime,
    `ServiceName` LowCardinality(String),
    `SpanKind` LowCardinality(String),
    `histogram__Duration` AggregateFunction(histogram(20), UInt64)
)
ENGINE = AggregatingMergeTree
PARTITION BY toDate(Timestamp)
ORDER BY (Timestamp, ServiceName, SpanKind);

CREATE MATERIALIZED VIEW default.span_kind_rollup_1m_mv TO default.span_kind_rollup_1m
(
    `Timestamp` DateTime,
    `ServiceName` LowCardinality(String),
    `SpanKind` LowCardinality(String),
    `histogram__Duration` AggregateFunction(histogram(20), UInt64)
)
AS SELECT
    toStartOfMinute(Timestamp) AS Timestamp,
    ServiceName,
    SpanKind,
    histogramState(20)(Duration) AS histogram__Duration
FROM default.otel_traces
GROUP BY
    Timestamp,
    ServiceName,
    SpanKind;
```
</details>

Then you'll need to configure the materialized views in your source settings:

<details>
<summary>Source Configuration (should auto-infer when MVs are selected)</summary>

<img width="949" height="1011" alt="Screenshot 2025-12-19 at 10 26 54 AM" src="https://github.com/user-attachments/assets/fc46a1b9-de8b-4b95-a8ef-ba5fee905685" />

</details>
2025-12-19 16:17:23 +00:00
Brandon Pereira
61cb9425b0
only run sample query when visible (#1499)
Improves the Chart Explorer page to only run the sample query when the accordion is open and visible. Also changed default to closed since it's below the fold.

@pulpdrew assigned to you as you originally observed this issue

Demo:
https://github.com/user-attachments/assets/6108323a-767f-4e9f-88cf-4b9e2de9def1

Fixes HDX-2895
2025-12-18 15:34:17 +00:00
Brandon Pereira
4ba37e557c
Remove Bootstrap Icons (#1480)
This PR removes bootstrap-icons entirely from the app. It also adds an eslint plugin to detect uses and throw an error, this will help in the immediate short term with PRs in flight and merging downstream.

Fixes HDX-3050
2025-12-15 17:06:40 +00:00
Tom Alexander
780279fdb7
feat: Save tile to dashboard from chart explorer (#1471)
Fixes: HDX-3043
Fixes #1470

Disabled for local mode, but works on server-backed instances. 
Testing steps:
1) Open Chart Explorer
2) Build a chart
3) Click the hamburger menu to the right of the Green play button
4) Select Save to Dashboard
5) Choose an existing Dashboard to save to.
6) Repeat 1-4 but with a new dashboard.
7) repeat 1-4 with different chart types

<img width="1471" height="315" alt="image" src="https://github.com/user-attachments/assets/5bc5ca57-ac4f-4f6c-8de9-ae77691c2303" />

<img width="692" height="519" alt="image" src="https://github.com/user-attachments/assets/58639bbb-5389-4a1c-935b-092f0e5a29e2" />
2025-12-12 19:55:51 +00:00
Drew Davis
fce307c8ce
feat: Allow specifying persistent order by in chart table (#1438)
Closes HDX-2845

# Summary

This PR adds support for specifying a persistent Order By in table charts. Previously, the user could sort by clicking a column, but this was not persisted to the saved chart config. Now, we show an input that allows the user to specify an ordering other than the default, and this order is persisted in the saved chart config.

## Demo

https://github.com/user-attachments/assets/960642fd-9749-4e54-9b84-ab82eb5af3d8
2025-12-05 15:21:26 +00:00
Tom Alexander
52d2798582
chore: Update to next 16, react 19, add react compiler (#1434)
fixes: HDX-2956

Co-authored-by: Brandon Pereira <7552738+brandon-pereira@users.noreply.github.com>
2025-12-04 23:40:59 +00:00
Aaron Knudtson
815e6424a0
chore: add lint rules to treat missing hook dependencies as errors (#1420)
Tested on each of the spots that had hooks that were changed, seems good
2025-12-01 19:12:46 -05:00
Brandon Pereira
337be9a2d1
Deeplink to Search From Charts and Tables (#1410)
This PR adds the ability to click on tables or graphs across the app, and be able to deep link into the search page to view the correlated search events. 

https://github.com/user-attachments/assets/e5c7c2f2-9b59-42de-bb73-2fa4cb5d09a2


Things to try:

1. **Attributable Functions** (min, max, average, p95, etc) can all reliably give us a y value back to enable filtering directly to the y-values value
2. **Non-attributable Functions** (count, sum, etc) can’t rely on the y value since it depends on the group by logic. As such, these will simply allow you to search by the service without passing the y value for deeper analysis.
3. **Multiple Group Bys** (ex `ServiceName, SpanName`)
4. **Where Clause** (SQL or Lucene)
5. Do a **general test** across the app to ensure everywhere that uses charting behaves the same or better than before.

Some things that don’t work:

1. **Aliases in the group by** - we are hitting limitations with `node-sql-parser` that causes the aliasMap to not generate correctly when using aggregate functions in most cases. We may need to either fix these issues or find an alternative solution.
2. **Expressions in Group By** - If you have expressions in the group by, the filtering will not work based on the current implementation, it does not factor in the result of the expression in the filter value.
3. **Filters are not reflected in the UI on Search** - When you deeplink, the filters in the sidebar do not reflect what is actually being queried. This is because the filter UI logic uses `IN` but the deeplinking uses `=` to achieve the best level of precision (and avoid false positives). As such, this is something that could be improved in the future.

Fixes HDX-2844, HDX-2922
2025-11-28 21:25:22 +00:00
Drew Davis
586bcce7f1
feat: Add previous period comparisons to line chart (#1414)
Closes HDX-2777

# Summary

This PR adds a toggle that enables showing "previous period" data on line charts, overlayed with the current period data.

1. The "previous period" is a date range of the same length as the selected "current" date range, immediately prior to the current date range.
2. This feature is only enabled for line charts, bar charts are not enabled when this option is toggled on.

**This PR is organized into a number of commits which may be easier to review one at a time.**

## Followup work

- Improve layout of the DBEditTimeChartForm, pending design review

## Demo

https://github.com/user-attachments/assets/76b220da-810e-4280-8fb3-fa20a9919685
2025-11-26 21:49:14 +00:00
Elizabet Oliveira
af6a8d0dac
Refactor: Remove bootstrap, adopt semantic tokens, and improve Mantine UI usage (#1347) 2025-11-14 18:01:54 +00:00
Brandon Pereira
43dfb3aaff
chore to move critical path files (#1314)
moves them into a core folder, this allows us to easily track when core files are modified via path

no changeset because no version bump required

fixes HDX-2589
2025-10-30 15:16:33 +00:00
Drew Davis
6262ced8ce
fix: Fix crash when navigating away from chart explorer search page (#1278) 2025-10-17 11:16:47 -04:00
Mike Shi
b8efb4924c
chart ai assistant (#1243) 2025-10-07 14:47:10 -04:00
Aaron Knudtson
5210bb86a4
refactor: table connections standardized and single by default. Special case for dashboard (#1195)
Closes HDX-2469
2025-10-02 21:33:53 +00:00
Elizabet Oliveira
730325a5cc
feat: enhance SourceSchemaPreview button integration in select components (#1223) 2025-09-30 15:22:45 +01:00
Tom Alexander
83b9c8a4b7
chore: Add playwright tests for app in local-only mode (#1181)
Fixes: HDX-2442
2025-09-20 01:43:08 +00:00
Mike Shi
5a44953e49
feat: Add new none aggregation function to allow fully user defined aggregations in SQL (#1174)
<img width="1956" height="851" alt="image" src="https://github.com/user-attachments/assets/3ca89db9-484b-4e74-88a5-4c31b6a96aef" />
2025-09-19 21:17:40 +00:00
Drew Davis
0183483a9a
feat: Add source schema previews (#1182)
Closes HDX-2404

This PR adds a new info icon next to various Source pickers, which when clicked opens a modal that shows the schema(s) for the table(s) associated with the source.

<details>
<summary>On the search page</summary>
<img width="483" height="263" alt="Screenshot 2025-09-18 at 1 57 14 PM" src="https://github.com/user-attachments/assets/84437e6d-f9da-4885-af87-b72767681b61" />
<img width="1367" height="923" alt="Screenshot 2025-09-18 at 4 15 12 PM" src="https://github.com/user-attachments/assets/1fe259f7-2cbf-480b-b3c3-5e94a298dd07" />
</details>

<details>
<summary>In the source form</summary>
<img width="1122" height="657" alt="Screenshot 2025-09-18 at 1 57 57 PM" src="https://github.com/user-attachments/assets/0ffa3bfb-46df-45e6-8a64-188f52d7d1cb" />
<img width="1244" height="520" alt="Screenshot 2025-09-18 at 1 58 11 PM" src="https://github.com/user-attachments/assets/0c4fb035-afb0-4eda-8bdc-3d8b3ccd34c9" />
</details>

<details>
<summary>In the chart explorer</summary>
<img width="559" height="221" alt="Screenshot 2025-09-18 at 1 57 33 PM" src="https://github.com/user-attachments/assets/8ea84e73-eb5d-445a-9faa-0180b5b9b8f9" />
</details>

<details>
<summary>Multiple schemas are shown when a metric source is chosen</summary>
<img width="890" height="1044" alt="Screenshot 2025-09-18 at 4 14 37 PM" src="https://github.com/user-attachments/assets/f2463435-e9f5-4253-a3cb-2c76a74ea18e" />
</details>
2025-09-19 15:02:15 +00:00
Mike Shi
0cf8556d47
feat: Allow chart series to be reodered (#1173)
Resolves HDX-2143

<img width="1965" height="625" alt="image" src="https://github.com/user-attachments/assets/83c77653-78d5-445c-b0a4-c3c96f1d2dbd" />
2025-09-17 20:03:46 +00:00
Brandon Pereira
7a0580590d
Reusable DBSqlRowTableWithSideBar Component (#1171)
Across the app, we are inconsistent with when we can open the sidebar and expand functionality. This is because the sidebar and logic was managed by the parent component.

Additionally, the expand logic was set to assume a certain structure that some places in the application could not support (ex clickhouse dashboard doesn't have a 'source'). 

As a result, I have created the `DBSqlRowTableWithSideBar` component which will manage a lot of the common use cases for us. This PR introduces that new component, and updates all references (that could be easily upgraded) to use the new component when applciable.

The result: a lot less duplicate code (see # of lines removed) and the ability to more easily maintain the components down the road.

This PR also fixes several bugs I found as I tested these flows, especially around sidebars opening subpanels.

Fixes: HDX-2341
2025-09-17 19:58:45 +00:00
Drew Davis
fa45875d38
feat: Add delta() function for gauge metrics (#1147) 2025-09-11 17:10:43 -04:00
Tom Alexander
deff04f67b
feat: Allow for inline expansion of items in search tables (#1145)
Fixes: HDX-2296

When a user clicks the ">" icon, the row is expanded and live tail is paused.
<img width="1882" height="451" alt="image" src="https://github.com/user-attachments/assets/4b4f12e0-df80-49b0-b917-455b213b4f3a" />

The user is able to interact with with the inline view as well
<img width="1823" height="334" alt="image" src="https://github.com/user-attachments/assets/e0c1acfc-7523-470d-b385-343c6e84ad9f" />

The user can click the expand button in the top right to open the sidebar
<img width="258" height="180" alt="image" src="https://github.com/user-attachments/assets/40b40c59-29a8-44fc-a310-6b55121029b4" />

The tab last chosen by the user persists in local storage

Clicking on an item in the table results in the sidebar opening as it does today.

These changes also:
* Disable the chevron in places where the sidebar is not hooked up today
* Disables interactivity of Event Tags if it doesn't have the proper events passed into it as well.
2025-09-09 01:59:01 +00:00
Brandon Pereira
c691e94876
fix: position SQL editor autocompletion tooltips correctly within modals (#1135)
https://linear.app/clickhouse/issue/HDX-2062/bug-group-by-autocomplete-cuts-off-in-tile-editor-in-dashboards
2025-09-04 18:25:40 +00:00
Elizabet Oliveira
fb66126e06
fix: remove play button and time picker from markdown tab (#1141)
This PR fixes: HDX-1641

The Linear issue only mentions:

> The Run button on the Markdown form doesn't do anything

However, in **Charts Explorer → Markdown**, the time picker also wasn’t working. I’ve removed it as well.

<img width="2681" height="2048" alt="image" src="https://github.com/user-attachments/assets/6f6b7fc5-544f-43e2-ab9d-05894f83e8d6" />
2025-09-04 17:31:00 +00:00
Dan Hable
c0b188c1c5
feat: Store createdBy user ids on alert documents (#1058)
We now store `createdBy` in the `Alert` document when the alert
is created. This new field references the `User` document of the
currently logged in user. The property is optional to support
existing alerts in the database.

This information is also displayed in various places where alert
details are displayed. Older documents without the new field should
display nothing, resulting in the existing UX.
2025-08-12 15:21:17 +00:00
Mike Shi
33fc071dfa
feat: Allow users to define custom column aliases for charts (#996)
<img width="1337" height="988" alt="image" src="https://github.com/user-attachments/assets/80d83541-3fa9-4ebb-b54c-3caccbd86e90" />

Resolves HDX-1719
2025-07-15 14:08:29 +00:00
Mike Shi
973b9e8d0a
feat: Add any aggFn support, fix select field input not showing up (#991)
Closes HDX-2011

Co-authored-by: Tom Alexander <3245235+teeohhem@users.noreply.github.com>
2025-07-11 14:20:09 +00:00
Aaron Knudtson
d1f4184536
perf: reduce DBSearchPage and DBChartExplorerPage rerenders from typing in search input (#924) 2025-06-20 10:12:23 -04:00
Aaron Knudtson
d176b54b4e
fix: chartpage querying too on every keystroke after initial query (#870) 2025-05-28 17:58:31 -04:00
Ernest Iliiasov
a36c2290df
fix: Fix editing search tiles in dashboard (#820)
Fix the issue with `select` field becoming an empty array for Search tiles.
2025-05-17 19:12:23 +00:00
Ernest Iliiasov
32b55e7327
fix: Fix Search tile preview when editing (#819)
Fixes this flow:
- create new dashboard
- create new search tile
- save
- attempt to edit that tile
- hit preview
2025-05-16 03:38:14 +00:00
Mike Huang
8dc83c3d4e
enable float threshold for chart alert (#773)
- add new schema to support float threshold for chart alert
<img width="882" alt="image" src="https://github.com/user-attachments/assets/dd563bf2-9ae9-4c8f-ad63-731d8815518a" />

Tested alert:
<img width="1256" alt="image" src="https://github.com/user-attachments/assets/92683d01-ada4-48e7-bd2b-567aba949e4b" />



Ref: hdx-1640
2025-04-24 17:44:57 +00:00
Aaron Knudtson
2f626e1f30
fix: add optional metric name filtering to useAllFields (#757)
Fixes: HDX-1600
2025-04-18 01:58:01 +00:00
Warren
b16c8e1429
feat: compute charts ratio (#756)
Ref: HDX-1607

Support ratio for both events and metrics charts

<img width="1504" alt="image" src="https://github.com/user-attachments/assets/e563c609-b48f-4217-bf6a-b11c5e075435" />
2025-04-17 04:50:19 +00:00