Commit 61c30061 authored by Phil Hughes's avatar Phil Hughes

audit log UI update

Closes #13862
parent 1fe9b933
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
.prepend-left-10 { margin-left:10px } .prepend-left-10 { margin-left:10px }
.prepend-left-default { margin-left:$gl-padding } .prepend-left-default { margin-left:$gl-padding }
.prepend-left-20 { margin-left:20px } .prepend-left-20 { margin-left:20px }
.append-right-5 { margin-right: 5px }
.append-right-10 { margin-right:10px } .append-right-10 { margin-right:10px }
.append-right-20 { margin-right:20px } .append-right-20 { margin-right:20px }
.append-bottom-10 { margin-bottom:10px } .append-bottom-10 { margin-bottom:10px }
......
...@@ -10,6 +10,15 @@ module IconsHelper ...@@ -10,6 +10,15 @@ module IconsHelper
options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options) options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options)
end end
def audit_icon(names, options = {})
case names
when "standard"
names = "key"
end
options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options)
end
def spinner(text = nil, visible = false) def spinner(text = nil, visible = false)
css_class = 'loading' css_class = 'loading'
css_class << ' hide' unless visible css_class << ' hide' unless visible
...@@ -37,7 +46,7 @@ module IconsHelper ...@@ -37,7 +46,7 @@ module IconsHelper
else # Gitlab::VisibilityLevel::PUBLIC else # Gitlab::VisibilityLevel::PUBLIC
'globe' 'globe'
end end
name << " fw" if fw name << " fw" if fw
icon(name) icon(name)
......
.table-holder %h5.prepend-top-0
%table.table#audits History of authentications
%thead
%tr %ul.well-list
%th Action - events.each do |event|
%th When %li
%span.description
= audit_icon(event.details[:with], class: "append-right-5")
Signed in with
= event.details[:with]
authentication
%span.pull-right
#{time_ago_in_words event.created_at} ago
%tbody
- events.each do |event|
%tr
%td
%span
Signed in with
%b= event.details[:with]
authentication
%td #{time_ago_in_words event.created_at} ago
= paginate events, theme: "gitlab" = paginate events, theme: "gitlab"
- page_title "Audit Log" - page_title "Audit Log"
- header_title page_title, audit_log_profile_path - header_title page_title, audit_log_profile_path
.alert.alert-help.prepend-top-default .row.prepend-top-default
History of authentications .col-lg-3.profile-settings-sidebar
%h3.prepend-top-0
.prepend-top-default = page_title
= render 'event_table', events: @events %p
This is a security log of important events involving your account.
.col-lg-9
= render 'event_table', events: @events
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment