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

(BIDS-2591) Improve return value for dashboard effectiveness #2631

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion handlers/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ func DashboardDataEffectiveness(w http.ResponseWriter, r *http.Request) {
}

if len(activeValidators) == 0 {
http.Error(w, "Invalid query", http.StatusBadRequest)
w.WriteHeader(http.StatusNoContent)
LuccaBitfly marked this conversation as resolved.
Show resolved Hide resolved
return
}

Expand Down
1 change: 1 addition & 0 deletions static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ $(document).ready(function () {
fetch(`/dashboard/data/effectiveness${getValidatorQueryString()}`, {
method: "GET",
}).then((res) => {
if (res.status !== 200) return
res.json().then((data) => {
let sum = 0.0
for (let eff of data) {
Expand Down
Loading