Skip to content

Commit

Permalink
[probestatus] Fix JS variable declarations (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
manugarg committed Apr 3, 2023
1 parent 2763c8b commit 01a0a8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions surfacers/probestatus/static/probestatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var baseData = {
},
};

function populateProbeData() {
function populateProbeData(probe) {
let gd = psd[probe];

d[probe] = structuredClone(baseData);
Expand All @@ -43,9 +43,9 @@ function populateProbeData() {

// Construct x-axis using startTime and endTime.
for (let s = gd.StartTime; s < gd.EndTime; s = s + gd.ResSeconds) {
dt = new Date(s * 1000);
m = dt.getMonth() + 1;
dtStr =
const dt = new Date(s * 1000);
const m = dt.getMonth() + 1;
const dtStr =
dt.getFullYear() +
'/' +
m +
Expand All @@ -63,7 +63,7 @@ function populateProbeData() {
}

// Data colums
for (tgt in gd.Values) {
for (const tgt in gd.Values) {
let vals = gd.Values[tgt];
let freqs = gd.Freqs[tgt];
let c = [tgt];
Expand All @@ -79,7 +79,7 @@ function populateProbeData() {
}

function populateD() {
for (probe in psd) {
for (const probe in psd) {
populateProbeData(probe);
}
}
Expand Down

0 comments on commit 01a0a8f

Please sign in to comment.