Skip to content
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

Merged
merged 3 commits into from
Jul 16, 2024
Merged

[ux] Use a combobox to edit sslmode setting #45

merged 3 commits into from
Jul 16, 2024

Conversation

gacarrillor
Copy link
Contributor

image

Fix #42

Copy link
Member

@3nids 3nids left a 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]}
Copy link
Contributor Author

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,
Copy link
Contributor Author

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).

@3nids 3nids merged commit bed63da into main Jul 16, 2024
3 checks passed
@3nids 3nids deleted the sslmode branch July 16, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add SSL mode
2 participants