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

Show a loader for running migrations #84

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

VladislavSokov
Copy link
Collaborator

Closes #79

Screenshot from 2024-07-19 17-47-39

Copy link
Member

@ka8725 ka8725 left a comment

Choose a reason for hiding this comment

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

Please consider the edge cases

@@ -2,7 +2,9 @@
<html>
<head>
<title>Migrations</title>
<%= stylesheet_link_tag 'actual_db_schema/styles', media: 'all' %>
<%= csrf_meta_tags %>
Copy link
Member

Choose a reason for hiding this comment

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

What's the point in using csrf_meta_tags here? Do we really need it taking into account that these forms will be used only in development mode?

const migrationActions = document.querySelectorAll('.migration-action');

migrationActions.forEach(button => {
button.addEventListener('click', function (event) {
Copy link
Member

Choose a reason for hiding this comment

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

Will the web server support multiple requests? Always? Consider the web server is configured to serve only one request at a time. How will it behave if the user clicks to run one migration and clicks another one without waiting for its response? Is it an acceptable solution to disable just the pressed button then?

@ka8725 ka8725 merged commit ac634fa into handle-errors-ui Jul 22, 2024
8 checks passed
@ka8725 ka8725 deleted the show-loader branch July 22, 2024 09:20
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.

2 participants