Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F887601
hosts_helper.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, 3:03 AM
Size
670 B
Mime Type
text/x-ruby
Expires
Tue, Aug 12, 3:03 AM (5 h, 44 m)
Engine
blob
Format
Raw Data
Handle
230028
Attached To
rARCHIVING archiving
hosts_helper.rb
View Options
module
HostsHelper
# Returns an html span with the host's status
def
host_status_label
(
host
)
return
unless
host
case
when
host
.
pending?
klass
=
"default"
when
host
.
configured?
klass
=
"warning"
when
host
.
dispatched?
klass
=
"info"
when
host
.
deployed?
klass
=
"success"
when
host
.
updated?
klass
=
"info"
when
host
.
redispatched?
klass
=
"primary"
when
host
.
for_removal?
klass
=
"danger"
when
host
.
inactive?
klass
=
"warning"
when
host
.
blocked?
klass
=
"warning"
end
content_tag
(
:span
,
class
:
"label label-
#{
klass
}
"
)
{
host
.
human_status_name
.
upcase
}
end
end
Event Timeline
Log In to Comment