mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Support execute plugin for not connected server.
Добавлена возможность запускать плагины не поключаясь к БД. Это нужно например чтобы запустить ssh клиента или сделать ssh тоннель. Поддерживаются 3 переменные $$HOSTNAME,$$USERNAME,$$PORT. Вот пример описания plugins.ini для запуска ssh клиента: ; ; Putty (Windows): ; Title=Putty Console Command="C:\Program Files\PuTTY\putty.exe" postgres@"$$HOSTNAME" Description=Open a Putty console to the current database hostname. KeyFile=C:\Program Files\PuTTY\putty.exe Platform=windows ServerType=postgresql Database=No SetPassword=No ;
This commit is contained in:
parent
d5a1c70f7b
commit
f11fcfa4f6
1 changed files with 8 additions and 1 deletions
|
|
@ -295,7 +295,14 @@ wxWindow *pluginUtilityFactory::StartDialog(frmMain *form, pgObject *obj)
|
|||
else
|
||||
{
|
||||
// Blank the rest
|
||||
execCmd.Replace(wxT("$$HOSTNAME"), wxEmptyString);
|
||||
if (obj && obj->GetMetaType() == PGM_SERVER) {
|
||||
pgServer* srv = (pgServer*) obj;
|
||||
execCmd.Replace(wxT("$$HOSTNAME"), srv->GetName());
|
||||
execCmd.Replace(wxT("$$USERNAME"), srv->GetUsername());
|
||||
execCmd.Replace(wxT("$$PORT"), NumToStr((long)srv->GetPort()));
|
||||
} else
|
||||
execCmd.Replace(wxT("$$HOSTNAME"), wxEmptyString);
|
||||
|
||||
execCmd.Replace(wxT("$$HOSTADDR"), wxEmptyString);
|
||||
execCmd.Replace(wxT("$$PORT"), wxEmptyString);
|
||||
execCmd.Replace(wxT("$$SSLMODE"), wxEmptyString);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue