Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images for pluggable provider domains in Automate Explorer #11618

Merged
merged 1 commit into from
Oct 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/assets/images/100/miq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion app/presenters/tree_node_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def image_for_node(object, image)
case object
when MiqAeNamespace
if object.domain?
object.git_enabled? ? "ae_git_domain.png" : "ae_domain.png"
object.git_enabled? ? "ae_git_domain.png" : domain_png(object)
else
"ae_namespace.png"
end
Expand All @@ -317,6 +317,11 @@ def image_for_node(object, image)
end
end

def domain_png(object)
return 'miq.png' if object.name == MiqAeDatastore::MANAGEIQ_DOMAIN
object.top_level_namespace ? "vendor-#{object.top_level_namespace.downcase}.png" : "ae_domain.png"
end

def tooltip_prefix_for_node(object)
case object
when MiqAeNamespace
Expand Down
4 changes: 4 additions & 0 deletions app/views/miq_ae_class/_ns_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
%td.narrow
- if record.git_enabled?
%img{:src => image_path('100/ae_git_domain.png')}
- elsif record.name == MiqAeDatastore::MANAGEIQ_DOMAIN
%img{:src => image_path('100/miq.png')}
- elsif record.top_level_namespace
%img{:src => image_path("100/vendor-#{record.top_level_namespace.downcase}.png")}
- else
%i.fa.fa-2x.fa-globe
%td
Expand Down