Discover modules > github.com/perses/shared/cue > common > migrate
v0.54.0-beta.8
#mapping: ¶
unit: ¶

mapping table for the unit attribute (key = grafana unit, value = perses equivalent)

ms: "milliseconds" ¶

time units

s: "seconds" ¶
m: "minutes" ¶
h: "hours" ¶
d: "days" ¶
dtdurations: "seconds" ¶
dtdurationms: "milliseconds" ¶
dateTimeAsIso: "datetime-iso" ¶
percent: "percent" ¶

percent units

percentunit: "percent-decimal" ¶
none: "decimal" ¶

decimal units

short: "decimal" ¶
bits: "bits" ¶

TODO bits units

decbits: "decbits" ¶
bytes: "bytes" ¶

bytes units

decbytes: "decbytes" ¶
bps: "bits/sec" ¶

throughput units

binbps: "decbits/sec" ¶
Bps: "bytes/sec" ¶
binBps: "decbytes/sec" ¶
cps: "counts/sec" ¶
mps: "messages/sec" ¶
recps: "records/sec" ¶
reqps: "requests/sec" ¶
rowsps: "rows/sec" ¶
rps: "reads/sec" ¶
ops: "ops/sec" ¶
pps: "packets/sec" ¶
wps: "writes/sec" ¶
calc: ¶

mapping table for the calculation attribute (key = grafana unit, value = perses equivalent)

first: "first" ¶

Values with a single potential mapping.

firstNotNull: "first-number" ¶
lastNotNull: "last-number" ¶
min: "min" ¶
max: "max" ¶
current: "last" ¶

Both keys can be used for "Last" depending on the version of grafana and how the calculation is being used (e.g. chart vs table legend value).

last: "last" ¶
avg: "mean" ¶

Both keys can be used for "Mean" depending on the version of grafana and how the calculation is being used (e.g. chart vs table legend value).

mean: "mean" ¶
total: "sum" ¶

Both keys can be used for "Mean" depending on the version of grafana and how the calculation is being used (e.g. chart vs table legend value).

sum: "sum" ¶
color: ¶
"dark-red": "#c4162a" ¶

mapping array for some color attributes (index = color name in Grafana, value = hexadecimal equivalent that Perses can deal with)

"semi-dark-red": "#e02f44" ¶
red: "#f2495c" ¶
"light-red": "#ff7383" ¶
"super-light-red": "#ffa6b0" ¶
"dark-orange": "#fa6400" ¶
"semi-dark-orange": "#ff780a" ¶
orange: "#ff9830" ¶
"light-orange": "#ffb357" ¶
"super-light-orange": "#ffcb7d" ¶
"dark-green": "#37872d" ¶
"semi-dark-green": "#56a64b" ¶
green: "#73bf69" ¶
"light-green": "#96d98d" ¶
"super-light-green": "#c8f2c2" ¶
"dark-blue": "#1f60c4" ¶
"semi-dark-blue": "#3274d9" ¶
blue: "#5794f2" ¶
"light-blue": "#8ab8ff" ¶
"super-light-blue": "#c0d8ff" ¶
"dark-purple": "#8f3bb8" ¶
"semi-dark-purple": "#a352cc" ¶
purple: "#b877d9" ¶
"light-purple": "#b877d9" ¶
"super-light-purple": "#deb6f2" ¶
"dark-yellow": "#e0b400" ¶
"semi-dark-yellow": "#f2cc0c" ¶
yellow: "#fade2a" ¶
"light-yellow": "#ffee52" ¶
"super-light-yellow": "#fff899" ¶
transparent: "#00000000" ¶
#defaultCalc: "last" ¶

Source files

  • mapping.cue