Skip to content

Commit

Permalink
[webui] Add patternType in Kiwi Editor`
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kang committed Oct 5, 2017
1 parent 0f4b0c7 commit 22640e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/api/app/assets/stylesheets/webui/application/kiwi_image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
}
}

#kiwi-packages-list {
.pattern {
color: #999;
font-size: 1em;
border-bottom: 1px solid #999;
margin-left: 0;
margin-top: 20px;
padding-left: 5px;
padding-bottom: 5px;
}
}

#kiwi-repositories-list, #kiwi-packages-list {
padding-left: 10px;
padding-right: 10px;
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/kiwi/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def outdated?
end

def default_package_group
package_groups.find_or_create_by(kiwi_type: :image)
package_groups.type_image
end

def self.find_binaries_by_name(query, project, repositories, options = {})
Expand Down
2 changes: 2 additions & 0 deletions src/api/app/models/kiwi/package_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class Kiwi::PackageGroup < ApplicationRecord
# exist in Active Record, such as "delete"
enum kiwi_type: %i[bootstrap delete docker image iso lxc oem pxe split testsuite vmx], _prefix: :type

scope :type_image, -> { where(kiwi_type: :image) }

validates :kiwi_type, presence: true

accepts_nested_attributes_for :packages, reject_if: :all_blank, allow_destroy: true
Expand Down

0 comments on commit 22640e2

Please sign in to comment.