[ARVADOS] updated: d90460b1f8df398edccdcc1090e9ba1040edf2b9
git at public.curoverse.com
git at public.curoverse.com
Thu Feb 12 09:47:59 EST 2015
Summary of changes:
.../app/assets/javascripts/request_shell_access.js | 36 ----------------------
apps/workbench/app/controllers/users_controller.rb | 2 +-
.../views/users/_manage_virtual_machines.html.erb | 14 +++++++++
.../app/views/users/request_shell_access.js | 9 ++++++
4 files changed, 24 insertions(+), 37 deletions(-)
delete mode 100644 apps/workbench/app/assets/javascripts/request_shell_access.js
create mode 100644 apps/workbench/app/views/users/request_shell_access.js
via d90460b1f8df398edccdcc1090e9ba1040edf2b9 (commit)
from 5b7ee6cb073457d0cf1f6b7c5ca3ee8965f144ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d90460b1f8df398edccdcc1090e9ba1040edf2b9
Author: Radhika Chippada <radhika at curoverse.com>
Date: Thu Feb 12 09:47:26 2015 -0500
4951: incorporate review feedback to move request_shell_access.js into users directory
diff --git a/apps/workbench/app/assets/javascripts/request_shell_access.js b/apps/workbench/app/assets/javascripts/request_shell_access.js
deleted file mode 100644
index a40334b..0000000
--- a/apps/workbench/app/assets/javascripts/request_shell_access.js
+++ /dev/null
@@ -1,36 +0,0 @@
-$(document).ready(function(){
- var $noShellAccessDiv = $('#no_shell_access');
- if ($noShellAccessDiv.length) {
- requestSent = localStorage.getItem('request_shell_access');
- if (requestSent != null) {
- $("#shell_access_requested_msg").html(requestSent)
- } else {
- $('div').remove('.shell_access_requested');
- }
- }
- });
-
-$(document).
- on('click', "#request_shell_submit", function(e){
- $(this).html('Sending request ...');
- $(this).prop('disabled', true);
- $('div').remove('.request_shell_access_failed');
-
- $.ajax('/').
- success(function(data, status, jqxhr) {
- $('div').remove('.no_shell_access_msg');
- $('div').remove('.shell_access_requested');
-
- $('.no_shell_access').append('<div class="alert alert-success"><p class="contain-align-left">A request for shell access was sent.</p></div>');
- var timestamp = new Date();
- localStorage.setItem("request_shell_access", "A request for shell access was sent on " +
- timestamp.toLocaleDateString() +
- " at " + timestamp.toLocaleTimeString());
- }).
- fail(function(jqxhr, status, error) {
- var $sendButton = $('#request_shell_submit');
- $sendButton.html('Request shell access');
- $sendButton.prop('disabled', false);
- $('.no_shell_access').append('<div class="request_shell_access_failed alert alert-danger"><p class="contain-align-left">Something went wrong. Please try again.</p></div>');
- });
- });
diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 6d9d8cb..bde5c5b 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -307,7 +307,7 @@ class UsersController < ApplicationController
params['request_url'] = request.url
respond_to do |format|
RequestShellAccessReporter.send_request(current_user, params).deliver
- format.js {render nothing: true}
+ format.js {render}
end
end
diff --git a/apps/workbench/app/views/users/_manage_virtual_machines.html.erb b/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
index df5c71a..bf8ee63 100644
--- a/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
+++ b/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
@@ -1,3 +1,17 @@
+<script>
+ $(document).ready(function(){
+ var $noShellAccessDiv = $('#no_shell_access');
+ if ($noShellAccessDiv.length) {
+ requestSent = localStorage.getItem('request_shell_access');
+ if (requestSent != null) {
+ $("#shell_access_requested_msg").html(requestSent)
+ } else {
+ $('div').remove('.shell_access_requested');
+ }
+ }
+ });
+</script>
+
<div>
<p>
For more information see <%= link_to raw('Arvados Docs → User Guide → SSH access'),
diff --git a/apps/workbench/app/views/users/request_shell_access.js b/apps/workbench/app/views/users/request_shell_access.js
new file mode 100644
index 0000000..e5fc8de
--- /dev/null
+++ b/apps/workbench/app/views/users/request_shell_access.js
@@ -0,0 +1,9 @@
+$('div').remove('.request_shell_access_failed');
+$('div').remove('.no_shell_access_msg');
+$('div').remove('.shell_access_requested');
+$('.no_shell_access').append('<div class="alert alert-success"><p class="contain-align-left">A request for shell access was sent.</p></div>');
+var timestamp = new Date();
+localStorage.setItem("request_shell_access", "A request for shell access was sent on " +
+ timestamp.toLocaleDateString() +
+ " at " + timestamp.toLocaleTimeString());
+
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list