Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1431115
users_controller.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 18, 3:00 PM
Size
686 B
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 3:00 PM (18 h, 32 m)
Engine
blob
Format
Raw Data
Handle
326580
Attached To
rARCHIVING archiving
users_controller.rb
View Options
class
Admin
::
UsersController
<
Admin
::
BaseController
# GET /admin/users
def
index
@baculized_host_names
=
Hash
.
new
{
|
h
,
k
|
h
[
k
]
=
[]
}
@non_baculized_host_names
=
Hash
.
new
{
|
h
,
k
|
h
[
k
]
=
[]
}
@unverified_host_names
=
Hash
.
new
{
|
h
,
k
|
h
[
k
]
=
[]
}
@users
=
User
.
all
.
includes
(
:hosts
)
@users
.
each
do
|
user
|
user
.
hosts
.
each
do
|
host
|
if
host
.
deployed?
||
host
.
updated?
||
host
.
dispatched?
||
host
.
for_removal?
@baculized_host_names
[
user
.
id
]
<<
host
.
name
else
@non_baculized_host_names
[
user
.
id
]
<<
host
.
name
@unverified_host_names
[
user
.
id
]
<<
host
.
name
if
!
host
.
verified?
end
end
end
end
end
Event Timeline
Log In to Comment