Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F5492948
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
Tue, Sep 29, 7:50 PM
Size
551 B
Mime Type
text/x-ruby
Expires
Thu, Oct 1, 7:50 PM (1 d, 3 h)
Engine
blob
Format
Raw Data
Handle
457342
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
)
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"
end
content_tag
(
:span
,
class
:
"label label-
#{
klass
}
"
)
{
host
.
human_status_name
.
upcase
}
end
end
Event Timeline
Log In to Comment