Skip to content

Commit

Permalink
Merge pull request #4423 from AparnaKarve/plugin_shas_in_about_modal
Browse files Browse the repository at this point in the history
Display Plugin commit hashes in the About Modal
  • Loading branch information
Dan Clarizio authored Aug 17, 2018
2 parents 147bdfa + 646e0fd commit 62012b5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
21 changes: 21 additions & 0 deletions app/assets/stylesheets/about_modal_background.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,24 @@
background-image: image-url($img-bg-login-whitelabel);
background-size: 100% 100%;
}

::-webkit-scrollbar {
width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 10px #f5f5f5;
border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
background: #f5f5f5;
border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #b305500;
}
10 changes: 10 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,16 @@ def vmdb_build_info(key)
end
end

def plugin_name(engine)
start_marker = "ManageIQ::"
end_marker = "::Engine"
engine.to_s[/#{Regexp.escape(start_marker)}(.*?)#{Regexp.escape(end_marker)}/m, 1]
end

def vmdb_plugins_sha
Vmdb::Plugins.versions
end

def user_role_name
User.current_user.miq_user_role_name
end
Expand Down
7 changes: 7 additions & 0 deletions app/views/layouts/_about_modal.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
%strong
= session_info[0]
= session_info[1]
%strong
= _("Plugins")
%ul.list-unstyled{:style => "height: 40px;overflow: auto"}
- vmdb_plugins_sha.each do |engine, sha|
%div
= "#{plugin_name(engine)} #{sha}"

.trademark-pf
= I18n.t("product.copyright")
.modal-footer
Expand Down

0 comments on commit 62012b5

Please sign in to comment.