Skip to content

Commit

Permalink
move state on workflow show page from header to summary table
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHuynh333 committed Nov 1, 2024
1 parent 45a8374 commit a1f1089
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
6 changes: 1 addition & 5 deletions app/components/viral/page_header_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
inline text-2xl font-medium leading-tight text-slate-900 dark:text-white
"
><%= title %></h1>
<% if @id_color %>
<%= viral_pill(text: id, color: @id_color, border: true) %>
<% else %>
<%= render PuidComponent.new(puid: id) %>
<% end %>
<%= render PuidComponent.new(puid: id) %>
</div>
<% else %>
<h1
Expand Down
4 changes: 4 additions & 0 deletions app/views/projects/workflow_executions/_summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<dd class="text-lg font-semibold text-slate-900 dark:text-white"><%= @workflow_execution.name %></dd>
</div>
<% end %>
<div class="flex flex-col py-3">
<dt class="mb-1 text-slate-500 md:text-lg dark:text-slate-400"><%= t(:".state") %></dt>
<dd class="text-lg font-semibold text-slate-900 dark:text-white"><%= viral_pill(text: t("workflow_executions.state.#{@workflow_execution.state}"), color: retrieve_pill_color('workflow_executions', @workflow_execution.state), border: true) %></dd>
</div>
<div class="flex flex-col py-3">
<dt class="mb-1 text-slate-500 md:text-lg dark:text-slate-400"><%= t(:".workflow_name") %></dt>
<dd class="text-lg font-semibold text-slate-900 dark:text-white"><%= @workflow_execution.metadata["workflow_name"] %></dd>
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/workflow_executions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= turbo_frame_tag "export_dialog" %>
<%= render Viral::PageHeaderComponent.new(title: @workflow_execution.id, id: t("workflow_executions.state.#{@workflow_execution.state}"), id_color: retrieve_pill_color('workflow_executions', @workflow_execution.state)) do |component| %>
<%= render Viral::PageHeaderComponent.new(title: @workflow_execution.id) do |component| %>
<%= component.with_icon(name: "beaker", classes: "h-14 w-14 text-primary-700") %>
<%= component.with_buttons do %>
<div class="flex flex-row">
Expand Down
4 changes: 4 additions & 0 deletions app/views/workflow_executions/_summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<dd class="text-lg font-semibold text-slate-900 dark:text-white"><%= @workflow_execution.name %></dd>
</div>
<% end %>
<div class="flex flex-col py-3">
<dt class="mb-1 text-slate-500 md:text-lg dark:text-slate-400"><%= t(:".state") %></dt>
<dd class="text-lg font-semibold text-slate-900 dark:text-white"><%= viral_pill(text: t("workflow_executions.state.#{@workflow_execution.state}"), color: retrieve_pill_color('workflow_executions', @workflow_execution.state), border: true) %></dd>
</div>
<div class="flex flex-col py-3">
<dt class="mb-1 text-slate-500 md:text-lg dark:text-slate-400"><%= t(:".workflow_name") %></dt>
<dd class="text-lg font-semibold text-slate-900 dark:text-white"><%= @workflow_execution.metadata["workflow_name"] %></dd>
Expand Down
2 changes: 1 addition & 1 deletion app/views/workflow_executions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= turbo_frame_tag "export_dialog" %>
<%= render Viral::PageHeaderComponent.new(title: @workflow_execution.id, id: t("workflow_executions.state.#{@workflow_execution.state}"), id_color: retrieve_pill_color('workflow_executions', @workflow_execution.state)) do |component| %>
<%= render Viral::PageHeaderComponent.new(title: @workflow_execution.id) do |component| %>
<%= component.with_icon(name: "beaker", classes: "h-14 w-14 text-primary-700") %>
<%= component.with_buttons do %>
<div class="flex flex-row">
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ en:
created_at: Created
name: Name
run_id: Run ID
state: State
updated_at: Last Updated
workflow_name: Workflow Name
workflow_version: Workflow Version
Expand Down Expand Up @@ -1764,6 +1765,7 @@ en:
created_at: Created
name: Name
run_id: Run ID
state: State
updated_at: Last Updated
workflow_name: Workflow Name
workflow_version: Workflow Version
2 changes: 2 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ fr:
created_at: Created
name: Name
run_id: Run ID
state: State
updated_at: Last Updated
workflow_name: Workflow Name
workflow_version: Workflow Version
Expand Down Expand Up @@ -1764,6 +1765,7 @@ fr:
created_at: Created
name: Name
run_id: Run ID
state: State
updated_at: Last Updated
workflow_name: Workflow Name
workflow_version: Workflow Version

0 comments on commit a1f1089

Please sign in to comment.