Files
openobserve/src
Subhra264andsai nikhil kethe b0e9fde4b7 fix: return reports list data that ui needs to show (#7274)
### **User description**
Because of the report migration merged recently, there are some fields
that were not getting returned for the list reports api. Also, there was
a bug in the report migration logic where the report frequency stored in
the migrated table was not correct. This pr fixes both the issues.


___

### **PR Type**
Enhancement, Bug fix


___

### **Description**
- Extend ListReports API with time and dashboard fields

- Update migration for align_time and JSON serialization

- Expand query to include dashboards and frequency

- Fix front-end snake_case field mappings


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>reports.rs</strong><dd><code>Expand
ListReportsResponseBodyItem with new fields</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/models/reports.rs

<li>Imported <code>DateTime</code>, <code>ReportFrequency</code>,
<code>ReportTimerange</code><br> <li> Added <code>created_at</code>,
<code>dashboards</code>, <code>frequency</code>, <code>org_id</code>
fields<br> <li> Changed error type to <code>anyhow::Error</code><br>
<li> Introduced <code>ReportDashboard</code> struct and JSON parsing


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7274/files#diff-eddffe2b67f00de168167533f31cd12adbb541fa66af4c56e6a96a03469ec5fb">+38/-7</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>m20250611_000002_populate_reports_table.rs</strong><dd><code>Add
align_time and simplify frequency serialization</code>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/infra/src/table/migration/m20250611_000002_populate_reports_table.rs

<li>Derived <code>Serialize</code> for <code>ReportFrequency</code>
types<br> <li> Added <code>align_time</code> default property<br> <li>
Removed custom <code>ReportFrequency</code> enum<br> <li> Simplified
JSON serialization calls


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7274/files#diff-8247af6d6f8ccb6a5a51daff4cb1e352585be2d1c785d86ae5ebfea1dbc1099c">+12/-55</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>queries.rs</strong><dd><code>Expand
ListReportsQueryResult for report dashboards</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/infra/src/table/reports/queries.rs

<li>Added <code>report_created_at</code>, <code>report_frequency</code>,
<code>org_id</code> fields<br> <li> Joined
<code>report_dashboards</code> and <code>dashboards</code> tables<br>
<li> Included dashboard IDs, tabs, and timerange in query<br> <li>
Updated tests to cover new columns and joins


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7274/files#diff-144c4572241c5b3f13abe628832674ad8cebb72e51acb1d1b14fae2a8307208a">+93/-22</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Bug fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>ReportList.vue</strong><dd><code>Fix ReportList
snake_case field mapping</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/reports/ReportList.vue

<li>Renamed <code>lastTriggeredAt</code> to
<code>last_triggered_at</code><br> <li> Updated data mapping for
<code>last_triggered_at</code>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7274/files#diff-f7d700f7e67fbaba3c58ab5d2c614925db743101828214445ce9dae35dc29067">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>ScheduledDashboards.vue</strong><dd><code>Align
ScheduledDashboards with snake_case response</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/views/Dashboards/ScheduledDashboards.vue

<li>Aligned snake_case for <code>last_triggered_at</code>,
<code>created_at</code>, <code>org_id</code><br> <li> Updated column
labels to match new fields<br> <li> Adjusted data formatting conversions


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7274/files#diff-2aae6e201775bf68f6beb59704f131f7aca0da0fd9d8ba8ac4bdb5b9b289f41e">+6/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

---------

Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
2025-06-26 20:46:42 +05:30
..
2025-06-24 13:47:42 +05:30
2025-06-24 13:47:42 +05:30