Page MenuHomeSoftware Heritage

D7120.id25826.diff
No OneTemporary

D7120.id25826.diff

diff --git a/cypress/integration/vault.spec.js b/cypress/integration/vault.spec.js
--- a/cypress/integration/vault.spec.js
+++ b/cypress/integration/vault.spec.js
@@ -132,6 +132,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
// Check error alert is displayed
cy.get('.alert-danger')
.should('be.visible')
@@ -157,6 +160,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
// Create a vault cooking task through the GUI
cy.get('.modal-dialog')
.contains('button:visible', 'Ok')
@@ -229,6 +235,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
cy.window().then(win => {
const swhIdsContext = win.swh.webapp.getSwhIdsContext();
const browseDirectoryUrl = swhIdsContext.directory.swhid_with_context_url;
@@ -393,6 +402,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
// Create a vault cooking task through the GUI
cy.get('.modal-dialog')
.contains('button:visible', 'Ok')
@@ -424,6 +436,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
cy.wait('@checkVaultCookingTask');
// Create a vault cooking task through the GUI and fill email input
@@ -518,6 +533,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
// Start archive download through the GUI
cy.get('.modal-dialog')
.contains('button:visible', 'Ok')
@@ -571,6 +589,9 @@
cy.contains('button', 'Download')
.click();
+ cy.contains('button', 'as tarball')
+ .click();
+
// Check that recooking the directory is offered to user
cy.get('.modal-dialog')
.contains('button:visible', 'Ok')
diff --git a/swh/web/templates/includes/vault-create-tasks.html b/swh/web/templates/includes/vault-create-tasks.html
--- a/swh/web/templates/includes/vault-create-tasks.html
+++ b/swh/web/templates/includes/vault-create-tasks.html
@@ -8,33 +8,26 @@
{% load swh_templatetags %}
{% if vault_cooking %}
- {% if user.is_authenticated and user.is_staff or "swh.vault.git_bare.ui" in user.get_all_permissions %}
- <div class="btn-group">
- <button class="btn btn-default btn-sm dropdown-toggle swh-vault-download" type="button" data-toggle="dropdown">
- <i class="mdi mdi-download mdi-fw" aria-hidden="true"></i>
- Download
- </button>
- <div class="dropdown-menu swh-vault-menu">
- {% if vault_cooking.directory_context %}
- <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')">
- <i class="{{ swh_object_icons.directory }} mdi-fw" aria-hidden="true"></i>
- as tarball
- </button>
- {% endif %}
- {% if vault_cooking.revision_context %}
- <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('revision', '{{ vault_cooking.revision_swhid }}')">
- <i class="{{ swh_object_icons.revision }} mdi-fw" aria-hidden="true"></i>
- as git
- </button>
- {% endif %}
- </div>
- </div>
- {% else %}
- <button class="btn btn-default btn-sm swh-vault-download" type="button" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')">
+ <div class="btn-group">
+ <button class="btn btn-default btn-sm dropdown-toggle swh-vault-download" type="button" data-toggle="dropdown">
<i class="mdi mdi-download mdi-fw" aria-hidden="true"></i>
Download
</button>
- {% endif %}
+ <div class="dropdown-menu swh-vault-menu">
+ {% if vault_cooking.directory_context %}
+ <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')">
+ <i class="{{ swh_object_icons.directory }} mdi-fw" aria-hidden="true"></i>
+ as tarball
+ </button>
+ {% endif %}
+ {% if vault_cooking.revision_context %}
+ <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('revision', '{{ vault_cooking.revision_swhid }}')">
+ <i class="{{ swh_object_icons.revision }} mdi-fw" aria-hidden="true"></i>
+ as git
+ </button>
+ {% endif %}
+ </div>
+ </div>
<!-- modals related to the creation of vault cooking tasks -->

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 3, 12:32 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3232260

Event Timeline