From: Marcin Krol Date: Tue, 2 Apr 2024 16:39:21 +0000 (+0200) Subject: - show full time and date in HTML queue, drop filtering by requester X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;ds=inline;p=tld-builder.git - show full time and date in HTML queue, drop filtering by requester --- diff --git a/TLD_Builder/bqueue.py b/TLD_Builder/bqueue.py index f90de62..e349c0e 100644 --- a/TLD_Builder/bqueue.py +++ b/TLD_Builder/bqueue.py @@ -45,14 +45,8 @@ class B_Queue: TLD builder queue - - - -
""" ) diff --git a/TLD_Builder/request.py b/TLD_Builder/request.py index 1d72f2e..da02c69 100644 --- a/TLD_Builder/request.py +++ b/TLD_Builder/request.py @@ -138,7 +138,7 @@ class Group: f.write( "
\n" "%(no)d. " - " " + " " "from %(requester)s " "%(id)s, prio=%(priority)d, jobs=%(max_jobs)d, %(flags)s\n" % { diff --git a/TLD_Builder/request_handler_server.py b/TLD_Builder/request_handler_server.py index c2703f2..d97d76f 100644 --- a/TLD_Builder/request_handler_server.py +++ b/TLD_Builder/request_handler_server.py @@ -66,24 +66,8 @@ def write_css(): r.close() os.umask(old_umask) -def write_js(): - js_src = os.path.join(os.path.dirname(__file__), 'script.js') - js_file = path.www_dir + '/script.js' - # skip if file exists and code is not newer - if os.path.exists(js_file) and os.stat(js_src).st_mtime < os.stat(js_file).st_mtime: - return - - old_umask = os.umask(0o0022) - r = open(js_src, 'r') - f = open(js_file, 'w') - f.write(r.read()) - f.close() - r.close() - os.umask(old_umask) - def main(srv_ssl=False): write_css(); - write_js(); socket.setdefaulttimeout(30) try: init_conf() diff --git a/TLD_Builder/script.js b/TLD_Builder/script.js deleted file mode 100644 index 5b8b060..0000000 --- a/TLD_Builder/script.js +++ /dev/null @@ -1,42 +0,0 @@ -jQuery(function($) { - update_tz(); - filter_requesters(); - - // setup relative time display - function update_tz() { - $('time.timeago').timeago(); - } - - // draw filter for requesters - function filter_requesters() { - var requesters = ['everyone']; - $('div b.requester').each(function(i, d) { - var requester = $(d).text(); - if (!~requesters.indexOf(requester)) { - requesters.push(requester); - } - }); - - var $filter = $('#requesters-filter'); - if ($filter.length == 0) { - $filter = $('
Filter by requesters:
'); - $('body').prepend($filter); - } - requesters.forEach(function(r) { - var $button = $(''); - $button.on('click', function() { - $('div#requesters-filter button').removeAttr('disabled'); - $('div.request').filter(function(i, d) { - var c = $(d).find('b.requester').text(); - if (c == r || r == 'everyone') { - $(d).show(); - $button.attr('disabled', 'disabled'); - } else { - $(d).hide(); - } - }) - }) - $filter.append($button); - }); - } -});