Skip to content
Snippets Groups Projects
Commit 82f4c06f authored by Daniel Brown's avatar Daniel Brown
Browse files

js code to inform on update of branch and log lists

parent f3c621a2
No related branches found
No related tags found
No related merge requests found
...@@ -10,14 +10,14 @@ class RunException(Exception): ...@@ -10,14 +10,14 @@ class RunException(Exception):
self.err = err self.err = err
self.out = out self.out = out
def git(args): def git(args, git_bin=GIT_BIN):
cmd = "" cmd = ""
if type(args) is list: if type(args) is list:
args.insert(0,GIT_BIN) args.insert(0,git_bin)
cmd = " ".join(args) cmd = " ".join(args)
else: else:
cmd = GIT_BIN + " " + args cmd = git_bin + " " + args
print cmd print cmd
......
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
$("#branch_list").change(function(){ $("#branch_list").change(function(){
$("#commit_list").empty(); $("#commit_list").empty();
$('#commit_list').attr("disabled", true);
$("#commit_list").append($('<option>', { value: 0, text: "Loading log enteries, please wait..."}));
updateLogEntries(); updateLogEntries();
}); });
...@@ -220,6 +222,14 @@ ...@@ -220,6 +222,14 @@
$("#btnStartTest").attr("disabled", true); $("#btnStartTest").attr("disabled", true);
blist = $("#branch_list"); 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({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
...@@ -258,6 +268,9 @@ ...@@ -258,6 +268,9 @@
list.append($('<option>', { value: logs[i].commit, text: logs[i].commit + " - " + logs[i].message})); list.append($('<option>', { value: logs[i].commit, text: logs[i].commit + " - " + logs[i].message}));
} }
$("#btnStartTest").attr("disabled", false); $("#btnStartTest").attr("disabled", false);
list.attr("disabled", false);
$("#branch_list").attr("disabled", false);
}, },
error: function(jqXHR, textStatus, err){ error: function(jqXHR, textStatus, err){
console.log('error: ' + err); console.log('error: ' + err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment