Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F887679
clients_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, Aug 10, 4:34 AM
Size
526 B
Mime Type
text/x-ruby
Expires
Tue, Aug 12, 4:34 AM (9 h, 25 m)
Engine
blob
Format
Raw Data
Handle
246375
Attached To
rARCHIVING archiving
clients_controller.rb
View Options
class
ClientsController
<
ApplicationController
before_action
:set_client
,
only
:
:show
# GET /clients
def
index
client_ids
=
Client
.
for_user
(
current_user
.
id
)
.
pluck
(
:ClientId
)
@clients
=
Client
.
where
(
ClientId
:
client_ids
)
.
includes
(
:jobs
)
@active_jobs
=
Job
.
running
.
where
(
ClientId
:
client_ids
)
.
group
(
:ClientId
)
.
count
@hosts
=
current_user
.
hosts
.
not_baculized
end
# GET /clients/1
def
show
;
end
private
def
set_client
@client
=
Client
.
for_user
(
current_user
.
id
)
.
find
(
params
[
:id
]
)
end
end
Event Timeline
Log In to Comment