Skip to content

Commit 3c27372

Browse files
author
ci bot
committed
Merge branch 'aarthy/fixes' into 'enterprise'
Bug fixes on Monitors See merge request dkinternal/testgen/dataops-testgen!411
2 parents efd188b + 43e8156 commit 3c27372

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

testgen/commands/run_profiling.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ def update_frequency_progress(progress: ThreadedProgress) -> None:
250250
LOG.info("Updating profiling results with frequency analysis and deleting staging")
251251
execute_db_queries(sql_generator.update_frequency_analysis_results())
252252
except Exception as e:
253+
LOG.exception("Error running frequency analysis")
253254
profiling_run.set_progress("freq_analysis", "Warning", error=f"Error encountered. {get_exception_message(e)}")
254255
else:
255256
if error_data:
@@ -290,6 +291,7 @@ def _run_hygiene_issue_detection(sql_generator: ProfilingSQL) -> None:
290291
]
291292
)
292293
except Exception as e:
294+
LOG.exception("Error detecting hygiene issues")
293295
profiling_run.set_progress("hygiene_issues", "Warning", error=f"Error encountered. {get_exception_message(e)}")
294296
else:
295297
profiling_run.set_progress("hygiene_issues", "Completed")

testgen/ui/components/frontend/js/components/table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const Table = (options, rows) => {
201201
{class: 'tg-table-empty-state-body'},
202202
tr(
203203
td(
204-
{colspan: dataColumns.length},
204+
{colspan: dataColumns.val.length},
205205
options.emptyState,
206206
),
207207
),

testgen/ui/components/frontend/js/pages/monitors_dashboard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ const MonitorsDashboard = (/** @type Properties */ props) => {
295295
onTagClick: (type) => {
296296
const current = anomalyTypeFilterValue.val;
297297
const newFilter = current.length === 1 && current[0] === type ? null : type;
298-
emitEvent('SetParamValues', { payload: { anomaly_type_filter: newFilter } });
298+
emitEvent('SetParamValues', { payload: { anomaly_type_filter: newFilter, current_page: 0 } });
299299
},
300300
activeTypes: anomalyTypeFilterValue,
301301
})
@@ -347,7 +347,7 @@ const MonitorsDashboard = (/** @type Properties */ props) => {
347347
icon: 'search',
348348
testId: 'search-tables',
349349
value: tableNameFilterValue,
350-
onChange: (value, state) => emitEvent('SetParamValues', {payload: {table_name_filter: value}}),
350+
onChange: (value, state) => emitEvent('SetParamValues', {payload: {table_name_filter: value, current_page: 0}}),
351351
}),
352352
Select({
353353
label: 'Anomaly type',
@@ -361,7 +361,7 @@ const MonitorsDashboard = (/** @type Properties */ props) => {
361361
multiSelect: true,
362362
width: 200,
363363
onChange: (values) => emitEvent('SetParamValues', {
364-
payload: { anomaly_type_filter: values.length ? values.join(',') : null },
364+
payload: { anomaly_type_filter: values.length ? values.join(',') : null, current_page: 0 },
365365
}),
366366
}),
367367
span({class: 'fx-flex'}, ''),

testgen/ui/views/monitors_dashboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def render(
101101
JobSchedule.kwargs["test_suite_id"].astext == str(monitor_suite_id),
102102
)
103103

104-
anomaly_type_filter = [t for t in anomaly_type_filter.split(",") if t in ANOMALY_TYPE_FILTERS] if anomaly_type_filter else []
104+
anomaly_type_filter = [t for t in anomaly_type_filter.split(",") if t in ANOMALY_TYPE_FILTERS] if anomaly_type_filter else None
105105
if sort_field and sort_field not in ALLOWED_SORT_FIELDS:
106106
sort_field = None
107107

@@ -148,7 +148,7 @@ def render(
148148
"filters": {
149149
"table_group_id": table_group_id,
150150
"table_name_filter": table_name_filter,
151-
"anomaly_type_filter": list(anomaly_type_filter),
151+
"anomaly_type_filter": list(anomaly_type_filter) if anomaly_type_filter else None,
152152
},
153153
"sort": {
154154
"sort_field": sort_field,

0 commit comments

Comments
 (0)