@@ -45,6 +48,16 @@
class: "button button--state-default button--size-default mr-1"
) %>
<% end %>
+ <% if allowed_to?(:update?, @workflow_execution) %>
+ <%= link_to(
+ t("workflow_executions.show.edit_button"),
+ edit_workflow_execution_path(id: @workflow_execution.id),
+ data: {
+ turbo_stream: true
+ },
+ class: "button button--state-default button--size-default mr-1"
+ ) %>
+ <% end %>
<% if @workflow_execution.deletable? %>
<%= link_to(
t("workflow_executions.show.remove_button"),
diff --git a/app/views/workflow_executions/update.turbo_stream.erb b/app/views/workflow_executions/update.turbo_stream.erb
index e69de29bb2..345d9a71c6 100644
--- a/app/views/workflow_executions/update.turbo_stream.erb
+++ b/app/views/workflow_executions/update.turbo_stream.erb
@@ -0,0 +1,25 @@
+<% unless @workflow_execution.errors.any? %>
+ <%= turbo_stream.append "flashes" do %>
+ <%= viral_flash(type:, data: message) %>
+ <% end %>
+<% end %>
+
+<% if @updated %>
+ <%= turbo_stream.update "edit_dialog",
+ partial: "edit_dialog",
+ locals: {
+ open: @workflow_execution.errors.any?,
+ workflow_execution: @workflow_execution,
+ } %>
+
+ <%= turbo_stream.update "we_name" do %>
+ <%= @workflow_execution.name %>
+ <% end %>
+
+ <%= turbo_stream.update "we_name_header" do %>
+ <%= @workflow_execution.name %>
+ <% end %>
+<% else %>
+ <%= turbo_stream.update "edit_workflow_execution_error_alert",
+ viral_alert(type:, message:, classes: "mb-4") %>
+<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 26af7d1fd7..70f8d65fc2 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -95,6 +95,7 @@ en:
cancel?: You are not authorized to cancel workflow executions for %{namespace_type} %{name}
create?: You are not authorized to submit workflow executions for %{namespace_type} %{name}
destroy?: You are not authorized to destroy workflow executions for %{namespace_type} %{name}
+ edit?: You are not authorized to edit workflow execution %{id}
index?: You are not authorized to view workflow executions for %{namespace_type} %{name}
read?: You are not authorized to view workflow execution %{id}
update?: You are not authorized to update workflow execution %{id}
@@ -451,6 +452,9 @@ en:
destroy:
error: Could not delete workflow %{workflow_name}
success: Workflow %{workflow_name} was successfully deleted
+ update:
+ error: Could not update workflow %{workflow_name}
+ success: Workflow %{workflow_name} was successfully updated
dashboard:
groups:
index:
@@ -1492,6 +1496,12 @@ en:
update:
success: Project %{project_name} was successfully updated
workflow_executions:
+ edit_dialog:
+ cancel_button: Cancel
+ description: You are editing automated workflow execution '%{workflow_execution_id}'
+ name_placeholder: Enter workflow execution name (optional)
+ submit_button: Submit
+ title: Edit automated workflow execution
files:
table_header:
created_at: Created At
@@ -1512,6 +1522,7 @@ en:
cancel_button: Cancel
cancel_button_confirmation: Are you sure that you want to cancel this workflow execution?
create_export_button: Create Export
+ edit_button: Edit
remove_button: Remove
remove_button_confirmation: Are you sure that you want to remove this workflow execution?
summary:
@@ -1698,6 +1709,12 @@ en:
add_all: Add all
remove_all: Remove all
workflow_executions:
+ edit_dialog:
+ cancel_button: Cancel
+ description: You are editing workflow execution '%{workflow_execution_id}'
+ name_placeholder: Enter workflow execution name (optional)
+ submit_button: Submit
+ title: Edit workflow execution
files:
table_header:
created_at: Created At
@@ -1724,6 +1741,7 @@ en:
cancel_button: Cancel
cancel_button_confirmation: Are you sure that you want to cancel this workflow execution?
create_export_button: Create Export
+ edit_button: Edit
remove_button: Remove
remove_button_confirmation: Are you sure that you want to remove this workflow execution?
tabs:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 3df04efbb1..684f89c780 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -95,6 +95,7 @@ fr:
cancel?: You are not authorized to cancel workflow executions for %{namespace_type} %{name}
create?: You are not authorized to submit workflow executions for %{namespace_type} %{name}
destroy?: You are not authorized to destroy workflow executions for %{namespace_type} %{name}
+ edit?: You are not authorized to edit workflow execution %{id}
index?: You are not authorized to view workflow executions for %{namespace_type} %{name}
read?: You are not authorized to view workflow execution %{id}
update?: You are not authorized to update workflow execution %{id}
@@ -451,6 +452,9 @@ fr:
destroy:
error: Could not delete workflow %{workflow_name}
success: Workflow %{workflow_name} was successfully deleted
+ update:
+ error: Could not update workflow %{workflow_name}
+ success: Workflow %{workflow_name} was successfully updated
dashboard:
groups:
index:
@@ -1492,6 +1496,12 @@ fr:
update:
success: Project %{project_name} was successfully updated
workflow_executions:
+ edit_dialog:
+ cancel_button: Cancel
+ description: You are editing automated workflow execution '%{workflow_execution_id}'
+ name_placeholder: Enter workflow execution name (optional)
+ submit_button: Submit
+ title: Edit automated workflow execution
files:
table_header:
created_at: Created At
@@ -1512,6 +1522,7 @@ fr:
cancel_button: Cancel
cancel_button_confirmation: Are you sure that you want to cancel this workflow execution?
create_export_button: Create Export
+ edit_button: Edit
remove_button: Remove
remove_button_confirmation: Are you sure that you want to remove this workflow execution?
summary:
@@ -1698,6 +1709,12 @@ fr:
add_all: Add all
remove_all: Remove all
workflow_executions:
+ edit_dialog:
+ cancel_button: Cancel
+ description: You are editing workflow execution '%{workflow_execution_id}'
+ name_placeholder: Enter workflow execution name (optional)
+ submit_button: Submit
+ title: Edit workflow execution
files:
table_header:
created_at: Created At
@@ -1724,6 +1741,7 @@ fr:
cancel_button: Cancel
cancel_button_confirmation: Are you sure that you want to cancel this workflow execution?
create_export_button: Create Export
+ edit_button: Edit
remove_button: Remove
remove_button_confirmation: Are you sure that you want to remove this workflow execution?
tabs: