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

UI/Add Elasticsearch DB #12672

Merged
merged 24 commits into from Oct 7, 2021
Merged

UI/Add Elasticsearch DB #12672

merged 24 commits into from Oct 7, 2021

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented Sep 29, 2021

Adds Elasticsearch DB support to UI. Also now UI shows empty state when a database is connected via CLI but unsupported by the UI

Screen Shot 2021-10-06 at 4 22 57 PM

Screen Shot 2021-10-06 at 4 23 15 PM

@hellobontempo hellobontempo changed the title wip//changes linked block to angle bracket' UI/Add Elasticsearch DB Sep 29, 2021
@vercel vercel bot temporarily deployed to Preview – vault October 1, 2021 17:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook October 1, 2021 17:44 Inactive
@hellobontempo hellobontempo marked this pull request as ready for review October 1, 2021 17:46
@hellobontempo hellobontempo added this to the 1.9 milestone Oct 1, 2021
@vercel vercel bot temporarily deployed to Preview – vault October 1, 2021 18:11 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook October 1, 2021 18:18 Inactive
@vercel vercel bot temporarily deployed to Preview – vault October 6, 2021 22:46 Inactive
tls_server_name: attr('string', {
label: 'TLS server name',
subText: 'If set, this name is used to set the SNI host when connecting via 1TLS.',
}),
root_rotation_statements: attr({
subText: `The database statements to be executed to rotate the root user's credentials. If nothing is entered, Vault will use a reasonable default.`,
editType: 'stringArray',
defaultShown: 'Default',
}),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Databases unsupported by the UI will trigger EmptyState components in templates

@@ -106,9 +103,9 @@ export default Model.extend({
'username',
'rotation_period',
'creation_statements',
'creation_statement', // only for MongoDB (styling difference)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer just for MongoDB, Elasticsearch needed as well :)

subText:
'The connection string used to connect to the database. This allows for simple templating of username and password of the root user.',
label: 'URL',
subText: `The URL for Elasticsearch's API ("https://localhost:9200").`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connection works if http://127.0.0.1:9200 or https://localhost:9200

@@ -10,7 +10,10 @@ export default create({
dbPlugin: selectable('[data-test-input="plugin_name"]'),
name: fillable('[data-test-input="name"]'),
toggleVerify: clickable('[data-test-input="verify_connection"]'),
url: fillable('[data-test-input="connection_url"'),
connectionUrl: fillable('[data-test-input="connection_url"]'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed selector to match attribute name now that we have both connection_url and url inputs

{{/if}}
</ToolbarActions>
</Toolbar>
{{#if @model.isAvailablePlugin}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions, but granted none of them have any issues, this looks great. Nice work. (edit: and there's a failing UI test).

@hellobontempo
Copy link
Contributor Author

A couple of questions, but granted none of them have any issues, this looks great. Nice work. (edit: and there's a failing UI test).

Aha! Found the error - thanks for your comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants