diff --git a/CTFd/themes/admin/static/css/style.css b/CTFd/themes/admin/static/css/style.css
index 254985c..520ea8e 100644
--- a/CTFd/themes/admin/static/css/style.css
+++ b/CTFd/themes/admin/static/css/style.css
@@ -106,6 +106,12 @@ table{
line-height: 66px;
}
+.spinner {
+ margin-top: 225px;
+ text-align: center;
+ opacity: 0.5;
+}
+
#score-graph{
height: 450px;
display: block;
diff --git a/CTFd/themes/admin/static/js/team.js b/CTFd/themes/admin/static/js/team.js
index 0f529d6..9161d50 100644
--- a/CTFd/themes/admin/static/js/team.js
+++ b/CTFd/themes/admin/static/js/team.js
@@ -41,7 +41,7 @@ function scoregraph () {
var layout = {
title: 'Score over Time'
};
-
+ $('#score-graph').empty();
Plotly.newPlot('score-graph', data, layout);
});
}
@@ -69,7 +69,7 @@ function keys_percentage_graph(){
var layout = {
title: 'Key Percentages'
};
-
+ $('#keys-pie-graph').empty();
Plotly.newPlot('keys-pie-graph', data, layout);
});
}
@@ -113,6 +113,7 @@ function category_breakdown_graph(){
title:'Category Breakdown'
};
+ $('#categories-pie-graph').empty();
Plotly.newPlot('categories-pie-graph', data, layout);
});
}
diff --git a/CTFd/themes/admin/templates/graphs.html b/CTFd/themes/admin/templates/graphs.html
index e805403..cebadaf 100644
--- a/CTFd/themes/admin/templates/graphs.html
+++ b/CTFd/themes/admin/templates/graphs.html
@@ -2,14 +2,26 @@
{% block content %}
{% endblock %}
@@ -97,6 +109,7 @@
annotations: annotations
};
+ $('#solves-graph').empty()
Plotly.newPlot('solves-graph', data, layout);
});
}
@@ -125,6 +138,7 @@
title: 'Key Percentages'
};
+ $('#keys-pie-graph').empty();
Plotly.newPlot('keys-pie-graph', data, layout);
});
}
@@ -152,6 +166,7 @@
title: 'Category Breakdown'
};
+ $('#categories-pie-graph').empty();
Plotly.newPlot('categories-pie-graph', data, layout);
});
}
diff --git a/CTFd/themes/admin/templates/team.html b/CTFd/themes/admin/templates/team.html
index ad1fcaa..5c7c822 100644
--- a/CTFd/themes/admin/templates/team.html
+++ b/CTFd/themes/admin/templates/team.html
@@ -89,9 +89,21 @@
-
-
-
+
+
+
IP Addresses
diff --git a/CTFd/themes/original/static/css/style.css b/CTFd/themes/original/static/css/style.css
index 9823807..9b3a02f 100644
--- a/CTFd/themes/original/static/css/style.css
+++ b/CTFd/themes/original/static/css/style.css
@@ -116,6 +116,12 @@ table{
clear: both;
}
+.spinner {
+ margin-top: 225px;
+ text-align: center;
+ opacity: 0.5;
+}
+
#keys-pie-graph{
width: 50%;
float: left;
diff --git a/CTFd/themes/original/static/js/chalboard.js b/CTFd/themes/original/static/js/chalboard.js
index e3ba47c..1a1e6f9 100644
--- a/CTFd/themes/original/static/js/chalboard.js
+++ b/CTFd/themes/original/static/js/chalboard.js
@@ -170,7 +170,12 @@ function updatesolves(cb){
for (var i = 0; i < chalids.length; i++) {
for (var i = 0; i < challenges['game'].length; i++) {
var obj = challenges['game'][i];
- obj.solves = solves[chalids[i]];
+ var solve_cnt = solves[chalids[i]];
+ if (solve_cnt) {
+ obj.solves = solve_cnt;
+ } else {
+ obj.solves = 0;
+ }
}
};
if (cb) {
diff --git a/CTFd/themes/original/static/js/scoreboard.js b/CTFd/themes/original/static/js/scoreboard.js
index 3c70498..51a006b 100644
--- a/CTFd/themes/original/static/js/scoreboard.js
+++ b/CTFd/themes/original/static/js/scoreboard.js
@@ -65,10 +65,8 @@ function scoregraph () {
};
console.log(traces);
+ $('#score-graph').empty() // Remove spinners
Plotly.newPlot('score-graph', traces, layout);
-
-
- $('#score-graph').show()
});
}
diff --git a/CTFd/themes/original/static/js/team.js b/CTFd/themes/original/static/js/team.js
index 26dae09..d729b26 100644
--- a/CTFd/themes/original/static/js/team.js
+++ b/CTFd/themes/original/static/js/team.js
@@ -53,6 +53,7 @@ function scoregraph() {
plot_bgcolor: 'rgba(0,0,0,0)'
};
+ $('#score-graph').empty();
Plotly.newPlot('score-graph', data, layout);
});
}
@@ -83,7 +84,7 @@ function keys_percentage_graph() {
plot_bgcolor: 'rgba(0,0,0,0)'
};
-
+ $('#keys-pie-graph').empty();
Plotly.newPlot('keys-pie-graph', data, layout);
});
}
@@ -129,6 +130,7 @@ function category_breakdown_graph() {
plot_bgcolor: 'rgba(0,0,0,0)'
};
+ $('#categories-pie-graph').empty();
Plotly.newPlot('categories-pie-graph', data, layout);
});
}
diff --git a/CTFd/themes/original/templates/chals.html b/CTFd/themes/original/templates/chals.html
index 85a1896..cc74445 100644
--- a/CTFd/themes/original/templates/chals.html
+++ b/CTFd/themes/original/templates/chals.html
@@ -87,6 +87,9 @@
{% if admin or not errors %}
diff --git a/CTFd/themes/original/templates/scoreboard.html b/CTFd/themes/original/templates/scoreboard.html
index ec2fa0f..aa1f91d 100644
--- a/CTFd/themes/original/templates/scoreboard.html
+++ b/CTFd/themes/original/templates/scoreboard.html
@@ -25,7 +25,11 @@
{% endif %}
-
+
diff --git a/CTFd/themes/original/templates/team.html b/CTFd/themes/original/templates/team.html
index e9fd89d..07c06a3 100644
--- a/CTFd/themes/original/templates/team.html
+++ b/CTFd/themes/original/templates/team.html
@@ -41,10 +41,22 @@
-
-
+
+
-
+