-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: update error rate map and latency stat * fix: error rate map * fix: handle long queries in log based panels * fix: update summary table to handle long range queries * fix: reachability thresholds * fix: update summary error rate map to handle long queries * fix: remaining summary panels * fix: update uptime query to be more accurate * chore: remove comments
- Loading branch information
Showing
11 changed files
with
733 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { SceneDataTransformer, SceneQueryRunner } from '@grafana/scenes'; | ||
|
||
export function divideSumByCountTransformation(runner: SceneQueryRunner) { | ||
return new SceneDataTransformer({ | ||
$data: runner, | ||
transformations: [ | ||
{ | ||
id: 'reduce', | ||
options: { | ||
labelsToFields: false, | ||
reducers: ['sum'], | ||
}, | ||
}, | ||
{ | ||
id: 'rowsToFields', | ||
options: { | ||
mappings: [ | ||
{ | ||
fieldName: 'Total', | ||
handlerKey: 'field.value', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
id: 'calculateField', | ||
options: { | ||
binary: { | ||
left: 'sum', | ||
operator: '/', | ||
right: 'count', | ||
}, | ||
mode: 'binary', | ||
reduce: { | ||
reducer: 'sum', | ||
}, | ||
}, | ||
}, | ||
{ | ||
id: 'organize', | ||
options: { | ||
excludeByName: { | ||
count: true, | ||
sum: true, | ||
}, | ||
includeByName: {}, | ||
indexByName: {}, | ||
renameByName: {}, | ||
}, | ||
}, | ||
], | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.