mirror of
https://github.com/czhu12/canine.git
synced 2025-12-17 00:44:33 -06:00
85 lines
3.3 KiB
Plaintext
85 lines
3.3 KiB
Plaintext
<%= project_layout(@project) do %>
|
|
<div class="mb-4" data-controller="processes">
|
|
<h3 class="text-lg font-medium">Processes</h3>
|
|
<%= button_to project_processes_path(@project), method: :post, class: "btn btn-sm btn-primary" do %>
|
|
<iconify-icon icon="ic:baseline-plus"></iconify-icon>
|
|
Create One-Off Pod
|
|
<% end %>
|
|
<div class="help-text mt-2">
|
|
One-off pods are useful for running a single instance of a pod for a short period of time, so you can test something or run a command that doesn't need to be permanent.
|
|
</div>
|
|
</div>
|
|
<%= turbo_frame_tag "pod_logs" do %>
|
|
<% if @pods.empty? %>
|
|
<div>
|
|
<p class="text-gray-500">Nothing running for this project</p>
|
|
</div>
|
|
<% else %>
|
|
<table class="table mt-2 rounded-box" data-component="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<span class="text-sm font-medium text-base-content/80">Pod Name</span>
|
|
</th>
|
|
<th>
|
|
<span class="text-sm font-medium text-base-content/80">
|
|
Status
|
|
</span>
|
|
</th>
|
|
<th>
|
|
<span class="text-sm font-medium text-base-content/80">
|
|
Created At
|
|
</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @pods.each do |pod| %>
|
|
<tr class="cursor-pointer hover:bg-base-200/40">
|
|
<td>
|
|
<div class="flex items-center space-x-3 truncate">
|
|
<div class="font-medium">
|
|
<%= pod.metadata.name %>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="font-medium">
|
|
<%= pod.status.phase %>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="font-medium">
|
|
<%= Time.parse(pod.metadata.creationTimestamp).to_formatted_s(:short) %>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center space-x-2">
|
|
<div class="font-medium">
|
|
<%= link_to "Show Logs", project_process_path(@project, pod.metadata.name), class: "btn btn-sm btn-primary btn-outline" %>
|
|
</div>
|
|
|
|
<div class="font-medium">
|
|
<button class="btn btn-sm btn-info btn-outline" data-action="processes#showConnectionInstructions">Connect</button>
|
|
</div>
|
|
|
|
<div class="font-medium">
|
|
<% if pod.status.phase != "Running" || pod.metadata.labels.oneoff %>
|
|
<%= link_to "Delete", project_process_path(@project, pod.metadata.name), method: :delete, class: "btn btn-sm btn-error btn-outline" %>
|
|
<% else %>
|
|
<div role="tooltip" data-tip="Be careful when deleting running pods, it can cause downtime for your project" class="tooltip tooltip-secondary">
|
|
<%= link_to "Delete", project_process_path(@project, pod.metadata.name), method: :delete, class: "btn btn-sm btn-error btn-outline" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= render "projects/processes/connect_modal" %> |