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.swhid.match(/^swh:1:dir:.*/)) { %> | ||||
<tr id="vault-task-<%= cookingTask.swhid %>" | <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.swhid %>.tar.gz"> | $ tar xvzf <%= cookingTask.swhid %>.tar.gz"> | ||||
<% } else { %> | <% } else { %> | ||||
<tr id="vault-task-<%= cookingTask.swhid %>" | <tr id="vault-task-<%= cookingTask.swhid %>" | ||||
title="Once downloaded, the git repository can be imported to a 'new_repository' directory with the following commands: | title="Once downloaded, the git repository can be imported to a 'new_repository' directory with the following commands: | ||||
Show All 14 Lines | <% if (cookingTask.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.swhid.match(/swh:1:([a-z]+):/)[1]) %> mdi-fw"></i> | ||||
<%= cookingTask.object_type %> | <%= cookingTask.bundle_type %> | ||||
</td> | </td> | ||||
<td class="vault-object-info" data-swhid="<%= cookingTask.swhid %>"> | <td class="vault-object-info" data-swhid="<%= cookingTask.swhid %>"> | ||||
<b>id:</b> <a href="<%= browseUrl %>"><%= cookingTask.swhid %></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> | ||||
Show All 9 Lines |