Implemented runtime using NWjs to open pgAdmin4 in a standalone window

instead of the system tray and web browser. Used NWjs to get rid of QT
and C++. Fixes #5967

Use cheroot as the default production server for pgAdmin4. Fixes #5017
This commit is contained in:
Akshay Joshi
2021-01-29 13:38:27 +05:30
parent a0271c7656
commit 102ffd141c
392 changed files with 3388 additions and 7599 deletions

View File

@@ -16,7 +16,7 @@ define('pgadmin.browser', [
'wcdocker', 'jquery.contextmenu', 'jquery.aciplugin', 'jquery.acitree',
'pgadmin.browser.preferences', 'pgadmin.browser.messages',
'pgadmin.browser.menu', 'pgadmin.browser.panel', 'pgadmin.browser.layout',
'pgadmin.browser.error', 'pgadmin.browser.frame',
'pgadmin.browser.runtime', 'pgadmin.browser.error', 'pgadmin.browser.frame',
'pgadmin.browser.node', 'pgadmin.browser.collection', 'pgadmin.browser.activity',
'sources/codemirror/addon/fold/pgadmin-sqlfoldcode',
'pgadmin.browser.keyboard', 'sources/tree/pgadmin_tree_save_state','jquery.acisortable', 'jquery.acifragment',

View File

@@ -0,0 +1,44 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
import pgAdmin from 'sources/pgadmin';
import url_for from 'sources/url_for';
import $ from 'jquery';
import * as Alertify from 'pgadmin.alertifyjs';
import gettext from 'sources/gettext';
const pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
_.extend(pgBrowser, {
// This function is used to send signal to runtime.
send_signal_to_runtime: function(cmd_string) {
$.ajax({
url: url_for('browser.signal_runtime'),
method: 'POST',
contentType: 'application/json',
data: JSON.stringify({
'command': cmd_string,
}),
}).fail(function(xhr, error) {
Alertify.pgNotifier(error, xhr, gettext('Failed to send signal to runtime.'));
});
},
// This function is callback function when 'Configure...' menu is clicked.
mnu_configure_runtime: function() {
this.send_signal_to_runtime('Runtime Open Configuration');
},
// This function is callback function when 'View log...' menu is clicked.
mnu_viewlog_runtime: function() {
this.send_signal_to_runtime('Runtime Open View Log');
},
});
export {pgBrowser};