mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataFrame: expose an object array as a data frame (#23494)
This commit is contained in:
@@ -646,7 +646,7 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
|
||||
}
|
||||
const view = new DataFrameView<{ ts: string; line: string }>(frame);
|
||||
|
||||
view.forEachRow(row => {
|
||||
view.forEach(row => {
|
||||
annotations.push({
|
||||
time: new Date(row.ts).valueOf(),
|
||||
text: row.line,
|
||||
|
||||
@@ -420,7 +420,7 @@ export const enhanceDataFrame = (dataFrame: DataFrame, config: LokiOptions | nul
|
||||
}, {} as Record<string, any>);
|
||||
|
||||
const view = new DataFrameView(dataFrame);
|
||||
view.forEachRow((row: { line: string }) => {
|
||||
view.forEach((row: { line: string }) => {
|
||||
for (const field of derivedFields) {
|
||||
const logMatch = row.line.match(field.matcherRegex);
|
||||
fields[field.name].values.add(logMatch && logMatch[1]);
|
||||
|
||||
Reference in New Issue
Block a user