From eea92bd9a4b7fa5e4942e508926b73f95a2c639d Mon Sep 17 00:00:00 2001 From: Meghan Chua <17057809+malchua@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:20:53 -0600 Subject: [PATCH 01/57] Add migration to add shared_with_namespace column to workflow executions --- ...29_add_shared_with_namespace_to_workflow_executions.rb | 8 ++++++++ db/schema.rb | 1 + 2 files changed, 9 insertions(+) create mode 100644 db/migrate/20250108200329_add_shared_with_namespace_to_workflow_executions.rb diff --git a/db/migrate/20250108200329_add_shared_with_namespace_to_workflow_executions.rb b/db/migrate/20250108200329_add_shared_with_namespace_to_workflow_executions.rb new file mode 100644 index 0000000000..5fa9ad4190 --- /dev/null +++ b/db/migrate/20250108200329_add_shared_with_namespace_to_workflow_executions.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +# Migration to add a new shared_with_namespace column to the workflow executions table +class AddSharedWithNamespaceToWorkflowExecutions < ActiveRecord::Migration[7.2] + def change + add_column :workflow_executions, :shared_with_namespace, :boolean, default: false, null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index ca8c7f3b1e..95eb413b05 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -335,6 +335,7 @@ t.uuid "namespace_id" t.boolean "cleaned", default: false, null: false t.jsonb "log_data" + t.boolean "shared_with_namespace", default: false, null: false t.index ["created_at"], name: "index_workflow_executions_on_created_at" t.index ["namespace_id"], name: "index_workflow_executions_on_namespace_id" t.index ["state"], name: "index_workflow_executions_on_state" From ee9c1c030bf51364b3e4f02ed94ff17c42383a6d Mon Sep 17 00:00:00 2001 From: Meghan Chua <17057809+malchua@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:22:19 -0600 Subject: [PATCH 02/57] Add checkbox to workflow execution creation form --- app/components/nextflow_component.html.erb | 24 +++++++++++++++++++ .../workflow_executions_controller.rb | 3 ++- config/locales/en.yml | 1 + config/locales/fr.yml | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/app/components/nextflow_component.html.erb b/app/components/nextflow_component.html.erb index 83c0327193..2c0cf69059 100644 --- a/app/components/nextflow_component.html.erb +++ b/app/components/nextflow_component.html.erb @@ -118,6 +118,30 @@ t(:"components.nextflow.email_notification"), class: "mr-2 text-sm font-medium text-slate-900 dark:text-white" %> +
+ <%= workflow.check_box :shared_with_namespace, + { + checked: + instance.present? && instance["shared_with_namespace"], + class: + "w-4 + h-4 + mr-2.5 + text-primary-600 + bg-slate-100 + border-slate-300 + rounded + focus:ring-primary-500 + dark:focus:ring-primary-600 + dark:ring-offset-slate-800 + focus:ring-2 + dark:bg-slate-700 + dark:border-slate-600", + } %> + <%= workflow.label :shared_with_namespace, + t(:"components.nextflow.shared_with_namespace"), + class: "mr-2 text-sm font-medium text-slate-900 dark:text-white" %> +
<% end %>