Skip to content

Commit

Permalink
Merge pull request #369 from UffizziCloud/feature/362_one_click_previ…
Browse files Browse the repository at this point in the history
…ew_enviironments

Feature/362 one click preview enviironments
  • Loading branch information
moklidia authored Jan 26, 2023
2 parents 7884aa9 + 037f2a0 commit 4010c5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/app/lib/uffizzi_core/concerns/models/compose_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module UffizziCore::Concerns::Models::ComposeFile
has_many :host_volume_files, dependent: :destroy
has_many :deployments, dependent: :nullify

enumerize :kind, in: [:main, :temporary], predicates: true, scope: :shallow, default: :main
enumerize :kind, in: UffizziCore.compose_file_kinds, predicates: true, scope: :shallow, default: :main

validates :source, presence: true
validate :main_compose_file_uniqueness, on: :create, if: -> { kind.main? }
Expand Down
2 changes: 1 addition & 1 deletion core/app/lib/uffizzi_core/concerns/models/deployment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module UffizziCore::Concerns::Models::Deployment

validates :kind, presence: true

enumerize :creation_source, in: [:manual, :continuous_preview, :compose_file_manual, :compose_file_continuous_preview],
enumerize :creation_source, in: [:manual, :demo, :continuous_preview, :compose_file_manual, :compose_file_continuous_preview],
predicates: true, scope: true, default: :manual

accepts_nested_attributes_for :containers, allow_destroy: true
Expand Down
1 change: 1 addition & 0 deletions core/lib/uffizzi_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ module UffizziCore
mattr_accessor :user_creation_sources, default: [:system, :online_registration, :google, :sso]
mattr_accessor :user_project_roles, default: [:admin, :developer, :viewer]
mattr_accessor :account_sources, default: [:manual]
mattr_accessor :compose_file_kinds, default: [:main, :temporary]
end

0 comments on commit 4010c5d

Please sign in to comment.