From 82f4c06f09618f6f8fbfdfe104e423b59c4e2c55 Mon Sep 17 00:00:00 2001 From: Daniel Brown <ddb@star.sr.bham.ac.uk> Date: Tue, 30 Jul 2013 12:09:44 +0100 Subject: [PATCH] js code to inform on update of branch and log lists --- pykat/testing/utils.py | 6 +++--- pykat/testing/web/templates/finesse_test.html | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pykat/testing/utils.py b/pykat/testing/utils.py index 6b987d8..aad9210 100644 --- a/pykat/testing/utils.py +++ b/pykat/testing/utils.py @@ -10,14 +10,14 @@ class RunException(Exception): self.err = err self.out = out -def git(args): +def git(args, git_bin=GIT_BIN): cmd = "" if type(args) is list: - args.insert(0,GIT_BIN) + args.insert(0,git_bin) cmd = " ".join(args) else: - cmd = GIT_BIN + " " + args + cmd = git_bin + " " + args print cmd diff --git a/pykat/testing/web/templates/finesse_test.html b/pykat/testing/web/templates/finesse_test.html index faf5d89..8e1595d 100644 --- a/pykat/testing/web/templates/finesse_test.html +++ b/pykat/testing/web/templates/finesse_test.html @@ -81,6 +81,8 @@ $("#branch_list").change(function(){ $("#commit_list").empty(); + $('#commit_list').attr("disabled", true); + $("#commit_list").append($('<option>', { value: 0, text: "Loading log enteries, please wait..."})); updateLogEntries(); }); @@ -220,6 +222,14 @@ $("#btnStartTest").attr("disabled", true); blist = $("#branch_list"); + $("#commit_list").empty(); + $('#commit_list').attr("disabled", true); + $("#commit_list").append($('<option>', { value: 0, text: "Loading log enteries, please wait..."})); + + blist.empty(); + blist.attr("disabled", true); + blist.append($('<option>', { value: 0, text: "Loading branches, please wait..."})); + $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", @@ -258,6 +268,9 @@ list.append($('<option>', { value: logs[i].commit, text: logs[i].commit + " - " + logs[i].message})); } $("#btnStartTest").attr("disabled", false); + + list.attr("disabled", false); + $("#branch_list").attr("disabled", false); }, error: function(jqXHR, textStatus, err){ console.log('error: ' + err); -- GitLab