Change Grafana panel label structure
by moving the stage and environment id to the front.
This commit is contained in:
@ -19,7 +19,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -20,7 +20,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image"])
|
|> keep(columns: ["_value", "image"])
|
||||||
|
@ -19,7 +19,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -20,7 +20,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: data, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: data, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image"])
|
|> keep(columns: ["_value", "image"])
|
||||||
|
@ -29,7 +29,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -29,7 +29,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image"])
|
|> keep(columns: ["_value", "image"])
|
||||||
|
@ -17,7 +17,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -18,7 +18,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image"])
|
|> keep(columns: ["_value", "image"])
|
||||||
|
@ -17,7 +17,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -17,7 +17,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -21,7 +21,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
@ -17,7 +17,7 @@ envMapping = from(bucket: "poseidon/autogen")
|
|||||||
|> last()
|
|> last()
|
||||||
|> keep(columns: ["id", "image", "stage"])
|
|> keep(columns: ["id", "image", "stage"])
|
||||||
|> rename(columns: {id: "environment_id"})
|
|> rename(columns: {id: "environment_id"})
|
||||||
|> map(fn: (r) => ({ r with image: strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_") + "(" + strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + ")" }))
|
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|
||||||
|
|
||||||
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|
||||||
|> keep(columns: ["_value", "image", "_time"])
|
|> keep(columns: ["_value", "image", "_time"])
|
||||||
|
Reference in New Issue
Block a user