Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes #4796: Use Patternfly from Foreman core
  • Loading branch information
ehelms committed Jan 11, 2016
1 parent b148a38 commit d637aa2
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 43 deletions.
2 changes: 0 additions & 2 deletions app/assets/stylesheets/katello/_overrides.scss
@@ -1,7 +1,5 @@
$primary_color: rgb(0, 112, 143);
$static_width: 1152px;
$fa-font-path: "../bastion/font-awesome";


// Foreman Overrides
fieldset {
Expand Down
16 changes: 6 additions & 10 deletions app/assets/stylesheets/katello/katello.scss
@@ -1,9 +1,5 @@
@import "katello/overrides";

@import "bastion/font-awesome/scss/font-awesome";

@import "katello/katello_base";

@import "katello/look";

@import "katello/fancyqueries";
Expand All @@ -12,12 +8,12 @@
@import "katello/widgets/tabs";
@import "katello/katello_sprites";

@import "katello/jquery-ui-1.8.11.custom";
@import "katello/jquery.loadmask";
@import "katello/jquery.jnotify";
@import "katello/jquery.treeTable";
@import "katello/jquery.jscrollpane";
@import "katello/ui.spinner";
@import "katello/jquery-ui-1.8.11.custom.css";
@import "katello/jquery.loadmask.css";
@import "katello/jquery.jnotify.css";
@import "katello/jquery.treeTable.css";
@import "katello/jquery.jscrollpane.css";
@import "katello/ui.spinner.css";

@import "katello/contents";
@import "katello/generic";
Expand Down
@@ -1,4 +1,4 @@
.patternfly-styles {
.bastion {
@import "gpg-keys";
@import "systems";
@import "tasks";
Expand Down
@@ -1,10 +1,8 @@
.form {
.gpg-textarea {
width: 560px;
height: 300px;
font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,
Bitstream Vera Sans Mono,Courier New,monospace;
}
.form.gpg-textarea {
width: 560px;
height: 300px;
font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,
Bitstream Vera Sans Mono,Courier New,monospace;
}
.gpg-details.details {
width: 82%;
Expand All @@ -24,7 +22,7 @@
}
}
textarea {
.form.gpg-textarea;
@extend .form.gpg-textarea;
}

.value.editable {
Expand Down
2 changes: 1 addition & 1 deletion engines/bastion_katello/bastion_katello.gemspec
Expand Up @@ -16,5 +16,5 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,lib}/**/*"] + ["README"]
s.test_files = Dir["test/**/*"]

s.add_dependency "bastion", ">= 2.0.0", "< 3.0.0"
s.add_dependency "bastion", ">= 3.0.0", "< 4.0.0"
end
6 changes: 0 additions & 6 deletions engines/bastion_katello/lib/bastion_katello/engine.rb
Expand Up @@ -6,12 +6,6 @@ class Engine < ::Rails::Engine
app.middleware.use ::ActionDispatch::Static, "#{BastionKatello::Engine.root}/app/assets/javascripts/bastion_katello"
end

initializer "bastion.assets.paths", :group => :all do |app|
if defined? Less::Rails
app.config.less.paths << "#{BastionKatello::Engine.root}/app/assets/stylesheets/bastion_katello"
end
end

config.to_prepare do
consumer_cert_rpm = 'katello-ca-consumer-latest.noarch.rpm'
consumer_cert_rpm = SETTINGS[:katello][:consumer_cert_rpm] if SETTINGS.key?(:katello)
Expand Down
3 changes: 1 addition & 2 deletions katello.gemspec
Expand Up @@ -39,8 +39,7 @@ Gem::Specification.new do |gem|
# UI
gem.add_dependency "deface", '>= 1.0.0', '< 2.0.0'
gem.add_dependency "jquery-ui-rails"
gem.add_dependency "bastion", ">= 2.0.0", "< 3.0.0"
gem.add_development_dependency "less-rails", "~> 2.5.0"
gem.add_dependency "bastion", ">= 3.0.0", "< 4.0.0"

# Testing
gem.add_development_dependency "factory_girl_rails"
Expand Down
17 changes: 4 additions & 13 deletions lib/katello/engine.rb
Expand Up @@ -40,7 +40,7 @@ class Engine < ::Rails::Engine
require_dependency File.expand_path('../../../app/models/setting/katello.rb', __FILE__) if (Setting.table_exists? rescue(false))
end

initializer 'katello.configure_assets' do
initializer 'katello.configure_assets', :group => :all do
def find_assets(args = {})
type = args.fetch(:type, nil)
asset_dir = "#{Katello::Engine.root}/app/assets/#{type}/"
Expand All @@ -63,7 +63,8 @@ def find_assets(args = {})
precompile.concat(javascripts)
precompile.concat(images)

SETTINGS[:katello] = {:assets => {:precompile => precompile } }
SETTINGS[:katello] = {} unless SETTINGS.key?(:katello)
SETTINGS[:katello][:assets] = {:precompile => precompile}
end

initializer 'katello.assets.precompile', :after => 'katello.configure_assets' do |app|
Expand Down Expand Up @@ -112,16 +113,6 @@ def find_assets(args = {})
app.config.autoload_paths += Dir["#{config.root}/app/views/foreman"]
end

initializer "katello.assets.paths", :group => :all do |app|
if Rails.env.production?
app.config.assets.paths << Bastion::Engine.root.join('vendor', 'assets', 'stylesheets', 'bastion',
'font-awesome', 'scss')
else
app.config.sass.load_paths << Bastion::Engine.root.join('vendor', 'assets', 'stylesheets', 'bastion',
'font-awesome', 'scss')
end
end

initializer "katello.paths" do |app|
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/v2.rb"
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/rhsm.rb"
Expand Down Expand Up @@ -204,7 +195,7 @@ def find_assets(args = {})
::Api::V2::HostgroupsController.send :include, Katello::Concerns::Api::V2::HostgroupsControllerExtensions
end

initializer 'katello.register_plugin', :after => :finisher_hook do
config.after_initialize do
require 'katello/plugin'
require 'katello/permissions'
end
Expand Down

0 comments on commit d637aa2

Please sign in to comment.