-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ux] Use a combobox to edit sslmode setting #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!!!
@@ -85,6 +88,9 @@ def data(self, index, role=Qt.ItemDataRole.DisplayRole): | |||
or self.__model_data[key] != self.__original_data[key] | |||
): | |||
return QColorConstants.DarkGreen | |||
elif role == Qt.ItemDataRole.UserRole: | |||
if index.column() == self.VALUE_COL and key == self.SSLMODE_KEY: | |||
return {key: [e.value for e in SslModeEnum]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at it, I guess this list could be created at pg_service_parser/conf/service_settings.py
, and assign it to the "values"
key, instead of assigning the whole SslModeEnum
.
"description": "This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.", | ||
"values": SslModeEnum, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add tooltips for each value here, perhaps as a separate key (e.g., "value_tooltips"
) and assign a list of tooltips.
Now, this dict is growing as you said, we could perhaps address this in a follow-up PR later (I'll wait for your instructions regarding that).
for more information, see https://pre-commit.ci
Fix #42