Skip to content

Commit

Permalink
start/stop scripts for port 80, percentage based sampling height, fix…
Browse files Browse the repository at this point in the history
…ed macros route
  • Loading branch information
jywarren committed Dec 11, 2014
1 parent 906d019 commit 623fd9b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/views/analyze/_tools.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<li><a onClick="$W.toggle_mode()">Toggle RGB</a></li>
<li><a onClick="$W.extract()"><i class="icon icon-refresh"></i> Re-extract from photo</a></li>
<li><a href="#selectrowmodal" data-toggle="modal">Set sample row</a></li>
<li><a onClick="$W.set_sample_row()" data-toggle="modal">Enter percentage sample height</a></li>
<li><a href="/spectra/rotate/<%= @spectrum.id %>">Rotate image</a></li>
<li><a href="/spectra/reverse/<%= @spectrum.id %>"><i class="icon icon-resize-horizontal"></i> Flip image horizontally</a></li>
<li><a href="/spectra/find_brightest_row/<%= @spectrum.id %>">Auto-detect brightest spectrum</a></li>
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
get '/macro/update/:id' => 'macros#update'
get '/macro/:author/:id' => 'macros#show'
get '/macro/:author/:id.:format' => 'macros#show'
get '/macros' => 'macros#index'
get '/dashboard' => 'users#dashboard'
get '/popular' => 'likes#index'
get '/popular/recent' => 'likes#recent'
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ $W = {
},

set_sample_row: function() {
var rownum = prompt('Enter the pixel row you would like to extract a spectrum from, where row 0 is the top edge of the original image.','100')
var rownum = prompt('Enter the percentage from the top edge from which you would like to extract a spectrum.','100')
$("#imagelink")[0].onclick = ""
$('#imagelink').tooltip('destroy')
if (rownum) window.location = '/spectrums/setsamplerow/'+$W.spectrum_id+'?row='+rownum
if (rownum) window.location = '/spectrums/setsamplerow/'+$W.spectrum_id+'?row='+rownum/100.00
},

click_to_set_sample_row: function() {
Expand Down
4 changes: 2 additions & 2 deletions restart
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
passenger stop -p 3000
passenger start -a 127.0.0.1 -p 3000 -d -e production
rvmsudo `which passenger` stop -p 80
rvmsudo `which passenger` start -d -e production -p 80 --user=warren
2 changes: 1 addition & 1 deletion startup
Original file line number Diff line number Diff line change
@@ -1 +1 @@
passenger start -a 127.0.0.1 -p 3000 -d -e production
rvmsudo `which passenger` start -d -e production -p 80 --user=warren
2 changes: 1 addition & 1 deletion stop
Original file line number Diff line number Diff line change
@@ -1 +1 @@
passenger stop -p 3000
rvmsudo `which passenger` stop -p 80

0 comments on commit 623fd9b

Please sign in to comment.