1 class VirtualMachine < ArvadosBase
2 attr_accessor :current_user_logins
4 current_user.andand.is_admin
6 def attributes_for_display
7 super.append ['current_user_logins', @current_user_logins]
9 def attribute_editable?(attr)
10 attr != 'current_user_logins' and super
12 def self.attribute_info
13 merger = ->(k,a,b) { a.merge(b, &merger) }
15 {current_user_logins: {column_heading: "logins", type: 'array'}},
18 def friendly_link_name
19 (hostname && !hostname.empty?) ? hostname : uuid