Can now click a "play" button next to a pipeline template and create a pipeline instance.
# gem 'capistrano'
# To use debugger
-# gem 'debugger'
+#gem 'byebug'
gem 'rvm-capistrano', :group => :test
bootstrap-x-editable-rails (1.5.1.1)
railties (>= 3.0)
builder (3.0.4)
+ byebug (2.7.0)
+ columnize (~> 0.3)
+ debugger-linecache (~> 1.2)
capistrano (2.15.5)
highline
net-scp (>= 1.0.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
+ columnize (0.3.6)
commonjs (0.2.7)
daemon_controller (1.1.7)
+ debugger-linecache (1.2.0)
erubis (2.7.0)
execjs (2.0.2)
highline (1.6.20)
andand
bootstrap-sass (~> 3.1.0)
bootstrap-x-editable-rails
+ byebug
coffee-rails (~> 3.2.0)
httpclient
jquery-rails
end
def create
- @object ||= model_class.new params[model_class.to_s.singularize.to_sym]
+ @object ||= model_class.new params[model_class.to_s.underscore.singularize.to_sym]
@object.save!
+
respond_to do |f|
f.html {
redirect_to(params[:return_to] || @object)
end
end
style_opts[:class] = (style_opts[:class] || '') + ' nowrap'
- link_to link_name, { controller: resource_class.to_s.underscore.pluralize, action: 'show', id: link_uuid }, style_opts
+ link_to link_name, { controller: resource_class.to_s.tableize, action: 'show', id: link_uuid }, style_opts
else
attrvalue
end
attr_reader :kind
@columns
end
+
def self.column(name, sql_type = nil, default = nil, null = true)
ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
end
+
def self.attribute_info
self.columns
@attribute_info
end
+
def self.find(uuid, opts={})
if uuid.class != String or uuid.length < 27 then
raise 'argument to find() must be a uuid string. Acceptable formats: warehouse locator or string with format xxxxx-xxxxx-xxxxxxxxxxxxxxx'
end
new.private_reload(hash)
end
+
def self.order(*args)
ArvadosResourceList.new(self).order(*args)
end
+
def self.where(*args)
ArvadosResourceList.new(self).where(*args)
end
+
def self.limit(*args)
ArvadosResourceList.new(self).limit(*args)
end
+
def self.eager(*args)
ArvadosResourceList.new(self).eager(*args)
end
+
def self.all(*args)
ArvadosResourceList.new(self).all(*args)
end
+
def save
obdata = {}
self.class.columns.each do |col|
end
end
+ @new_record = false
+
self
end
+
def save!
self.save or raise Exception.new("Save failed")
end
@links = $arvados_api_client.api Link, '', { _method: 'GET', where: o, eager: true }
@links = $arvados_api_client.unpack_api_response(@links)
end
+
def all_links
return @all_links if @all_links
res = $arvados_api_client.api Link, '', {
}
@all_links = $arvados_api_client.unpack_api_response(res)
end
+
def reload
private_reload(self.uuid)
end
+
def private_reload(uuid_or_hash)
raise "No such object" if !uuid_or_hash
if uuid_or_hash.is_a? Hash
end
end
@all_links = nil
+ @new_record = false
self
end
+
+ def to_param
+ uuid
+ end
+
def dup
super.forget_uuid!
end
+<%if object %>
<%= check_box_tag 'uuids[]', object.uuid, false, {
:class => 'persistent-selection',
:friendly_type => object.class.name,
:friendly_name => object.selection_label,
:href => "#{url_for controller: object.class.name.tableize, action: 'show', id: object.uuid }"
} %>
+<% end %>
+<% content_for :css do %>
+ .playbutton {
+ color: white;
+ background: gray;
+ border: 0px;
+ border-radius: 3px;
+ padding: 0px 3px;
+ }
+ .playbutton:hover {
+ color: white;
+ background: blackh;
+ }
+<% end %>
+
<table class="table table-hover">
<thead>
<tr class="contain-align-left">
<th>
+ </th><th>
id
</th><th>
name
<% @objects.sort_by { |ob| ob[:created_at] }.reverse.each do |ob| %>
<tr>
+ <td>
+ <%= form_tag '/pipeline_instances' do |f| %>
+ <%= hidden_field :pipeline_instance, :pipeline_template_uuid, :value => ob.uuid %>
+ <%= button_tag nil, {class: 'playbutton'} do %>
+ <span class="glyphicon glyphicon-play"></span>
+ <% end %>
+ <% end %>
+ </td>
<td>
<%= link_to_if_arvados_object ob %>
</td><td>