prettier: ran on all files again, sorry. now settings are defined in package.json

This commit is contained in:
Torkel Ödegaard
2017-12-21 08:39:31 +01:00
parent af34f9977e
commit 3a1f52d8a2
262 changed files with 3996 additions and 7431 deletions

View File

@@ -40,11 +40,7 @@ export default class ResponseParser {
}
parseMetricFindQueryResult(refId, results) {
if (
!results ||
results.data.length === 0 ||
results.data.results[refId].meta.rowCount === 0
) {
if (!results || results.data.length === 0 || results.data.results[refId].meta.rowCount === 0) {
return [];
}
@@ -123,8 +119,7 @@ export default class ResponseParser {
timeColumnIndex = i;
} else if (table.columns[i].text === 'title') {
return this.$q.reject({
message:
'The title column for annotations is deprecated, now only a column named text is returned',
message: 'The title column for annotations is deprecated, now only a column named text is returned',
});
} else if (table.columns[i].text === 'text') {
textColumnIndex = i;
@@ -135,8 +130,7 @@ export default class ResponseParser {
if (timeColumnIndex === -1) {
return this.$q.reject({
message:
'Missing mandatory time column (with time_sec column alias) in annotation query.',
message: 'Missing mandatory time column (with time_sec column alias) in annotation query.',
});
}
@@ -147,9 +141,7 @@ export default class ResponseParser {
annotation: options.annotation,
time: Math.floor(row[timeColumnIndex]) * 1000,
text: row[textColumnIndex],
tags: row[tagsColumnIndex]
? row[tagsColumnIndex].trim().split(/\s*,\s*/)
: [],
tags: row[tagsColumnIndex] ? row[tagsColumnIndex].trim().split(/\s*,\s*/) : [],
});
}