From: Tom Clegg Date: Thu, 6 Jun 2013 19:37:15 +0000 (-0400) Subject: add authorized_keys X-Git-Tag: 1.1.0~3271 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/3173f909ce49d67a11ab2230cf09629f7e259b74 add authorized_keys --- diff --git a/apps/workbench/app/assets/javascripts/authorized_keys.js.coffee b/apps/workbench/app/assets/javascripts/authorized_keys.js.coffee new file mode 100644 index 0000000000..761567942f --- /dev/null +++ b/apps/workbench/app/assets/javascripts/authorized_keys.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss b/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss new file mode 100644 index 0000000000..7298460d52 --- /dev/null +++ b/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the AuthorizedKeys controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index 07b7a2a1df..619c4b52a7 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -51,6 +51,7 @@ class ApplicationController < ActionController::Base @objects ||= model_class.all respond_to do |f| f.json { render json: @objects } + f.html { render } end end diff --git a/apps/workbench/app/controllers/authorized_keys_controller.rb b/apps/workbench/app/controllers/authorized_keys_controller.rb new file mode 100644 index 0000000000..ec8d2415d1 --- /dev/null +++ b/apps/workbench/app/controllers/authorized_keys_controller.rb @@ -0,0 +1,2 @@ +class AuthorizedKeysController < ApplicationController +end diff --git a/apps/workbench/app/helpers/authorized_keys_helper.rb b/apps/workbench/app/helpers/authorized_keys_helper.rb new file mode 100644 index 0000000000..9a486f28ae --- /dev/null +++ b/apps/workbench/app/helpers/authorized_keys_helper.rb @@ -0,0 +1,2 @@ +module AuthorizedKeysHelper +end diff --git a/apps/workbench/app/models/authorized_key.rb b/apps/workbench/app/models/authorized_key.rb new file mode 100644 index 0000000000..a56021682c --- /dev/null +++ b/apps/workbench/app/models/authorized_key.rb @@ -0,0 +1,2 @@ +class AuthorizedKey < ArvadosBase +end diff --git a/apps/workbench/app/views/authorized_keys/index.html.erb b/apps/workbench/app/views/authorized_keys/index.html.erb new file mode 100644 index 0000000000..a02ebc3d1b --- /dev/null +++ b/apps/workbench/app/views/authorized_keys/index.html.erb @@ -0,0 +1,49 @@ + + + + + + + + + <% @objects.sort_by { |ak| ak[:created_at] }.reverse.each do |g| %> + + + + + + <% end %> + <% if @objects.count == 0 %> + + + + <% end %> + + +
+ id + + owner + + name + + key_type + + public_key + + expires_at +
+ <%= link_to_if_arvados_object ak %> + + <%= ak.owner %> + + <%= ak.name %> + + <%= ak.key_type %> + + <%= ak.public_key %> + + <%= ak.expires_at %> +
+ (no authorized keys) +
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb index c11013f418..57c4ace671 100644 --- a/apps/workbench/app/views/layouts/application.html.erb +++ b/apps/workbench/app/views/layouts/application.html.erb @@ -33,6 +33,7 @@