mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: elastic small fixes (#18879)
- Fix cancellation error showing in UI - Fix display of object values in log rows
This commit is contained in:
@@ -425,6 +425,7 @@ export interface DataQueryError {
|
||||
status?: string;
|
||||
statusText?: string;
|
||||
refId?: string;
|
||||
cancelled?: boolean;
|
||||
}
|
||||
|
||||
export interface ScopedVar {
|
||||
|
||||
@@ -260,7 +260,9 @@ export function logSeriesToLogsModel(logSeries: DataFrame[]): LogsModel {
|
||||
const timeLocal = time.format('YYYY-MM-DD HH:mm:ss');
|
||||
const timeUtc = toUtc(ts).format('YYYY-MM-DD HH:mm:ss');
|
||||
|
||||
const message = stringField.values.get(j);
|
||||
let message = stringField.values.get(j);
|
||||
// This should be string but sometimes isn't (eg elastic) because the dataFrame is not strongly typed.
|
||||
message = typeof message === 'string' ? message : JSON.stringify(message);
|
||||
|
||||
let logLevel = LogLevel.unknown;
|
||||
if (logLevelField) {
|
||||
|
||||
@@ -46,7 +46,7 @@ export default class Table extends PureComponent<TableProps> {
|
||||
show: text !== 'Time',
|
||||
Cell: (row: any) => (
|
||||
<span className={filterable ? 'link' : ''} title={text + ': ' + row.value}>
|
||||
{row.value}
|
||||
{typeof row.value === 'string' ? row.value : JSON.stringify(row.value)}
|
||||
</span>
|
||||
),
|
||||
}));
|
||||
|
||||
@@ -589,6 +589,10 @@ export const processQueryResponse = (
|
||||
const replacePreviousResults = action.type === queryEndedAction.type;
|
||||
|
||||
if (error) {
|
||||
if (error.cancelled) {
|
||||
return state;
|
||||
}
|
||||
|
||||
// For Angular editors
|
||||
state.eventBridge.emit('data-error', error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user