Skip to content

Commit

Permalink
broke rapid scan
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Mar 29, 2013
1 parent 64fd9af commit 34113d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 38 deletions.
35 changes: 3 additions & 32 deletions app/assets/templates/rapid_scanning_experiment.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,37 +208,6 @@
color: green;
}

/*.countDownBox {*/
/*background: green;*/
/*width: 100px;*/
/*height: 100px;*/
/*border-radius: 50px;*/
/*}*/
/*.countDown {*/
/*-webkit-animation: collapseWidthLeft 2s linear 0s;*/

/*width: 100px;*/
/*height: 100px;*/
/*border-radius: 50px;*/

/*margin-top: 15px;*/
/*margin-bottom: 15px;*/
/*height: 5px;*/
/*background: #ddffdd;*/
/*}*/

/*@-webkit-keyframes collapseWidthLeft {*/
/*from {*/
/*margin-left: 0%;*/
/*width: 100%;*/
/*}*/

/*to {*/
/*margin-left: 100%;*/
/*width: 0%;*/
/*}*/
/*}*/

.spinner {
-webkit-mask-box-image: -webkit-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 1) 68%, rgba(0, 0, 0, 0) 69.5%);
background: #eee;
Expand Down Expand Up @@ -437,7 +406,8 @@ <h4>{{stepResults.name}}, exposure <em>{{stepResults.speed.speed}}</em>s</h4>
<div style="height:600px; vertical-align: middle;" ng-show="!showInstructions"
ui-keydown="{'17-ctrl':'hit($event)', '16-shift':'hit($event)', 'left':'hit($event)', 'right':'hit($event)', 'space': 'pauseOrResume($event)'}"
tabindex="1" id="experimentKeyPressDiv">
<div id="{{'step_' +($index + 1)}}" ng-repeat="step in bigScope.spec.experimentSteps" ng-show="bigScope.step == $index + 1">
<div id="{{'step_' +($index + 1)}}" >
<!--ng-repeat="step in bigScope.spec.experimentSteps" ng-show="bigScope.step == $index + 1">-->
<div class="header">
<h4>{{stepResults.name}}, exposure {{stepResults.speed.speed}}s</h4>
{{stepResults.extraInstructions}}
Expand Down Expand Up @@ -477,6 +447,7 @@ <h4>{{stepResults.name}}, exposure {{stepResults.speed.speed}}s</h4>
{{countDown}}
</P>
</div>
<ul></ul>
<img class="spectrogramImage" ng-show="countDown == 0"
ng-style="{width: SPECTROGRAM_WIDTH + 'px'}"
ng-src="{{segment.imageLink}}" > <!-- baw-image-loaded="segment.downloaded"-->
Expand Down
20 changes: 14 additions & 6 deletions app/controllers/proxy_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@ class ProxyController < ApplicationController
skip_authorize_resource :only => [:default]
skip_load_resource :only => [:default]


def default
http_proxy = BawSite::Application.config.custom_proxy

if params[:proxy]
http_proxy = params[:proxy]
end

puts "HTTP PROXY for site is #{http_proxy}!!!!!!!!!!!!!!!"

conn = Faraday.new(:url => params[:url]) do |faraday|
faraday.request :url_encoded # form-encode POST params
faraday.response :logger # log requests to STDOUT
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP

faraday.proxy http_proxy
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP

end

response = conn.get

result = ""
result += response.status.to_s
result = http_proxy + "\n"
result += (response.status || '{empty status}').to_s
result += "\n <pre>"
result += (response.headers).to_yaml
result += (response.headers).to_yaml || '{empty headers}'
result += "\n </pre>"
result += "\n <hr/>"
result += response.body
result += response.body || '{empty body}'

render text: result
end

end

0 comments on commit 34113d8

Please sign in to comment.