summaryrefslogtreecommitdiffstats
path: root/web/getstats/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/getstats/main.js')
-rw-r--r--web/getstats/main.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/web/getstats/main.js b/web/getstats/main.js
index e5a1f65..d5a0b09 100644
--- a/web/getstats/main.js
+++ b/web/getstats/main.js
@@ -155,16 +155,21 @@ function updateActions() {
url_stats1 += "&testcasefilter=" + testCaseFilter;
// --- rankings ---
- url_rankings = "rankings.shtml";
- url_rankings += "?db=" + $('#database').val();
- url_rankings += "&cmd=rankings";
- url_rankings += "&host=" + encodeURIComponent(context1_["host"]);
- url_rankings += "&platform=" + encodeURIComponent(context1_["platform"]);
- url_rankings += "&branch=" + encodeURIComponent(context1_["branch"]);
- url_rankings += "&sha1=" + context1_["sha1"];
- url_rankings += "&maxsize=" + $("#max_rank_size option:selected").val();
- // ### Test case filter unsupported for now:
- //url_rankings += "&testcasefilter=" + testCaseFilter;
+ if (context1_["rankingsExist"]) {
+ url_rankings = "rankings.shtml";
+ url_rankings += "?db=" + $('#database').val();
+ url_rankings += "&cmd=rankings";
+ url_rankings += "&host=" + encodeURIComponent(context1_["host"]);
+ url_rankings += "&platform=" +
+ encodeURIComponent(context1_["platform"]);
+ url_rankings += "&branch=" + encodeURIComponent(context1_["branch"]);
+ url_rankings += "&sha1=" + context1_["sha1"];
+ url_rankings += "&maxsize=" + $("#max_rank_size option:selected").val();
+ // ### Test case filter unsupported for now:
+ //url_rankings += "&testcasefilter=" + testCaseFilter;
+ } else {
+ url_rankings = "";
+ }
// --- stats2 ---
if (context2_["host"] != "") {
@@ -260,6 +265,7 @@ function context1() {
var snapshot = tr.find("select[name = 'snapshot'] option:selected");
context["sha1"] = snapshot.attr("value");
context["snapshotIndex"] = snapshot.index();
+ context["rankingsExist"] = (snapshot.attr("text")[0] == 'R');
return context;
}