mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-28 23:09:51 -04:00
Compare commits
No commits in common. "835c120d4b92d8112d752265ca2748e91feb62c1" and "584cb237fe5f25ce737878b36a6e4b4751147606" have entirely different histories.
835c120d4b
...
584cb237fe
@ -9,7 +9,6 @@
|
||||
query: 'sum by (instance)(irate(node_cpu_seconds_total{job="nodestats"}[5m]))' # The PromQL query for this plot
|
||||
meta: # metadata for this plot
|
||||
name_format: "`${labels.instance}`" # javascript template literal to format the trace name
|
||||
fill: tozeroy
|
||||
#d3_tick_format: "~%" # d3 tick format override for this plot's yaxis
|
||||
#named_axis: "y" # yaxis name to use for this subplots traces
|
||||
span: # The span for this range query
|
||||
|
@ -52,7 +52,6 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
services.heracles.enable = lib.mkEnableOption "enable heracles service";
|
||||
|
17
src/query.rs
17
src/query.rs
@ -117,27 +117,10 @@ pub struct DataPoint {
|
||||
value: f64,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub enum FillTypes {
|
||||
#[serde(rename = "tonexty")]
|
||||
ToNextY,
|
||||
#[serde(rename = "tozeroy")]
|
||||
ToZeroY,
|
||||
#[serde(rename = "tonextx")]
|
||||
ToNextX,
|
||||
#[serde(rename = "tozerox")]
|
||||
ToZeroX,
|
||||
#[serde(rename = "toself")]
|
||||
ToSelf,
|
||||
#[serde(rename = "tonext")]
|
||||
ToNext,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct PlotMeta {
|
||||
name_format: Option<String>,
|
||||
named_axis: Option<String>,
|
||||
fill: Option<FillTypes>,
|
||||
d3_tick_format: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -287,9 +287,6 @@ class TimeseriesGraph extends HTMLElement {
|
||||
yaxis: yaxis,
|
||||
yhoverformat: meta["d3_tick_format"],
|
||||
};
|
||||
if (meta.fill) {
|
||||
trace.fill = meta.fill;
|
||||
}
|
||||
var name = this.formatName(meta, labels);
|
||||
if (name) { trace.name = name; }
|
||||
for (const point of series) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user