mirror of
https://github.com/redis/RedisDesktopManager.git
synced 2026-10-23 15:58:48 +08:00
Fix SSL connection dialog
This commit is contained in:
@@ -22,13 +22,13 @@ ConnectionWindow::ConnectionWindow(QWeakPointer<ConnectionsManager> manager, QWi
|
||||
OnBrowseFileClick(ui.privateKeyPath, "Select private key file", tr("All Files (*.*)"));
|
||||
});
|
||||
connect(ui.sslCACertButton, &QPushButton::clicked, this, [this]() {
|
||||
OnBrowseFileClick(ui.sslCACertEdit, "Select PEM file", tr("All Files (*.pem)"));
|
||||
OnBrowseFileClick(ui.sslCACertEdit, "Select CACert file", tr("All Files (*.pem *.crt)"));
|
||||
});
|
||||
connect(ui.sslLocalCertButton, &QPushButton::clicked, this, [this]() {
|
||||
OnBrowseFileClick(ui.sslLocalCertEdit, "Select PEM file", tr("All Files (*.pem)"));
|
||||
OnBrowseFileClick(ui.sslLocalCertEdit, "Select Local Cert file", tr("All Files (*.pem *.crt)"));
|
||||
});
|
||||
connect(ui.sslPrivateKeyButton, &QPushButton::clicked, this, [this]() {
|
||||
OnBrowseFileClick(ui.sslPrivateKeyEdit, "Select PEM file", tr("All Files (*.pem)"));
|
||||
OnBrowseFileClick(ui.sslPrivateKeyEdit, "Select Private key file", tr("All Files (*.pem *.key)"));
|
||||
});
|
||||
connect(ui.testConnectionButton, SIGNAL(clicked()), this, SLOT(OnTestConnectionButtonClick()));
|
||||
connect(ui.showPasswordCheckbox, SIGNAL(stateChanged(int)), this, SLOT(OnShowPasswordCheckboxChanged(int)));
|
||||
@@ -159,7 +159,7 @@ void ConnectionWindow::OnTestConnectionButtonClick()
|
||||
ui.testConnectionButton->setIcon(QIcon(":/images/wait.png"));
|
||||
|
||||
ConnectionConfig config = getConectionConfigFromFormData();
|
||||
config.setTimeouts(8000, 8000);
|
||||
config.setConnectionTimeout(8000);
|
||||
|
||||
RedisClient::Connection testConnection(config);
|
||||
|
||||
@@ -310,8 +310,8 @@ ConnectionConfig ConnectionWindow::getConectionConfigFromFormData()
|
||||
ui.nameEdit->text().trimmed());
|
||||
|
||||
conf.setNamespaceSeparator(ui.namespaceSeparator->text());
|
||||
conf.setTimeouts(ui.connectionTimeout->value() * 1000,
|
||||
ui.executionTimeout->value() * 1000);
|
||||
conf.setConnectionTimeout(ui.connectionTimeout->value() * 1000);
|
||||
conf.setExecutionTimeout(ui.executionTimeout->value() * 1000);
|
||||
|
||||
if (!ui.keysPattern->text().isEmpty())
|
||||
conf.setKeysPattern(ui.keysPattern->text());
|
||||
|
||||
+59
-59
@@ -59,7 +59,7 @@
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="elideMode">
|
||||
<enum>Qt::ElideRight</enum>
|
||||
@@ -147,28 +147,57 @@
|
||||
<string>SSL</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="sslCACertEdit">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="useSsl">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use SSL Protocol</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="sslPrivateKeyButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="sslLocalCertEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Public key in PEM format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="sslLocalCertEdit">
|
||||
<property name="placeholderText">
|
||||
<string>(Optional) Authority in PEM format</string>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="sslCACertButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="sslPrivateKeyEdit">
|
||||
<property name="placeholderText">
|
||||
<string>(Optional) Private key in PEM format</string>
|
||||
<string>Private key in PEM format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="sslPublicKey">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
@@ -188,19 +217,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Authority:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="sslPrivateKey">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
@@ -213,33 +229,27 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Authority:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="sslCACertEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Authority in PEM format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="sslCACertButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="sslPrivateKeyButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="sslLocalCertButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
@@ -252,16 +262,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="useSsl">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use SSL Protocol</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="sshTab">
|
||||
|
||||
Reference in New Issue
Block a user