Changeset View
Changeset View
Standalone View
Standalone View
assets/src/bundles/vault/vault-table-row.ejs
<%# | <%# | ||||
Copyright (C) 2020 The Software Heritage developers | Copyright (C) 2020 The Software Heritage developers | ||||
See the AUTHORS file at the top-level directory of this distribution | See the AUTHORS file at the top-level directory of this distribution | ||||
License: GNU Affero General Public License version 3, or any later version | License: GNU Affero General Public License version 3, or any later version | ||||
See top-level LICENSE file for more information | See top-level LICENSE file for more information | ||||
%> | %> | ||||
<% if (cookingTask.object_type === 'directory') { %> | <% if (cookingTask.object_type === 'directory') { %> | ||||
<tr id="vault-task-<%= cookingTask.object_id %>" | <tr id="vault-task-<%= cookingTask.swhid %>" | ||||
title="Once downloaded, the directory can be extracted with the following command: | title="Once downloaded, the directory can be extracted with the following command: | ||||
$ tar xvzf <%= cookingTask.object_id %>.tar.gz"> | $ tar xvzf <%= cookingTask.swhid %>.tar.gz"> | ||||
<% } else { %> | <% } else { %> | ||||
<tr id="vault-task-<%= cookingTask.object_id %>" | <tr id="vault-task-<%= cookingTask.swhid %>" | ||||
title="Once downloaded, the git repository can be imported with the following commands: | title="Once downloaded, the git repository can be imported with the following commands: | ||||
$ git init | $ git init | ||||
$ zcat <%= cookingTask.object_id %>.gitfast.gz | git fast-import"> | $ zcat <%= cookingTask.swhid %>.gitfast.gz | git fast-import"> | ||||
<% } %> | <% } %> | ||||
<td> | <td> | ||||
<div class="custom-control custom-checkbox"> | <div class="custom-control custom-checkbox"> | ||||
<input type="checkbox" class="custom-control-input vault-task-toggle-selection" | <input type="checkbox" class="custom-control-input vault-task-toggle-selection" | ||||
id="vault-task-toggle-selection-<%= cookingTask.object_id %>"/> | id="vault-task-toggle-selection-<%= cookingTask.swhid %>"/> | ||||
<label class="custom-control-label" | <label class="custom-control-label" | ||||
for="vault-task-toggle-selection-<%= cookingTask.object_id %>"> | for="vault-task-toggle-selection-<%= cookingTask.swhid %>"> | ||||
</label> | </label> | ||||
</td> | </td> | ||||
<% if (cookingTask.origin) { %> | <% if (cookingTask.origin) { %> | ||||
<td class="vault-origin"> | <td class="vault-origin"> | ||||
<a href="<%= Urls.browse_origin() %>?origin_url=<%= cookingTask.origin %>"> | <a href="<%= Urls.browse_origin() %>?origin_url=<%= cookingTask.origin %>"> | ||||
<%= decodeURIComponent(cookingTask.origin) %> | <%= decodeURIComponent(cookingTask.origin) %> | ||||
</a> | </a> | ||||
</td> | </td> | ||||
<% } else { %> | <% } else { %> | ||||
<td class="vault-origin">unknown</td> | <td class="vault-origin">unknown</td> | ||||
<% } %> | <% } %> | ||||
<td> | <td> | ||||
<i class="<%= swh.webapp.getSwhObjectIcon(cookingTask.object_type) %> mdi-fw"></i> | <i class="<%= swh.webapp.getSwhObjectIcon(cookingTask.object_type) %> mdi-fw"></i> | ||||
<%= cookingTask.object_type %> | <%= cookingTask.object_type %> | ||||
</td> | </td> | ||||
<td class="vault-object-info" data-object-id="<%= cookingTask.object_id %>"> | <td class="vault-object-info" data-swhid="<%= cookingTask.swhid %>"> | ||||
<b>id:</b> <a href="<%= browseUrl %>"><%= cookingTask.object_id %></a> | <b>id:</b> <a href="<%= browseUrl %>"><%= cookingTask.swhid %></a> | ||||
<% if (cookingTask.path) { %> | <% if (cookingTask.path) { %> | ||||
<br/><b>path:</b> <%= cookingTask.path %> | <br/><b>path:</b> <%= cookingTask.path %> | ||||
<% } %> | <% } %> | ||||
</td> | </td> | ||||
<td><%- progressBar.outerHTML %></td> | <td><%- progressBar.outerHTML %></td> | ||||
<td class="vault-dl-link"> | <td class="vault-dl-link"> | ||||
<% if (cookingTask.status === 'done') { %> | <% if (cookingTask.status === 'done') { %> | ||||
<button class="btn btn-default btn-sm" | <button class="btn btn-default btn-sm" | ||||
onclick="swh.vault.fetchCookedObject('<%= cookingTask.fetch_url %>')"> | onclick="swh.vault.fetchCookedObject('<%= cookingTask.fetch_url %>')"> | ||||
<i class="mdi mdi-download mdi-fw" aria-hidden="true"></i>Download | <i class="mdi mdi-download mdi-fw" aria-hidden="true"></i>Download | ||||
</button> | </button> | ||||
<% } %> | <% } %> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
No newline at end of file |