maint: cleanup some logging

This commit is contained in:
Jeremy Wall 2024-02-15 15:30:18 -05:00
parent 964a5e10e3
commit 26782b2bfc

View File

@ -84,7 +84,6 @@ class TimeseriesGraph extends HTMLElement {
static elementName = "timeseries-graph"; static elementName = "timeseries-graph";
getTargetNode() { getTargetNode() {
console.log("targetNode: ", this.#targetNode);
return this.#targetNode; return this.#targetNode;
} }
@ -146,7 +145,6 @@ class TimeseriesGraph extends HTMLElement {
x: [], x: [],
y: [] y: []
}; };
console.log("labels: ", labels, this.#label);
if (labels[this.#label]) { if (labels[this.#label]) {
trace.name = labels[this.#label]; trace.name = labels[this.#label];
}; };
@ -156,13 +154,10 @@ class TimeseriesGraph extends HTMLElement {
} }
traces.push(trace); traces.push(trace);
} }
// TODO(jwall): If this has modified the trace length or anything we should
// do newPlot instead.
// https://plotly.com/javascript/plotlyjs-function-reference/#plotlyreact // https://plotly.com/javascript/plotlyjs-function-reference/#plotlyreact
Plotly.react(this.getTargetNode(), traces, config, layout); Plotly.react(this.getTargetNode(), traces, config, layout);
} else if (data.Scalar) { } else if (data.Scalar) {
// https://plotly.com/javascript/reference/bar/ // https://plotly.com/javascript/reference/bar/
console.log("scalar data: ", data.Scalar);
var traces = []; var traces = [];
for (const pair of data.Scalar) { for (const pair of data.Scalar) {
const series = pair[1]; const series = pair[1];
@ -172,7 +167,6 @@ class TimeseriesGraph extends HTMLElement {
x: [], x: [],
y: [] y: []
}; };
console.log("labels: ", labels, this.#label);
if (labels[this.#label]) { if (labels[this.#label]) {
trace.x.push(labels[this.#label]); trace.x.push(labels[this.#label]);
}; };
@ -223,11 +217,8 @@ class SpanSelector extends HTMLElement {
updateGraphs() { updateGraphs() {
for (var node of document.getElementsByTagName(TimeseriesGraph.elementName)) { for (var node of document.getElementsByTagName(TimeseriesGraph.elementName)) {
console.log("endInput: ", this.#endInput.value);
node.setAttribute('end', this.#endInput.value); node.setAttribute('end', this.#endInput.value);
console.log("durationInput: ", this.#durationInput.value);
node.setAttribute('duration', this.#durationInput.value); node.setAttribute('duration', this.#durationInput.value);
console.log("stepDurationInput: ", this.#stepDurationInput.value);
node.setAttribute('step-duration', this.#stepDurationInput.value); node.setAttribute('step-duration', this.#stepDurationInput.value);
} }
} }