]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- show full time and date in HTML queue, drop filtering by requester master
authorMarcin Krol <hawk@tld-linux.org>
Tue, 2 Apr 2024 16:39:21 +0000 (18:39 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 2 Apr 2024 16:39:21 +0000 (18:39 +0200)
TLD_Builder/bqueue.py
TLD_Builder/request.py
TLD_Builder/request_handler_server.py
TLD_Builder/script.js [deleted file]

index f90de620a40bfe5e93074492ce90967ae6834f13..e349c0ec0313a33872c19fa4e4519ade2f3eba84 100644 (file)
@@ -45,14 +45,8 @@ class B_Queue:
     <link rel="Shortcut Icon" href="//www.tld-linux.org/favicon.ico"/>
         <title>TLD builder queue</title>
         <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="style.css">
     <link rel="Shortcut Icon" href="//www.tld-linux.org/favicon.ico"/>
         <title>TLD builder queue</title>
         <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="style.css">
-        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
-        <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.4.3/jquery.timeago.min.js"></script>
-        <script type="text/javascript" src="script.js"></script>
     </head>
 <body>
     </head>
 <body>
-<div id="header">
-    <div id="requesters-filter">Filter by requesters:<br></div>
-</div>
 <div id="content">
 """
         )
 <div id="content">
 """
         )
index 1d72f2e70f52032e1a103853fe57550473a3e470..da02c693075cb41039debf233dc00a2f45eded2d 100644 (file)
@@ -138,7 +138,7 @@ class Group:
         f.write(
             "<div id=\"%(no)d\" class=\"request %(flags)s\">\n"
             "<a href=\"#%(no)d\">%(no)d</a>. "
         f.write(
             "<div id=\"%(no)d\" class=\"request %(flags)s\">\n"
             "<a href=\"#%(no)d\">%(no)d</a>. "
-            "<time class=\"timeago\" title=\"%(datetime)s\" datetime=\"%(datetime)s\">%(time)s</time> "
+            "<time title=\"%(datetime)s\" datetime=\"%(datetime)s\">%(time)s</time> "
             "from <b class=requester>%(requester)s</b> "
             "<small>%(id)s, prio=%(priority)d, jobs=%(max_jobs)d, %(flags)s</small>\n"
         % {
             "from <b class=requester>%(requester)s</b> "
             "<small>%(id)s, prio=%(priority)d, jobs=%(max_jobs)d, %(flags)s</small>\n"
         % {
index c2703f27f6b9a066a1e46af14e4a5b92786d843e..d97d76f9f4f2df6a0aab87ddb2f9aae3b84123af 100644 (file)
@@ -66,24 +66,8 @@ def write_css():
     r.close()
     os.umask(old_umask)
 
     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();
 def main(srv_ssl=False):
     write_css();
-    write_js();
     socket.setdefaulttimeout(30)
     try:
         init_conf()
     socket.setdefaulttimeout(30)
     try:
         init_conf()
diff --git a/TLD_Builder/script.js b/TLD_Builder/script.js
deleted file mode 100644 (file)
index 5b8b060..0000000
+++ /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 = $('<div id=requesters-filter>Filter by requesters:<br></div>');
-                       $('body').prepend($filter);
-               }
-               requesters.forEach(function(r) {
-                       var $button = $('<button class=request-filter>'+ r + '</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);
-               });
-       }
-});