mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 06:05:49 -06:00
Added a parameter for the Keywords server. Used to search for the server after pressing F4
Для удобного поиска серверов к параметрам сервера добавлен Keywords параметр. Это текстовый параметр в котором через пробел можно перечислить слова по которым будет проводиться поиск сервера при нажатии F4. Тут можно например указать IP сервера для соединения использующего туннель putty. GUI интерфейса для настройки параметра нет. Если ключевые слова заданы то отображаются в [].
This commit is contained in:
parent
42c20fdf53
commit
8ffa0a1806
4 changed files with 16 additions and 2 deletions
|
|
@ -1340,6 +1340,7 @@ void frmMain::StoreServers()
|
|||
settings->Write(key + wxT("Server"), server->GetName());
|
||||
settings->Write(key + wxT("HostAddr"), server->GetHostAddr());
|
||||
settings->Write(key + wxT("Description"), server->GetDescription());
|
||||
settings->Write(key + wxT("Keywords"), server->GetKeywords());
|
||||
settings->Write(key + wxT("Service"), server->GetService());
|
||||
settings->Write(key + wxT("ServiceID"), server->GetServiceID());
|
||||
settings->Write(key + wxT("DiscoveryID"), server->GetDiscoveryID());
|
||||
|
|
|
|||
|
|
@ -444,6 +444,14 @@ public:
|
|||
{
|
||||
sslcrl = s;
|
||||
}
|
||||
wxString GetKeywords() const
|
||||
{
|
||||
return keywords;
|
||||
}
|
||||
void iSetKeywords(const wxString &s)
|
||||
{
|
||||
keywords = s;
|
||||
}
|
||||
|
||||
bool GetSSLCompression() const
|
||||
{
|
||||
|
|
@ -558,7 +566,7 @@ private:
|
|||
wxString versionNum;
|
||||
wxString dbRestriction;
|
||||
wxString colour;
|
||||
wxString group;
|
||||
wxString group,keywords;
|
||||
wxString sslcert, sslkey, sslrootcert, sslcrl;
|
||||
bool sslcompression;
|
||||
bool sshTunnel;
|
||||
|
|
|
|||
|
|
@ -965,7 +965,9 @@ bool pgAdmin3::OnInit()
|
|||
parent = browser->GetItemParent(parent);
|
||||
}
|
||||
path=wxString::Format("%4d%s",-1,path);
|
||||
|
||||
wxString kw=server->GetKeywords();
|
||||
if (!kw.IsEmpty())
|
||||
path=path+'['+kw+']';
|
||||
winMain->servers_find_list.Add(path);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1553,6 +1553,7 @@ pgObject *pgServerFactory::CreateObjects(pgCollection *obj, ctlTree *browser, co
|
|||
wxString key, servername, hostaddr, description, service, database, username, lastDatabase, lastSchema;
|
||||
wxString storePwd, rolename, connstr, restore, serviceID, discoveryID, dbRestriction, colour;
|
||||
wxString group, sslcert, sslkey, sslrootcert, sslcrl, sslcompression;
|
||||
wxString keywords;
|
||||
|
||||
#if defined(HAVE_OPENSSL_CRYPTO) || defined(HAVE_GCRYPT)
|
||||
wxString sshTunnel, authModePwd, tunnelHost, tunnelUserName, tunnelPassword, publicKeyFile, identityFile;
|
||||
|
|
@ -1574,6 +1575,7 @@ pgObject *pgServerFactory::CreateObjects(pgCollection *obj, ctlTree *browser, co
|
|||
{
|
||||
key.Printf(wxT("Servers/%d/"), (int)loop);
|
||||
|
||||
settings->Read(key + wxT("Keywords"), &keywords, wxEmptyString);
|
||||
settings->Read(key + wxT("Server"), &servername, wxEmptyString);
|
||||
settings->Read(key + wxT("HostAddr"), &hostaddr, wxEmptyString);
|
||||
settings->Read(key + wxT("Service"), &service, wxEmptyString);
|
||||
|
|
@ -1658,6 +1660,7 @@ pgObject *pgServerFactory::CreateObjects(pgCollection *obj, ctlTree *browser, co
|
|||
server->SetSSLRootCert(sslrootcert);
|
||||
server->SetSSLCrl(sslcrl);
|
||||
server->iSetSSLCompression(StrToBool(sslcompression));
|
||||
server->iSetKeywords(keywords);
|
||||
|
||||
found = false;
|
||||
if (browser->ItemHasChildren(obj->GetId()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue