From 0f70d8cc25d4f5d07c232260388e10df05c94685 Mon Sep 17 00:00:00 2001 From: Ashton South Date: Fri, 30 Aug 2024 16:49:47 -0400 Subject: [PATCH] allow auto_cores to be fixed (#3768) --- apps/dashboard/app/controllers/launchers_controller.rb | 3 ++- .../app/lib/smart_attributes/attributes/auto_cores.rb | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/app/controllers/launchers_controller.rb b/apps/dashboard/app/controllers/launchers_controller.rb index dcd6bbd2f4..65d8b25312 100644 --- a/apps/dashboard/app/controllers/launchers_controller.rb +++ b/apps/dashboard/app/controllers/launchers_controller.rb @@ -8,7 +8,8 @@ class LaunchersController < ApplicationController SAVE_SCRIPT_KEYS = [ :cluster, :auto_accounts, :auto_accounts_exclude, :auto_accounts_fixed, - :auto_cores, :auto_scripts, :auto_scripts_exclude, :auto_scripts_fixed, + :auto_cores, :auto_cores_fixed, :auto_cores_min, :auto_cores_max, + :auto_scripts, :auto_scripts_exclude, :auto_scripts_fixed, :auto_queues, :auto_queues_exclude, :auto_queues_fixed, :auto_batch_clusters, :auto_batch_clusters_exclude, :auto_batch_clusters_fixed, :bc_num_slots, :bc_num_slots_fixed, :bc_num_slots_min, :bc_num_slots_max, diff --git a/apps/dashboard/app/lib/smart_attributes/attributes/auto_cores.rb b/apps/dashboard/app/lib/smart_attributes/attributes/auto_cores.rb index b84c997e99..ffb5afc304 100644 --- a/apps/dashboard/app/lib/smart_attributes/attributes/auto_cores.rb +++ b/apps/dashboard/app/lib/smart_attributes/attributes/auto_cores.rb @@ -13,8 +13,9 @@ def self.build_auto_cores(opts = {}) module Attributes class AutoCores < Attribute - def opts - @opts.reverse_merge(min: 1, step: 1) + def initialize(id, opts) + super(id, opts) + @opts = @opts.reverse_merge(min: 1, step: 1) end def widget