Skip to content

Commit

Permalink
enable dynamic forms in the scripts#show page (#3330)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Feb 2, 2024
1 parent fca2dee commit 3b6fa19
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions apps/dashboard/app/javascript/script_show.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { makeChangeHandlers } from './dynamic_forms';

jQuery(function() {
makeChangeHandlers('script');
});
7 changes: 5 additions & 2 deletions apps/dashboard/app/lib/account_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ def queues
end

cluster_data = other_clusters.map do |other_cluster|
["data-option-for-cluster-#{other_cluster}", false]
end.to_h
[
["data-option-for-cluster-#{other_cluster}", false],
["data-option-for-auto-batch-clusters-#{other_cluster}", false]
]
end.flatten(1).to_h

cluster_queues.map do |queue|
unless blocked_queue?(queue)
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/app/views/scripts/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

<h1><%= @script.title %></h1>

<%= javascript_include_tag 'script_show', nonce: true %>
<%= link_to 'Back', project_path(params[:project_id]), class: 'btn btn-default my-3', title: 'Return to projects page' %>
Expand Down

0 comments on commit 3b6fa19

Please sign in to comment.