[pgAdmin][RM4925] Missing spinner from process watcher
Aditya Toshniwal <[email protected]> Thu, 14 Nov 2019 16:45:46 +0530
| Newsgroups | gmane.comp.db.postgresql.pgadmin.devel |
|---|---|
| Message-ID | <CAM9w-_nUwDcbxY=9HmCj7Xkb2mK-SprqzGuVf4Mp48hbLrVWvg@mail.gmail.com> |
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"
Screenshot 2019-11-14 at 16.39.12.png
(image/png, 140.3 KB) - not displayed
RM4925.patch
(application/octet-stream, 1.3 KB)
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">' +