diff --git a/admin/app/admin/user_progression.rb b/admin/app/admin/user_progression.rb new file mode 100644 index 000000000..5f6e12ec0 --- /dev/null +++ b/admin/app/admin/user_progression.rb @@ -0,0 +1,86 @@ +ActiveAdmin.register JamRuby::User, :as => 'User Progression' do + DATE_FORMAT = '%Y-%m-%d %H:%M' + + menu :label => 'User Progression' + + config.sort_order = 'updated_at DESC' + config.batch_actions = false + config.clear_action_items! + config.filters = false + + index do + column :email do |user| link_to(truncate(user.email, {:length => 12}), resource_path(user), {:title => "#{user.first_name} #{user.last_name} (#{user.email})"}) end + column :updated_at do |uu| uu.updated_at.strftime(DATE_FORMAT) end + column :created_at do |uu| uu.created_at.strftime(DATE_FORMAT) end + column :city + column :musician + column 'Client DL' do |uu| + if dd = uu.first_downloaded_client_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Client Run' do |uu| + if dd = uu.first_ran_client_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Certified Gear' do |uu| + if dd = uu.first_certified_gear_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Any Session' do |uu| + if dd = uu.first_music_session_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Real Session' do |uu| + if dd = uu.first_real_music_session_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Good Session' do |uu| + if dd = uu.first_good_music_session_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Invited' do |uu| + if dd = uu.first_invited_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Friended' do |uu| + if dd = uu.first_friended_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Promoted' do |uu| + if dd = uu.first_social_promoted_at + dd.strftime(DATE_FORMAT) + else + '' + end + end + column 'Recorded' do |uu| + uu.first_recording_at + end + + end + +end diff --git a/db/.ruby-version b/db/.ruby-version index abf2ccea0..cb506813e 100644 --- a/db/.ruby-version +++ b/db/.ruby-version @@ -1 +1 @@ -ruby-2.0.0-p247 +2.0.0-p247 diff --git a/pb/.ruby-version b/pb/.ruby-version index abf2ccea0..cb506813e 100644 --- a/pb/.ruby-version +++ b/pb/.ruby-version @@ -1 +1 @@ -ruby-2.0.0-p247 +2.0.0-p247 diff --git a/ruby/.ruby-version b/ruby/.ruby-version index abf2ccea0..cb506813e 100644 --- a/ruby/.ruby-version +++ b/ruby/.ruby-version @@ -1 +1 @@ -ruby-2.0.0-p247 +2.0.0-p247 diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb index cc933e38f..c2b138aed 100644 --- a/ruby/lib/jam_ruby/models/user.rb +++ b/ruby/lib/jam_ruby/models/user.rb @@ -1006,6 +1006,10 @@ module JamRuby end end end + + def first_recording_at + Recording.where(:owner_id => self.id).order('created_at ASC').first.try(:created_at) + end # devise compatibility diff --git a/web/.ruby-version b/web/.ruby-version index abf2ccea0..cb506813e 100644 --- a/web/.ruby-version +++ b/web/.ruby-version @@ -1 +1 @@ -ruby-2.0.0-p247 +2.0.0-p247 diff --git a/web/Gemfile b/web/Gemfile index 2b441b842..aa9fc6948 100644 --- a/web/Gemfile +++ b/web/Gemfile @@ -32,7 +32,7 @@ gem 'ruby-protocol-buffers', '1.2.2' gem 'pg', '0.15.1' gem 'compass-rails' gem 'rabl' # for JSON API development -gem 'gon' # for passthrough of Ruby variables to Javascript variables +gem 'gon', '~>4.1.0' # for passthrough of Ruby variables to Javascript variables gem 'eventmachine', '1.0.3' gem 'amqp', '0.9.8' gem 'logging-rails', :require => 'logging/rails' diff --git a/web/app/assets/stylesheets/client/account.css.scss b/web/app/assets/stylesheets/client/account.css.scss index a5981de62..93967f182 100644 --- a/web/app/assets/stylesheets/client/account.css.scss +++ b/web/app/assets/stylesheets/client/account.css.scss @@ -1,9 +1,10 @@ @import 'common.css.scss'; -.account-content-scroller { +.account-content-scroller, +#account-identity-content-scroller { .content-wrapper { - padding:10px 35px; + padding:10px 30px; } .content-wrapper.account { @@ -16,6 +17,7 @@ } h4 { + margin-top:8px; margin-bottom: 10px; font-weight:bold; } @@ -114,6 +116,7 @@ .button-orange, .button-grey { line-height:14px; + margin-top:6px; margin-right:0; } @@ -122,7 +125,7 @@ } div.field { - margin-bottom:27px; + margin-bottom:21px; } div.profile-instrumentlist table { diff --git a/web/app/controllers/api_music_sessions_controller.rb b/web/app/controllers/api_music_sessions_controller.rb index 9809d49d0..f4a2411c8 100644 --- a/web/app/controllers/api_music_sessions_controller.rb +++ b/web/app/controllers/api_music_sessions_controller.rb @@ -213,13 +213,15 @@ class ApiMusicSessionsController < ApiController :secret_access_key => SampleApp::Application.config.aws_secret_access_key) bucket = s3.buckets[SampleApp::Application.config.aws_bucket] + expire = Time.now + 20.years read_url = bucket.objects[uri].url_for(:read, - :expires => Time.now + 25.years, + :expires => expire, :'response_content_type' => 'text/csv').to_s @perfdata.update_attribute(:uri, read_url) + logger.debug("*** client can read url #{read_url}") write_url = bucket.objects[uri].url_for(:write, - :expires => SampleApp::Application.config.perf_data_signed_url_timeout, + :expires => expire, :'response_content_type' => 'text/csv').to_s logger.debug("*** client can upload to url #{write_url}") redirect_to write_url diff --git a/web/app/views/clients/_account_profile_avatar.html.erb b/web/app/views/clients/_account_profile_avatar.html.erb index 49bf17f20..010ee663e 100644 --- a/web/app/views/clients/_account_profile_avatar.html.erb +++ b/web/app/views/clients/_account_profile_avatar.html.erb @@ -12,11 +12,13 @@ - -
+
+ + +
-