Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[probestatus] Fix JS variable declarations #321

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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