2021-02-03 21:23:38 +08:00
|
|
|
<div class="card experiment-card"
|
|
|
|
data-id="<%= experiment.id %>"
|
|
|
|
data-edit-url=""
|
2022-09-02 19:57:52 +08:00
|
|
|
data-permissions-url="<%= permissions_experiment_path(experiment) %>">
|
2021-01-29 05:47:08 +08:00
|
|
|
<div class="checkbox-cell table-cell">
|
2022-11-07 22:51:39 +08:00
|
|
|
<div class="sci-checkbox-container">
|
|
|
|
<input value="1" type="checkbox" class="sci-checkbox experiment-card-selector">
|
|
|
|
<span class="sci-checkbox-label"></span>
|
|
|
|
</div>
|
2021-01-29 05:47:08 +08:00
|
|
|
</div>
|
2022-12-09 16:57:30 +08:00
|
|
|
|
2022-10-28 19:16:02 +08:00
|
|
|
<div class="experiment-code-cell table-cell">
|
2022-10-28 14:49:13 +08:00
|
|
|
<span><%= experiment.code %></span>
|
|
|
|
</div>
|
2022-12-13 20:14:51 +08:00
|
|
|
<div class="actions actions-cell table-cell">
|
|
|
|
<div class="dropdown dropdown-async experiment-actions-menu" data-dropdown-url="<%= actions_dropdown_experiment_path(experiment) %>">
|
2023-06-15 21:12:51 +08:00
|
|
|
<button class="btn btn-light btn-xs dropdown-toggle icon-btn" type="button" id="experimentActionsDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
2023-06-08 14:33:37 +08:00
|
|
|
<i class="sn-icon sn-icon-more-hori"></i>
|
2022-12-13 20:14:51 +08:00
|
|
|
</button>
|
|
|
|
<ul></ul>
|
|
|
|
</div>
|
2022-10-28 19:16:02 +08:00
|
|
|
</div>
|
2021-01-29 05:47:08 +08:00
|
|
|
<div class="experiment-name-cell table-cell">
|
2021-02-16 22:26:51 +08:00
|
|
|
<div class="workflow-img-wrapper" list-render="true">
|
|
|
|
<%= render partial: 'projects/show/experiment_workflow_image_container', locals: { experiment: experiment } %>
|
2021-02-04 23:39:29 +08:00
|
|
|
</div>
|
2023-05-25 14:53:12 +08:00
|
|
|
<% if experiment.archived_branch? %>
|
|
|
|
<%= link_to experiment.name, module_archive_experiment_url(experiment), title: experiment.name, class: 'name-link' %>
|
|
|
|
<% else %>
|
|
|
|
<%= link_to experiment.name, my_modules_experiment_url(experiment), title: experiment.name, class: 'name-link' %>
|
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
</div>
|
2021-02-04 16:02:23 +08:00
|
|
|
<div class="dates-and-img-container">
|
|
|
|
<div class="dates-container">
|
|
|
|
<div class="data-row start-date-cell table-cell">
|
2021-02-04 23:39:29 +08:00
|
|
|
<span class="card-label" cards-render="true"><%= t('experiments.card.start_date') %></span>
|
2021-02-04 16:02:23 +08:00
|
|
|
<span class="card-value"><%= l(experiment.created_at, format: :full_date) %></span>
|
|
|
|
</div>
|
2022-12-19 18:32:32 +08:00
|
|
|
|
|
|
|
<div class="data-row modified-date-cell table-cell">
|
|
|
|
<span class="card-label" cards-render="true"><%= t('experiments.card.modified_date') %></span>
|
|
|
|
<span class="card-value"><%= l(experiment.updated_at, format: :full_date) %></span>
|
|
|
|
</div>
|
2022-10-28 14:49:13 +08:00
|
|
|
|
2021-02-04 23:39:29 +08:00
|
|
|
<% if experiment.archived_branch? %>
|
|
|
|
<div class="data-row archived-date-cell table-cell">
|
|
|
|
<span class="card-label" cards-render="true"><%= t('experiments.card.archived_date') %></span>
|
2021-05-16 17:04:04 +08:00
|
|
|
<span class="card-value"><%= l(experiment.archived_on || project.archived_on, format: :full_date) %></span>
|
2021-02-04 23:39:29 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2022-11-02 15:18:18 +08:00
|
|
|
<div class="data-row" cards-render="true">
|
2021-02-04 16:02:23 +08:00
|
|
|
<span class="card-label"><%= t('experiments.card.completed_task') %></span>
|
2021-02-10 21:50:42 +08:00
|
|
|
<span class="card-value"><%= t('experiments.card.completed_value', completed: experiment.completed_task_count, all: experiment.task_count) %></span>
|
2021-02-04 16:02:23 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-16 22:26:51 +08:00
|
|
|
<div class="workflow-img-wrapper" cards-render="true">
|
|
|
|
<%= render partial: 'projects/show/experiment_workflow_image_container', locals: { experiment: experiment } %>
|
2021-02-04 16:02:23 +08:00
|
|
|
</div>
|
2021-01-29 05:47:08 +08:00
|
|
|
</div>
|
2021-02-10 21:50:42 +08:00
|
|
|
<div class="completed-task-cell table-cell" data-view-mode="active">
|
|
|
|
<span class="card-value" list-render="true"><%= t('experiments.card.completed_value', completed: experiment.completed_task_count, all: experiment.task_count) %></span>
|
2021-02-04 23:39:29 +08:00
|
|
|
<div class="progress-bar-container progress ">
|
2021-02-10 21:50:42 +08:00
|
|
|
<% percentage = experiment.task_count.positive? ? ((100/experiment.task_count) * experiment.completed_task_count) : 0 %>
|
2021-02-04 23:39:29 +08:00
|
|
|
<div class="progress-bar"
|
|
|
|
role="progressbar"
|
|
|
|
aria-valuenow="<%= percentage %>%"
|
|
|
|
aria-valuemin="0"
|
|
|
|
aria-valuemax="100"
|
|
|
|
style="width:<%= percentage %>%; min-width: 2em;">
|
|
|
|
</div>
|
2021-02-04 16:02:23 +08:00
|
|
|
</div>
|
2021-01-29 05:47:08 +08:00
|
|
|
</div>
|
2021-02-04 16:02:23 +08:00
|
|
|
<div class="description-cell table-cell">
|
|
|
|
<div class="description-text">
|
|
|
|
<%= custom_auto_link(experiment.description, team: current_team) %>
|
|
|
|
</div>
|
2021-02-16 19:42:09 +08:00
|
|
|
<% if experiment.description.present? && experiment.description.length > Constants::EXPERIMENT_LONG_DESCRIPTION %>
|
2021-02-04 23:39:29 +08:00
|
|
|
<%= link_to t('experiments.card.more'),
|
|
|
|
experiment_path(experiment),
|
2021-02-11 19:41:22 +08:00
|
|
|
class: 'more-button experiment-action-link',
|
2021-02-04 23:39:29 +08:00
|
|
|
remote: true %>
|
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
</div>
|
|
|
|
</div>
|