3531: Refactor project tab infinite-scroll. Sort jobs and pipelines
[arvados.git] / apps / workbench / app / models / virtual_machine.rb
index 1b672108375555517539245316f5bbc16dfa930c..978964196d412b76f993e46b717a7977ea773ecc 100644 (file)
@@ -6,7 +6,7 @@ class VirtualMachine < ArvadosBase
   def attributes_for_display
     super.append ['current_user_logins', @current_user_logins]
   end
-  def attribute_editable?(attr)
+  def attribute_editable? attr, *args
     attr != 'current_user_logins' and super
   end
   def self.attribute_info
@@ -15,4 +15,7 @@ class VirtualMachine < ArvadosBase
             {current_user_logins: {column_heading: "logins", type: 'array'}},
             super]
   end
+  def friendly_link_name
+    (hostname && !hostname.empty?) ? hostname : uuid
+  end
 end