public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM4925] Missing spinner from process watcher
Date: Thu, 14 Nov 2019 16:45:46 +0530
Message-ID: <CAM9w-_nUwDcbxY=9HmCj7Xkb2mK-SprqzGuVf4Mp48hbLrVWvg@mail.gmail.com> (raw)

Hi Hackers,

Attached is the patch to show some text on process watcher till the initial
logs are loaded. Adding a spinner was not possible due to the complex DOM
structure of the logs window. Below is the screenshot:
[image: Screenshot 2019-11-14 at 16.39.12.png]

-- 
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [image/png] Screenshot 2019-11-14 at 16.39.12.png (140.3K, 3-Screenshot%202019-11-14%20at%2016.39.12.png)
  download | view image

  [application/octet-stream] RM4925.patch (1.3K, 4-RM4925.patch)
  download | inline diff:
diff --git a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
index 01301cc64..76ffa96d4 100644
--- a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
+++ b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
@@ -212,6 +212,11 @@ define('misc.bgprocess', [
           });
         }
 
+        if(self.logs_loading) {
+          self.logs_loading.remove();
+          self.logs_loading = null;
+        }
+
         if (self.stime) {
           self.curr_status = self.other_status_tpl({status_text:gettext('Started')});
 
@@ -414,6 +419,8 @@ define('misc.bgprocess', [
           setTimeout(function() {
             self.logs[0].scrollTop = self.logs[0].scrollHeight;
           });
+          self.logs_loading = $(`<li class="pg-bg-res-out loading-logs">${gettext('Loading process logs...')}</li>`);
+          self.logs.append(self.logs_loading);
           // set bgprocess detailed description
           $header.find('.bg-detailed-desc').html(self.detailed_desc);
         }
@@ -602,6 +609,7 @@ define('misc.bgprocess', [
           showTitle: true,
           isCloseable: true,
           isPrivate: true,
+          isLayoutMember: false,
           content: '<div class="bg-process-details">' +
               '<div class="bg-detailed-desc"></div>' +
               '<div class="bg-process-stats d-flex py-1">' +


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM4925] Missing spinner from process watcher
  In-Reply-To: <CAM9w-_nUwDcbxY=9HmCj7Xkb2mK-SprqzGuVf4Mp48hbLrVWvg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox