X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/91876456cf62bbc18bb2e0b887182756596031ff..e850f145a8c770d592a89b7c82ce01650a1bc5ba:/apps/workbench/app/views/application/_arvados_object.html.erb diff --git a/apps/workbench/app/views/application/_arvados_object.html.erb b/apps/workbench/app/views/application/_arvados_object.html.erb index da04b0d811..6d59e0eb59 100644 --- a/apps/workbench/app/views/application/_arvados_object.html.erb +++ b/apps/workbench/app/views/application/_arvados_object.html.erb @@ -1,15 +1,9 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <% content_for :arvados_object_table do %> -<%= form_for @object do |f| %> - - - - - <% @object.attributes_for_display.each do |attr, attrvalue| %> - <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> - <% end %> - -
-<% end %> + <% end %> <% if content_for? :page_content %> @@ -26,10 +20,11 @@
  • API response JSON
  • <% if @object.andand.uuid %>
  • curl update example
  • -
  • “arv” CLI example
  • +
  • “arv” CLI examples
  • Python example
  • <% end %> +
    <% if content_for? :page_content %>
    @@ -37,45 +32,9 @@
    <% end %>
    -
    -<%= JSON.pretty_generate(@object.attributes.reject { |k,v| k == 'id' }) rescue nil %>
    -      
    -
    - <% if @object.andand.uuid %> -
    -
    -curl -X PUT \
    - -H "Authorization: OAuth2 $arv_api_token" \
    - --data-urlencode <%= @object.class.to_s.singularize.underscore %>@/dev/stdin \
    - <%= Rails.configuration.arvados_v1_base %>/<%= @object.class.to_s.pluralize.underscore %>/<%= @object.uuid %> \
    - <<EOF
    -<%= JSON.pretty_generate({@object.attributes.keys[-3] => @object.attributes.values[-3]}) %>
    -EOF
    -      
    -
    -
    -
    -ARVADOS_API_HOST=<%= Rails.configuration.arvados_v1_base.sub '/arvados/v1','' %>
    -ARVADOS_API_TOKEN=xxxxxxxxxxxxxxxxxxxxx
     
    -arv --json --pretty <%= @object.class.to_s.singularize.underscore %> get \
    - --uuid <%= @object.uuid %>
    -
    -arv <%= @object.class.to_s.singularize.underscore %> update \
    - --uuid <%= @object.uuid %> \
    - --<%= @object.class.to_s.singularize.underscore %> '<%= JSON.generate({@object.attributes.keys[-3] => @object.attributes.values[-3]}).gsub("'","'\''") %>'
    -      
    -
    -
    -import arvados
     
    -x = arvados.api().<%= @object.class.to_s.underscore %>().get(uuid='<%= @object.uuid %>').execute()
    -      
    -
    - - - <% end %>