mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files * Update eslint plugin * updated files
This commit is contained in:
@@ -186,7 +186,7 @@ export function makeSeriesForLogs(sortedRows: LogRowModel[], bucketSize: number,
|
||||
}
|
||||
|
||||
function isLogsData(series: DataFrame) {
|
||||
return series.fields.some(f => f.type === FieldType.time) && series.fields.some(f => f.type === FieldType.string);
|
||||
return series.fields.some((f) => f.type === FieldType.time) && series.fields.some((f) => f.type === FieldType.string);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -308,10 +308,10 @@ export function logSeriesToLogsModel(logSeries: DataFrame[]): LogsModel | undefi
|
||||
|
||||
// We are sometimes passing data frames with no fields because we want to calculate correct meta stats.
|
||||
// Therefore we need to filter out series with no fields. These series are used only for meta stats calculation.
|
||||
const seriesWithFields = logSeries.filter(series => series.fields.length);
|
||||
const seriesWithFields = logSeries.filter((series) => series.fields.length);
|
||||
|
||||
if (seriesWithFields.length) {
|
||||
allSeries = seriesWithFields.map(series => {
|
||||
allSeries = seriesWithFields.map((series) => {
|
||||
const fieldCache = new FieldCache(series);
|
||||
const stringField = fieldCache.getFirstFieldOfType(FieldType.string);
|
||||
|
||||
@@ -402,7 +402,7 @@ export function logSeriesToLogsModel(logSeries: DataFrame[]): LogsModel | undefi
|
||||
});
|
||||
}
|
||||
|
||||
const limits = logSeries.filter(series => series.meta && series.meta.limit);
|
||||
const limits = logSeries.filter((series) => series.meta && series.meta.limit);
|
||||
const limitValue = Object.values(
|
||||
limits.reduce((acc: any, elem: any) => {
|
||||
acc[elem.refId] = elem.meta.limit;
|
||||
@@ -439,7 +439,7 @@ export function logSeriesToLogsModel(logSeries: DataFrame[]): LogsModel | undefi
|
||||
|
||||
if (refId && !queriesVisited[refId]) {
|
||||
if (totalBytesKey && series.meta?.stats) {
|
||||
const byteStat = series.meta.stats.find(stat => stat.displayName === totalBytesKey);
|
||||
const byteStat = series.meta.stats.find((stat) => stat.displayName === totalBytesKey);
|
||||
if (byteStat) {
|
||||
totalBytes += byteStat.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user