Compare commits

...

882 Commits

Author SHA1 Message Date
Seth Call f6ca42d018 ci: use dagger container and native checkout
CI Pipeline / Build and Publish Admin (push) Failing after 0s Details
Environment Orchestrator / orchestrate (push) Failing after 8s Details
Test Runner / test (push) Successful in 1s Details
2026-03-11 08:11:24 -05:00
Seth Call f3cdc28d8b ci: fix dagger path and use explicit mv
CI Pipeline / Build and Test (push) Failing after 11s Details
Environment Orchestrator / orchestrate (push) Failing after 9s Details
Test Runner / test (push) Successful in 1s Details
2026-03-11 08:05:38 -05:00
Seth Call 2eb24f2711 ci: combine into single job for guaranteed execution
CI Pipeline / Build and Test (push) Failing after 11s Details
Environment Orchestrator / orchestrate (push) Failing after 9s Details
Test Runner / test (push) Successful in 1s Details
2026-03-11 07:49:00 -05:00
Seth Call db261a3df9 ci: complete workflow consolidation
CI Pipeline / Test Runner (push) Successful in 1s Details
CI Pipeline / Build Admin (push) Failing after 10s Details
Environment Orchestrator / orchestrate (push) Failing after 9s Details
Test Runner / test (push) Successful in 2s Details
2026-03-11 07:43:09 -05:00
Seth Call 03313eb418 ci: consolidate into single workflow for reliable execution 2026-03-11 07:42:47 -05:00
Seth Call ebcf9d91aa ci: definitive build trigger
Build Admin / build (push) Failing after 3s Details
Environment Orchestrator / orchestrate (push) Failing after 11s Details
Test Runner / test (push) Successful in 1s Details
2026-03-11 07:37:13 -05:00
Seth Call dfe5facad6 ci: add simple test workflow
Test Runner / test (push) Waiting to run Details
Build Admin / build (push) Failing after 3s Details
Environment Orchestrator / orchestrate (push) Has been cancelled Details
2026-03-10 19:32:55 -05:00
Seth Call abae34c108 ci: switch to custom dagger runner label
Build Admin / build (push) Failing after 10s Details
Environment Orchestrator / orchestrate (push) Failing after 7s Details
2026-03-10 19:21:45 -05:00
Seth Call df8cf11e37 ci: remove paths filter to force build on mirror sync
Build Admin / build (push) Failing after 12s Details
Environment Orchestrator / orchestrate (push) Failing after 8s Details
2026-03-10 19:17:37 -05:00
Seth Call 7baf003b90 ci: touch admin file to bypass paths filter
Build Admin / build (push) Failing after 10s Details
Environment Orchestrator / orchestrate (push) Failing after 7s Details
2026-03-10 19:12:50 -05:00
Seth Call 1944602b97 ci: fix gitea token reference and checkout action url
Build Admin / build (push) Failing after 19s Details
Environment Orchestrator / orchestrate (push) Failing after 9s Details
2026-03-10 19:03:44 -05:00
Seth Call 86e151d239 ci: add workflow_dispatch to allow manual triggers on mirrors
Build Admin / build (push) Failing after 39s Details
Environment Orchestrator / orchestrate (push) Failing after 17s Details
2026-03-10 18:57:08 -05:00
Seth Call 6a1506bbe8 ci: add action workflow to develop to enable branch triggers
Build Admin / build (push) Failing after 46s Details
Environment Orchestrator / orchestrate (push) Failing after 18s Details
2026-03-10 18:37:32 -05:00
Seth Call 64a93dd42f support beta 2026-02-28 20:39:34 -06:00
Seth Call eb52813822 defaut beta to true 2026-02-21 08:56:52 -06:00
Seth Call 8613a03d00 ok fix the API more 2026-02-16 09:05:12 -06:00
Seth Call 8f0b8929ba ars apis 2026-02-15 22:04:17 -06:00
Seth Call 08e1c5274d track utm_id 2026-02-04 21:53:19 -06:00
Seth Call 5f347ccfac handle All 2026-02-04 21:31:23 -06:00
Seth Call ca2bf19b7a cleanup query 2026-02-04 20:58:16 -06:00
Seth Call fad1f9d6d9 Add paid = cpc on jammers cohots 2026-02-04 19:53:00 -06:00
Seth Call 51838fb413 Remove test drive 2026-02-03 19:05:12 -06:00
Seth Call 45cb401112 Controls for user source 2026-02-01 14:15:41 -06:00
Seth Call 9078515984 user source update 2026-01-31 12:20:37 -06:00
Seth Call 52ae83e2f4 Addtocart instead 2026-01-31 12:15:26 -06:00
Seth Call b454cf9ead AddToCart 2026-01-28 20:04:40 -06:00
Seth Call 65f5624ff9 add array support for facebook ad source 2026-01-24 00:02:44 -06:00
Seth Call e82450dfe9 Support more utm tracking 2026-01-23 23:17:35 -06:00
Seth Call f1992eaa78 build this 2026-01-22 22:36:22 -06:00
Seth Call bdeecc76c6 fix reporting 2026-01-22 21:21:17 -06:00
Seth Call 8c8024c12b event test code 2026-01-19 13:48:26 -06:00
Seth Call c183af3d6b remove rails logger ref 2026-01-19 13:21:26 -06:00
Seth Call ab424c21d2 use puts 2026-01-19 12:49:37 -06:00
Seth Call 753f35b24d click signup redirects to the right place in jam-ui 2026-01-19 12:34:30 -06:00
Seth Call 624853c868 Store UTM cookies 2026-01-16 22:15:36 -06:00
Seth Call 71d8571eb9 JKLayout adding Meta Tracking 2026-01-16 16:44:46 -06:00
Seth Call fae16c7483 better logging on CAPI 2026-01-15 08:00:34 -06:00
Seth Call 253a6c566b Bettor logging 2026-01-15 07:59:27 -06:00
Seth Call ed561be4b5 meta_tracking included 2026-01-14 19:56:42 -06:00
Seth Call eb69640667 fix utm source 2026-01-14 14:54:56 -06:00
Seth Call 9b0a9d1f32 cleanup around app-config 2026-01-14 14:42:22 -06:00
Seth Call e1cc5483a2 facebook pixel id and access token 2026-01-14 12:17:39 -06:00
Seth Call 73d2a7a020 more changes for event rework 2026-01-14 10:30:33 -06:00
Seth Call eb298d6859 fix 2026-01-14 09:20:57 -06:00
Seth Call 93c4154648 add capi transmitter and missing event type 2026-01-14 08:58:37 -06:00
Seth Call fbd871d204 reviewing 2026-01-14 08:52:19 -06:00
Seth Call 0d82f6ee16 allow video tokens to last a long time 2026-01-08 06:03:58 -06:00
Seth Call 1279b16ec0 Update manifest maker 2025-10-26 14:33:00 -05:00
Seth Call e3cff0a825 Uncomment TrialReminders 2025-10-18 17:40:46 -05:00
Nuwan Chaturanga 6a6e4cde09 Merged in fix_plg_email_delivery_timeing_issue (pull request #70)
fix PLG email timing

Approved-by: Seth Call
2025-10-17 13:16:50 +00:00
Seth Call 1dd15fb0aa Add tests for all PLG emails 2025-10-17 08:15:46 -05:00
Seth Call 9282369e54 VRFS-5690 - tag jamtrack and jammers separetly on admin report - fix jammers view 2025-10-13 15:23:01 -05:00
Seth Call 828191d683 VRFS-5690 - tag jamtrack and jammers separetly on admin report - fix jammers view 2025-10-13 15:16:41 -05:00
Seth Call c0031cfe3d VRFS-5690 - tag jamtrack and jammers separetly on admin report 2025-10-13 14:33:45 -05:00
Seth Call 9b17546082 omit trial send reminders for now 2025-10-13 12:02:44 -05:00
Seth Call eed3d51f4b VRFS-5691 - fix both the jamtrack flow and the inability to sign out - take 2 2025-10-13 11:44:17 -05:00
Seth Call 4eac68b645 VRFS-5691 - fix both the jamtrack flow and the inability to sign out 2025-10-12 11:55:50 -05:00
Nuwan fe6157e8cf ensure not to send email 2 and 3 tighltly behind email 1 in this sequence 2025-09-30 13:14:39 +05:30
Nuwan 675bf2b69c fix PLG email timing
do not send emails if the date has passed
2025-09-22 00:07:16 +05:30
Nuwan 4ffc0d9b3b Merge branch 'develop' of ssh://altssh.bitbucket.org:443/jamkazam/jam-cloud into develop 2025-08-20 20:36:18 +05:30
Nuwan 7b665325f7 unsubscribe/change email confirmation fixes 2025-08-20 20:34:52 +05:30
Nuwan eab17b3340 uncomment the lines
uncomment the lines which were disabled for debug purposes in the
prev. commit
2025-08-20 20:34:52 +05:30
Nuwan 4fafe30141 add more changes which were missed in prev. commit 2025-08-20 20:34:52 +05:30
Nuwan 7f85c91601 trail end reminderd
send emails when the trail perieod expired.
2025-08-20 20:34:52 +05:30
Nuwan d424026f17 fix payment method page element loading
this resolves the race condition issue when loading recurly payment element
and hence sometimes it wasn't showing
2025-08-20 20:31:44 +05:30
Nuwan Chaturanga a4f8935b3a Merged in fix_403_errors_in_public_pages (pull request #69)
unsubscribe/change email confirmation fixes

Approved-by: Seth Call
2025-08-19 16:19:12 +00:00
Nuwan Chaturanga 4f837ae67f Merged in 5662-trial_end_reminder_emails (pull request #68)
trail end reminderd

Approved-by: Seth Call
2025-08-19 16:07:57 +00:00
Nuwan 0053775c7e uncomment the lines
uncomment the lines which were disabled for debug purposes in the
prev. commit
2025-08-19 21:04:28 +05:30
Nuwan 9d6c71829f unsubscribe/change email confirmation fixes 2025-08-19 20:39:39 +05:30
Nuwan d00a0c08f7 add more changes which were missed in prev. commit 2025-08-19 02:13:16 +05:30
Nuwan 7e2c917ca0 trail end reminderd
send emails when the trail perieod expired.
2025-08-19 00:07:09 +05:30
Nuwan Chaturanga a84a55f178 Merged in 5661-PLG-play-with-others (pull request #67)
PLG email for 2+ session

Approved-by: Seth Call
2025-08-16 23:50:48 +00:00
Nuwan 25ecab2c65 fix billing details + card data processing
remove saving billing address details to database in the first place
before sending to recurly. Now the backend handles address data saving
after success response from recurly.
2025-08-15 18:31:03 +05:30
Nuwan b2f344fd30 PLG email for 2+ session
email reminders for the users to have 2+ session
VRFS-5661
2025-08-14 22:06:18 +05:30
Nuwan 3bba9ec619 fix error in user_observer 2025-08-13 14:37:31 +05:30
Nuwan 86e03e0ba7 change email confirm page 2025-08-13 14:26:58 +05:30
Nuwan 67fd15c75c wip after changing email show confirmation page within new website 2025-08-13 13:51:54 +05:30
Nuwan b7a41c6465 unsubscribe page
add page in new website to be shown to the users
when they follow unsubscribe link (in email footer)
2025-08-06 20:30:12 +05:30
Nuwan a8d5b8e735 update in the front end showing user payment details persistance 2025-07-29 22:37:54 +05:30
Nuwan f977b7298e fix error when showing if user has stored card
fix the issue of showing this information incorrectly on payment method
page. also this comment disables front end validation of card details
2025-07-28 18:47:02 +05:30
Seth Call 9a41e8a236 Fix cutoff_date not being passed in and requirees of TestGearSetup 2025-07-25 20:06:47 -05:00
Nuwan Chaturanga 3d113e3877 Merged in 5646-test_session_reminder (pull request #66)
PLG feature for Test Session reminder emails

* PLG feature for Test Session reminder emails

Implement the Test Session reminder emails VRFS-5646

* cutoff date for test gear reminder email

add cutoff date config to limit the selection after a certain date
add batch_size:100 to loops


Approved-by: Seth Call
2025-07-25 23:13:21 +00:00
Nuwan Chaturanga c7e80a0694 Merged in 5645-payment_method_page (pull request #65)
5645 payment method page

* wip payment method in new site

* payment method page

new page to add user's payment method (credit card / paypal) alone
with billing address details

* Update recurly/braintree tokens


Approved-by: Seth Call
2025-07-24 03:25:55 +00:00
Nuwan 9058c8af1d load jamserver.js
instead of jamserver.js instead of jamserver_copy.js when loading
react.js front end. jamserver_copy for some reason desn not load
all of the javascripts needed to get for example subscription messages
to be captured in the front end.
2025-07-18 19:38:14 +05:30
Seth Call 08008a6dc3 Fix the determination about profile_completed_at 2025-06-23 19:56:36 -05:00
Seth Call 8645328cce Oops. missed images for obs plugin site 2025-06-15 15:18:37 -05:00
Seth Call 38388d2afb Unblock pkg uploading in admin web 2025-06-15 13:13:05 -05:00
Seth Call e4d5fccdf5 Merged in seth/obs-download (pull request #63)
Seth/obs download

* wip

* Merge branch 'develop' into seth/obs-download

* Working. Waiting on final UI approval

* Merge branch 'develop' into seth/obs-download
2025-06-15 00:44:11 +00:00
Seth Call 5f3a327d35 Enable send reminders code, because saving profile_completed_at now 2025-06-14 17:37:34 -05:00
Seth Call 51ed748013 DB updates after actually updating prod 2025-06-14 10:02:18 -05:00
Seth Call dcdf9e55a3 Fix develop 2025-06-14 01:14:35 -05:00
Seth Call 7c9e449c4b Hookup gear reminder emails 2025-06-14 00:33:03 -05:00
Seth Call e7923dca9b Updated both background jobs to not break HourlyJob 2025-06-14 00:22:02 -05:00
Nuwan Chaturanga 55372bf83d Merged in 5631-signup-survey (pull request #61)
signup survey email sending

* signup survey email sending

Send new user survey email 24 hours after signup to all new users

* add config parameters

add config.signup_survey_url, config.signup_survey_cutoff_date
2025-06-13 12:02:21 +00:00
Seth Call 0f556bfad4 Only allow stopping a recording if you are the owner 2025-06-11 22:00:42 -05:00
Nuwan 817719d539 show pointer cursor on download app links 2025-05-29 16:15:43 +05:30
Nuwan cd229a0b42 fix legacy app client download links 2025-05-29 15:52:31 +05:30
Nuwan b6e2fe7494 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2025-05-27 06:54:49 +05:30
Nuwan ad1d8ea373 client downloads - fix download link for legacy clients 2025-05-27 06:54:27 +05:30
Nuwan Chaturanga 2d5d93787f Merged in 5539-gear_setup_reminders (pull request #59)
gear setup reminder emails

* gear setup reminder emails

email reminders to setup audio gear


Approved-by: Seth Call
2025-05-23 12:53:49 +00:00
Nuwan 676cbaa656 include subscription_utils script 2025-05-23 16:19:18 +05:30
Nuwan d4e0e41186 fix duplicate sessions in browse sessions page 2025-05-22 19:17:21 +05:30
Nuwan 49d3e2a4ac list sessions according to the fetch status 2025-05-21 13:56:49 +05:30
Nuwan 97d23a6bcb do not show upcoming events in event listing 2025-05-21 12:07:16 +05:30
Nuwan 0f7b9b2884 fix null value error in session list 2025-05-20 18:27:43 +05:30
Nuwan 0d25814e6e list current sessions 2025-05-20 14:24:28 +05:30
Nuwan 1e0faa7309 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2025-05-19 00:41:21 +05:30
Nuwan 10e6fedb5c revert to list all sesions 2025-05-19 00:40:53 +05:30
Nuwan d6dc79b478 fix data reference error 2025-05-19 00:40:40 +05:30
Nuwan 1071dec044 revert to list all sesions 2025-05-18 20:23:11 +05:30
Nuwan 403a830157 list friends, public and inactive sessions in browse session page 2025-05-18 19:54:12 +05:30
Nuwan Chaturanga c3bd62c0cc Merged in 5534-profile-reminder-emails (pull request #58)
5534 profile reminder emails

* Profile prompts & reminders

3 email reminders to for new users who have not completed their
jamkazam profile

* PR change requests. moved email sernding job to hourly job tasks. and add database table index


Approved-by: Seth Call
2025-05-13 12:02:46 +00:00
Nuwan Chaturanga 71716b2240 Merged in 5534-profile-reminder-emails (pull request #54)
Profile prompts & reminders

* Profile prompts & reminders

3 email reminders to for new users who have not completed their
jamkazam profile

* PR change requests. moved email sernding job to hourly job tasks. and add database table index


Approved-by: Seth Call
2025-04-05 20:18:38 +00:00
Seth Call 3a6d86e23c Fix real session check 2025-04-01 20:15:23 -05:00
Seth Call d1b9c8b19a Fix issue with actually saving the jamtrack right 2025-03-30 10:15:33 -05:00
Seth Call 615158baf2 only search on email when it's clear user is putting in an email 2025-03-30 08:49:28 -05:00
Seth Call a392d59df4 limit users autocomplete to 40 2025-03-29 11:35:27 -05:00
Seth Call 8bfb339fd5 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2025-03-28 23:27:35 -05:00
Seth Call 15f9beecf6 Fix jamtrack right field 2025-03-28 23:27:27 -05:00
Nuwan fcc49c52a1 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2025-03-27 12:25:57 +05:30
Seth Call e9d2ed7617 Ooops, missed brace 2025-03-27 12:25:28 +05:30
Seth Call 685a566c85 Stop double-counting page vies 2025-03-27 12:25:28 +05:30
Seth Call 4c95ad58ac Remove extra pageView hit 2025-03-27 12:25:28 +05:30
Seth Call 8519b56c5a Remove public URL from router basename 2025-03-27 12:25:28 +05:30
Seth Call 62d66fac75 Add GA to landing pages and fix build constant 2025-03-27 12:25:28 +05:30
Seth Call f4b1ab59e0 Cleaned up BrowserRouter, and added GA 2025-03-27 12:25:28 +05:30
Seth Call 0b60c8d0cc Load iframe later 2025-03-27 12:25:28 +05:30
Seth Call d4fcb0c19f fix signup path 2025-03-27 12:25:28 +05:30
Seth Call 98b70724a4 sitemap location fix 2025-03-27 12:25:28 +05:30
Seth Call 8f9f7d90fa Convert large pngs to webp, and create sitemap.xml 2025-03-27 12:25:28 +05:30
Seth Call 81627fc37f Add some useful filters 2025-03-27 12:25:28 +05:30
Seth Call 49888b9b5b Update indexs and speed up partner page 2025-03-27 12:25:28 +05:30
Seth Call b2c2129d42 Better reporting for quarterly payments 2025-03-27 12:25:28 +05:30
Seth Call 35a5f9f17c Add more partner fields to affiliate_traffic_total 2025-03-27 12:25:28 +05:30
Seth Call b942265652 Update Referral Admin-web page to be more useful 2025-03-27 12:25:28 +05:30
Seth Call b657511310 Revert "Update Referrals page to list more partner info"
This reverts commit a2c607b449.
2025-03-27 12:25:28 +05:30
Seth Call a687356d72 Update Referrals page to list more partner info 2025-03-27 12:25:28 +05:30
Seth Call f4c71f9778 Why can't I figure this PUBLIC_URL process env out 2025-03-27 12:25:28 +05:30
Seth Call 1120d8be31 add public url 2025-03-27 12:25:28 +05:30
Seth Call 5fba0f8d97 Fix base url 2025-03-27 12:25:28 +05:30
Seth Call ab1575365d Re-attempt build with correct URL 2025-03-27 12:25:28 +05:30
Nuwan 3369b39341 fix error on paypal redirect after checkout 2025-03-26 16:53:35 +05:30
Seth Call f5b090a20b Ooops, missed brace 2025-03-25 07:14:10 -05:00
Seth Call cc664889f8 Stop double-counting page vies 2025-03-25 07:03:51 -05:00
Seth Call cfe0129a6d Remove extra pageView hit 2025-03-24 23:06:45 -05:00
Seth Call a525082f26 Remove public URL from router basename 2025-03-24 22:46:49 -05:00
Seth Call 7f5b6152f0 Add GA to landing pages and fix build constant 2025-03-24 22:01:49 -05:00
Seth Call 0df9beb786 Cleaned up BrowserRouter, and added GA 2025-03-24 21:36:28 -05:00
Seth Call 85c0c5812f Load iframe later 2025-03-23 22:27:27 -05:00
Seth Call 4ede79ba51 fix signup path 2025-03-23 22:12:27 -05:00
Seth Call 155ee69863 sitemap location fix 2025-03-23 21:59:18 -05:00
Seth Call 8d49ea0368 Convert large pngs to webp, and create sitemap.xml 2025-03-23 21:36:36 -05:00
Seth Call 93dc5ccd35 Add some useful filters 2025-03-23 15:38:02 -05:00
Seth Call 7b6a571550 Update indexs and speed up partner page 2025-03-23 15:05:41 -05:00
Seth Call 0db6bac749 Better reporting for quarterly payments 2025-03-23 13:54:53 -05:00
Seth Call c23305634f Add more partner fields to affiliate_traffic_total 2025-03-22 09:41:49 -05:00
Nuwan 481f8099af incorporate paypal checking out
change paypal checkout and confirm screens load inside new website
and not redirecting users to old site.
2025-03-22 20:08:51 +05:30
Seth Call 23ce65d0bd Update Referral Admin-web page to be more useful 2025-03-21 19:05:07 -05:00
Seth Call ce1c4673b2 Revert "Update Referrals page to list more partner info"
This reverts commit a2c607b449.
2025-03-21 19:03:49 -05:00
Seth Call a2c607b449 Update Referrals page to list more partner info 2025-03-21 18:45:29 -05:00
Seth Call e4f6444d35 Why can't I figure this PUBLIC_URL process env out 2025-03-19 19:34:42 -06:00
Seth Call dbdc5e5296 add public url 2025-03-19 19:22:48 -06:00
Seth Call 3b45014af0 Fix base url 2025-03-19 19:07:19 -06:00
Seth Call 55c532b44f Re-attempt build with correct URL 2025-03-19 18:53:54 -06:00
Nuwan c73e78d6e6 fix checkout total not showing correctly 2025-03-13 12:17:00 +05:30
Nuwan 488aa4c03d fix showing 0.00 for cart total 2025-03-12 11:06:01 +05:30
Seth Call 2cc56f7ad7 Fix fee in cents 2025-03-10 23:24:59 -05:00
Seth Call e6046f74b6 Merged in feature/affiliate-testing (pull request #56)
Update signups aggressively as they occur (realtime), and fix some affiliate and jamtrack flows
2025-03-10 20:38:02 +00:00
Seth Call aa9555aa1e Update signups aggressively as they occur (realtime), and fix some affiliate and jamtrack flows 2025-03-10 15:36:25 -05:00
Seth Call 39dfbadbd8 Add affiliate code to backing track pages 2025-03-05 07:46:17 -06:00
Seth Call b7732c11f8 Try force full page redirect of marketing site 2025-03-04 21:46:52 -06:00
Seth Call 7faac7b61b Back to profile 2025-03-04 21:35:08 -06:00
Seth Call 98cae96d5d logout go to marketing site 2025-03-04 21:30:56 -06:00
Seth Call 0f30107481 Revert back the REACT_APP_BASE_URL 2025-03-04 21:05:49 -06:00
Seth Call 42c77a8049 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2025-03-04 21:02:36 -06:00
Seth Call 69f4bc837a Profile default on logout 2025-03-04 21:02:01 -06:00
Nuwan 89411738cb save affiliate_visitor cookie when there is affiliate param when accessing pages 2025-03-04 23:40:08 +05:30
Seth Call 9d7fea284a Redirect to profile 2025-03-04 08:26:54 -06:00
Seth Call 198adfe395 Make /profile be the default location 2025-03-04 07:36:39 -06:00
Seth Call 383d9deeb3 Fix welcome email links 2025-03-04 07:04:13 -06:00
Seth Call 7945c52cbb Fix links for knowledge-base, help-desk, and forum 2025-03-03 22:55:30 -06:00
Seth Call 9e84bcc0df Fix move of domains 2025-03-03 20:10:02 -06:00
Seth Call 6007abd6a8 Fix broken download links to bad /downloads 2025-03-03 19:58:14 -06:00
Seth Call be5a127b4c Fix bad REACT_ vars in backing-track pages 2025-03-03 19:48:25 -06:00
Nuwan 93a824501b Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2025-03-03 22:32:39 +05:30
Seth Call 3309c7f69a Guard production pushes behind manual step 2025-03-03 22:31:38 +05:30
Seth Call b04bb0c55b Merged in VRFS-5512-jamtrack-landing-pages-2 (pull request #55)
Getting in the artist pages

* Add in artist pages

* Update bitbucket yml to push on both develop
2025-03-03 22:31:38 +05:30
Nuwan 8cafb23b3e change authenticate routes
authentication related routes are scoped in /auth/... namespace with was
earlier /authntication/...
2025-03-03 22:27:43 +05:30
Seth Call 2c76628926 Guard production pushes behind manual step 2025-03-03 07:25:01 -06:00
Seth Call b678bfd70d Merged in VRFS-5512-jamtrack-landing-pages-2 (pull request #55)
Getting in the artist pages

* Add in artist pages

* Update bitbucket yml to push on both develop
2025-03-03 13:18:54 +00:00
Seth Call 9d63882e69 Merged in seth/VRFS-5512-jamtrack-landing-pages (pull request #53)
jamtrack landing pages
2025-02-28 03:03:22 +00:00
Seth Call d4546c6975 MR is ready for review 2025-02-27 07:55:08 -06:00
Seth Call a9b9e592bb resolved 2025-02-27 07:47:12 -06:00
Nuwan dcb842035f fix removing all shopping cart items when removing one item 2025-02-22 02:11:58 +05:30
Nuwan 9c0e643b23 prevent user avatar refresh
prevent referesing the user avatar on every page navigation
2025-02-22 01:47:26 +05:30
Nuwan 94747d9fe0 fix autocomplete artist search for affiliate links 2025-02-21 18:45:52 +05:30
Nuwan 81cf0dadb0 change affiliate links format 2025-02-20 19:19:27 +05:30
Nuwan 254d1ecac7 fix reset password email link 2025-02-14 19:44:20 +05:30
Nuwan 754be7877e remove showing audioUrl 2025-02-14 19:07:06 +05:30
Nuwan 8a8f1d14f9 fix fingerprint loading issue in jamtrack page 2025-02-14 17:00:42 +05:30
Nuwan bd2d9410b5 fix jamtrack autocomplete component
add debouncing technique to fetch data when fetching the data
move the FingerprintJS initialization to the appDataContext so it is not
instantiate eveytime
2025-02-13 17:52:14 +05:30
Nuwan 1e623e77de affiliate links fix artist_name_slug 2025-02-12 15:07:57 +05:30
Nuwan a0b255a5d5 change to affiliate link format
affiliate links points to the landing page and they have now
name_slug and original_artist_slug embeded
2025-02-12 07:53:10 +05:30
Nuwan 342960e57b refactor jamtracks loading
reduce the nertwork calls it had when loading jamtracks on
jamtacks listing which increases the loading time.
2025-02-12 06:14:12 +05:30
Nuwan 36a184638f remove unwanted web/venv/ directory which was added mistakenly 2025-02-09 22:57:29 +05:30
Nuwan 1ce4d4f4e6 rename the migration files to comply with the order and naming 2025-02-09 21:07:54 +05:30
Seth Call 810ae15769 Merged in mc/sluggarize-fixes (pull request #52)
Update sluggarization and sluggarize existing jamtracks

* wip

* sluggarize script

* comment out copy/pastable sql

* add readme
2025-02-09 05:09:54 +00:00
Seth Call f26733fa46 Merged in seth/jamtrack-lambda-importer (pull request #51)
Lambda & local importer for jamtracks

* # This is a combination of 9 commits.
# This is the 1st commit message:

inital attempt before upgrading Rails in lambda

# The commit message #2 will be skipped:

# unzip works

# The commit message #3 will be skipped:

# wip

# The commit message #4 will be skipped:

# Add in gemspec

# The commit message #5 will be skipped:

# wip

# The commit message #6 will be skipped:

# imported one locally

# The commit message #7 will be skipped:

# Add in jmep

# The commit message #8 will be skipped:

# add in some baked in env vars

# The commit message #9 will be skipped:

#  ran a local container build finally

* inital attempt before upgrading Rails in lambda

* Minor tweak for docker usage case of lambda running in AWS/lambda
2025-02-08 17:20:26 +00:00
Nuwan 55f6839521 chage menu items order under account submenu 2025-02-08 18:51:08 +05:30
Nuwan 4a3630f786 user_pref change
recording_pref chage from enum to normal integer values in user.rb
2025-02-06 09:17:10 +05:30
Nuwan 71458e3983 add tooltips to the recording options in preferences page 2025-02-03 12:35:26 +05:30
Nuwan 5ff152233b account preferences page
new page to change user's recording preferences
2025-02-03 12:25:21 +05:30
Nuwan 3677181e09 add jamtrack and artist landing pages 2025-01-30 11:57:01 +05:30
Nuwan 46111f041d fix joinSession custom URL param name 2025-01-29 14:38:16 +05:30
Nuwan 1dd160e19f customURL - show modal popup instead of redirecting to a new page 2025-01-29 12:55:14 +05:30
Nuwan f07a96165d change email layout
change to the new layout of the emails
reset password and after reset password
2025-01-24 08:10:27 +05:30
Nuwan 3e9d2e371e change mailer layouts
change the layout of the updating_email and updated_email templates
2025-01-22 09:53:15 +05:30
Nuwan 3d14ddbe74 affiliate links page changes 2025-01-18 22:42:30 +05:30
Nuwan 28487f271e add fields to capture venmo details
* add new field: venmo_user_id
* add new field: phone_last_4

changed the forms to replace paypal with venmo
2025-01-18 19:14:28 +05:30
Nuwan 51f1a7e58e jamtracks: force to new site
force the user to the new (beta) website jamtracks page
if they click the jamtracks tile on home page or they
load the url of that page directly in browser
2025-01-18 07:24:13 +05:30
Nuwan a027ed7096 change favicon 2025-01-17 22:42:53 +05:30
Nuwan 70dd62606b remove debug recaptcha 2025-01-16 14:27:28 +05:30
Nuwan 21301017ca debug recaptcha 2025-01-16 13:48:30 +05:30
Nuwan 1772f5a46f fixes & improvements in signup and downloads pages 2025-01-16 13:17:25 +05:30
Nuwan 4804877452 fix the size of the play/pause buttons in JamTracks listings 2025-01-09 13:35:26 +05:30
Nuwan 1d0a01c7ee signup & download pages
signup and download pages behave the same way to the legacy site
2025-01-09 08:21:26 +05:30
Nuwan 04a45394a0 wip new signup and download pages 2025-01-02 08:38:37 +05:30
Nuwan 2c6f1ef0de discard - FULL from jamtrack name in listings 2024-12-29 23:45:21 +05:30
Nuwan 2786c74175 my jamtracks page - increase the content size to be 75% in desktop window 2024-12-29 22:01:31 +05:30
Nuwan 8835455795 UI improments in JamTrack player 2024-12-29 18:47:55 +05:30
Nuwan 2d7a6db541 debug js uninitialized val in audio player 2024-12-28 00:24:35 +05:30
Nuwan 9b427b7a24 fix audio player js ref error 2024-12-28 00:11:13 +05:30
Nuwan 315f532719 fix audio player js ref error 2024-12-27 23:29:50 +05:30
Nuwan 04a7445f68 fix js variable reference error on loading the audio player component 2024-12-27 13:21:38 +05:30
Nuwan 6368897b21 fix ref error in audio player 2024-12-27 02:12:27 +05:30
Nuwan d7eef09946 custom audio player
change the defaut html audio player to a custom player
2024-12-27 01:47:08 +05:30
Nuwan f8462dbb84 fix jamTrack query params: page 2024-12-25 20:16:38 +05:30
Nuwan 8ddb4ce80d changes in locale file 2024-12-25 19:18:33 +05:30
Nuwan 6b66764082 improvements to JamTracks pages 2024-12-25 18:56:16 +05:30
Nuwan 5673d9b21e jamtracks related misc fixes 2024-12-25 00:04:11 +05:30
Nuwan c163d6b0ba UI layout fixes in checkout and shopping cart pages 2024-12-23 15:35:16 +05:30
Nuwan 61eddbb2bc prevent calling /shopping_carts api multiple times in jamtracks listing 2024-12-22 21:59:28 +05:30
Nuwan 48547d2cb1 JamTracks related ui fixes 2024-12-22 02:11:08 +05:30
Nuwan c3563a9197 wip jamtrack page creating and playing custom jamtracks 2024-12-17 16:22:31 +05:30
Nuwan 08fafbf2de work on JamTrack player 2024-12-10 11:23:02 +05:30
Nuwan cbaf1ea4f9 fix links in the jamtrack help resources section 2024-12-07 09:36:58 +05:30
Nuwan d9004980e6 fix presentation styles of jamtracks in jamtracks list page 2024-12-07 09:19:23 +05:30
Nuwan 5d87d1a358 handle purchasing a JamTrack
handle adding to cart of redeemable vs paid jamtracks
2024-12-05 20:01:56 +05:30
Nuwan 3245024925 more JamTrack page fixes 2024-12-03 19:35:38 +05:30
Nuwan d3a9a7c1e5 jamtracks related UI fixes 2024-12-03 19:03:21 +05:30
Nuwan f389250aa8 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-12-02 09:52:09 +05:30
Nuwan d5dcc71e35 fix error showing user affiliate agreement status and date 2024-12-02 09:46:01 +05:30
Seth Call 67241e7be7 Fix URLs in welcome email 2024-12-01 22:00:24 -06:00
Seth Call 5ab863bc33 Fix extra styles added to beta footer 2024-12-01 17:15:45 -06:00
Seth Call 89c4df9650 Align footer images better 2024-12-01 16:54:31 -06:00
Seth Call e6ac929303 Switch to pngs from svg for new beta email footer 2024-12-01 15:53:06 -06:00
Seth Call fb3cf004b9 once more with the asset paths 2024-12-01 14:14:45 -06:00
Seth Call 531bf25376 Fix svg paths 2024-12-01 13:38:29 -06:00
Seth Call 27b66783c1 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-12-01 10:01:21 -06:00
Seth Call 2402cf6992 Fix social urls 2024-12-01 10:01:14 -06:00
Nuwan 387a9b141d Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-12-01 06:07:16 +05:30
Nuwan 625a9dc0e4 fix app launching using custom URL scheme 2024-12-01 06:06:50 +05:30
Seth Call a09f922463 Force build 2024-11-30 13:21:49 -06:00
Seth Call 9b6f6f74e9 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-11-30 13:17:28 -06:00
Nuwan db9ad36627 debug console print custom mix audio url 2024-11-29 08:41:24 +05:30
Nuwan ea0131cb4e add help links in JamTracks page 2024-11-28 23:25:51 +05:30
Nuwan c5439f7a18 change the order of the affiliates menu items 2024-11-26 19:14:01 +05:30
Nuwan 78debaa8ab fix errors in JamTracks page and shopping cart page 2024-11-26 18:55:09 +05:30
Nuwan 8bbdedd082 fix affiliate link: use the correct id 2024-11-25 13:39:24 +05:30
Nuwan 3c4e59faa9 fix useHistory reference error 2024-11-23 18:59:44 +05:30
Nuwan b532308e28 custom url scheme: add ability to suppoer different type of custom actions. ex: createSession, joinSession 2024-11-23 18:42:12 +05:30
Nuwan 63289a29af change paramater names in joinSession custom Url 2024-11-22 22:56:25 +05:30
Nuwan 5d60c3db81 remove leading ? in the custom url query string 2024-11-22 22:13:18 +05:30
Nuwan 8f58fe4017 fixes in affiliate section - more textual and style fixes 2024-11-21 20:01:43 +05:30
Nuwan 82007bb41c minor textual and style updates to affiliate pages 2024-11-21 13:15:01 +05:30
Nuwan 358f42bba2 affliate page tweeks wip 2024-11-21 08:04:08 +05:30
Nuwan ab5b6a5fb5 enable forgot password form
make available the forgot password link so forgot password flow
is handled within the app. previously it redirected to the legacy site
2024-11-19 12:59:14 +05:30
Nuwan b04b8cfee2 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-11-19 12:53:04 +05:30
Nuwan 45e6122439 more tweaks to email template 2024-11-19 01:24:39 +05:30
Nuwan d0115a8cd9 new mailer template update 2024-11-19 01:24:39 +05:30
Nuwan ec7a79c8bb forgot password feature 2024-11-19 01:24:36 +05:30
Nuwan df9cbf3ba7 forgot password feature wip 2024-11-19 01:24:06 +05:30
Nuwan 33d0de6f0c wip forgot password 2024-11-19 01:24:06 +05:30
Nuwan 8b350ca3b6 wip forgot password 2024-11-19 01:24:06 +05:30
Nuwan abade1915e more tweaks to email template 2024-11-17 21:58:41 +05:30
Nuwan eba86ccdd5 new mailer template update 2024-11-17 21:19:29 +05:30
Nuwan a388d5e1d0 open jamkazam:// custom url in same window 2024-11-14 19:15:01 +05:30
Nuwan 98dbb358bd change the format of custom Url scheme 2024-11-14 18:41:07 +05:30
Nuwan 93961806eb skip showing latency badge if user is currentUser 2024-11-13 21:35:27 +05:30
Nuwan 6366bc5c6e fix type in showing instruments in session history 2024-11-13 21:13:21 +05:30
Nuwan ae138b79c0 session history latency not showing
includes fix for showing unknown latency badge for all sessions
and reformat the session time
2024-11-13 20:48:41 +05:30
Nuwan ed9887f9e9 add timezone to format session history date 2024-11-13 19:55:34 +05:30
Nuwan 3dc4af65e0 format session history date 2024-11-13 16:16:10 +05:30
Nuwan ab5947d94a error fix in sessions listing page
prevent errors that caused by null created_at values
when rendering session details
2024-11-13 07:31:13 +05:30
Seth Call 8979d732f2 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-11-11 18:40:42 -06:00
Nuwan b9eff8dac0 debug session history participat letancy 2024-11-11 00:42:34 +05:30
Nuwan c42dfdbb30 session history pagination 2024-11-10 21:10:08 +05:30
Nuwan 94ac48c8b5 fix images on beta email template 2024-11-08 16:40:20 +05:30
Nuwan ac469c2741 remove mailcatcher gem from Gemfile.alt 2024-11-08 13:03:47 +05:30
Nuwan d7a4e46355 add murali, bob & jorge to the jamkazam users that get the new_musicians_match email 2024-11-07 20:50:40 +05:30
Nuwan 051477d19f new user match email - jamkazam team only
add a config to restrict new_musicians_match email to be sent only
to jamkazam team users
2024-11-07 20:45:51 +05:30
Seth Call 47fd0cb68d Clean up load_history in terms of list all unique participants for a session 2024-11-07 07:35:51 -06:00
Nuwan 371f68a616 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-11-06 18:00:34 +05:30
Nuwan 69a37495b5 new user confirm email
update user confirm email contents and change to the new layout
2024-11-06 17:58:40 +05:30
Seth Call 78ae753d87 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-11-05 20:04:35 -06:00
Seth Call 4944c5983d Use current user to scope history 2024-11-05 20:04:28 -06:00
Nuwan 182deaa177 fix missing file error 2024-11-06 01:04:36 +05:30
Nuwan 1281caccf2 change welcome_message email to the new email layout and update content 2024-11-06 00:59:23 +05:30
Nuwan 604b6f6b59 localize matched new users email 2024-11-04 17:27:23 +05:30
Nuwan 996fbe51d0 new email template chages
this email template is used for the emails with the new design
which is used in the beta site.
2024-11-01 20:18:05 +05:30
Nuwan d4b412e223 change svg of other instrument icon 2024-10-30 08:36:52 +05:30
Nuwan 2d408eb3a7 show generic icon image for instruments which we do not have an icon 2024-10-29 22:32:20 +05:30
Nuwan c8a8ecc40d fix minor css issue in instrument list 2024-10-29 09:22:55 +05:30
Nuwan b51207dd3e UI style fixes in find friends page 2024-10-29 09:04:58 +05:30
Nuwan f2f6b978f8 hide 'from_location' checkbox
hide this checkbox in find friends feature. Just remove the UI
element without changing any logic
2024-10-28 21:29:24 +05:30
Nuwan b8b1146320 change format of custom URL schema according to the new way of handling it in the back end 2024-10-23 11:55:47 +05:30
Nuwan 541bca6b28 message modal - scroll to bottom
on the initial loading of messages, scroll to the bottom of the
message modal.
2024-10-23 08:22:06 +05:30
Nuwan c1a2e76186 fix profile avatar not showing
use src parameter when passing photo_url to the JKProfileAvatar
2024-10-23 08:00:50 +05:30
Nuwan 79ba0ebc70 use var instead of const
In layout.js. use var instead of const/let. because consts or let keywords are
not been supported in legacy client
2024-10-22 22:11:39 +05:30
Nuwan 8718ac4588 improvement to friend connect button 2024-10-22 21:57:56 +05:30
Nuwan 0dd8e90a7f edit profile button - make it a component with tooltip 2024-10-22 21:00:10 +05:30
Nuwan 3b0c2d1a42 fix musician filter
change instruments parameter names that are been passed to
the lambda function to be matched with the expected parameters in
labda function
2024-10-22 08:28:56 +05:30
Nuwan ccfb48459d improvements in friend connect/disconect function 2024-10-22 04:43:40 +05:30
Nuwan 6d1ad051fe fix alignment issues inside message modal contents 2024-10-19 16:03:02 +05:30
Nuwan 652b33ec51 prevent message modal scrolling on message arrive 2024-10-18 23:29:27 +05:30
Nuwan ca615eb9d9 misc fixes related to friends page 2024-10-18 22:48:11 +05:30
Nuwan 8e3272c7d5 fix data loading related to pagination in /friends page 2024-10-18 12:06:13 +05:30
Seth Call 5831e7d709 Make the previously-slow query target feed query configurable. Default to on 2024-10-14 11:18:50 -05:00
Nuwan 3c3ea6cbba custom URL scheme: use window.document.href instead of window.open 2024-10-11 11:55:12 +05:30
Nuwan 3db0a30fef styling change on join session button 2024-10-08 02:27:36 +05:30
Nuwan 7ed94b5dc0 useUserProfile hook - ability to turn on/off cache 2024-10-08 01:01:46 +05:30
Nuwan b83dfb2114 fix syntax error in browse sessions mobile view 2024-10-07 13:34:47 +05:30
Nuwan 29d64b7d0f debug browse session mobile view 2024-10-07 13:26:46 +05:30
Nuwan 36bd2788b2 another fix for managing profile edit page user genres 2024-10-07 11:24:37 +05:30
Nuwan 119a180a82 display only genres with type = profile in edit profile 2024-10-07 10:48:09 +05:30
Nuwan 91c85d5e59 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-10-07 08:49:45 +05:30
Nuwan 5d171ec016 prevent duplicated genres are being sent when updating user profile 2024-10-07 08:49:32 +05:30
Seth Call 4732138cbd Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-10-05 15:54:26 -05:00
Seth Call d07cff3721 Fix recurly bug where updated 2x from a RJS token 'ruins' the account until the user re-deploys 2024-10-05 15:54:20 -05:00
Nuwan 2afd8500bd change browse session no records alert 2024-10-05 02:58:48 +05:30
Nuwan 0377f73b9f show notification on friend request accept 2024-10-03 19:00:27 +05:30
Nuwan 47b1e843ed Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-10-03 04:38:41 +05:30
Nuwan 77359f7fc2 friends page state
use a separate redux slice for friends page
add musician slice to prevent mess up with the other user objects
fetched globally. people redux slice would serve
as global store having user records that can be referenced
elsewhere
2024-10-03 04:34:03 +05:30
Seth Call d603dd2911 bump paypayl recurly gem 2024-10-01 20:45:32 -05:00
Seth Call eea46feb5d Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-09-29 11:24:51 -05:00
Seth Call 7dbd061a86 Fix latency url 2024-09-29 11:24:39 -05:00
Nuwan db6a94ded1 forgot password: redirect to current site forgot password page 2024-09-23 20:16:03 +05:30
Nuwan 15af2d7469 fix for genres and instruments loading in profile edit page 2024-09-22 10:15:18 +05:30
Nuwan 9a0b4f4ddb profile edit: fix genres select edge case on when the user does not already have selected any genres 2024-09-21 09:38:26 +05:30
Nuwan c779277b4d change help desk page url 2024-09-20 20:24:12 +05:30
Nuwan a0dc7fa92d force user to login when accessed from email message link 2024-09-19 18:18:24 +05:30
Nuwan 0993c9a6b6 fix for genres and instrument loading in profile page 2024-09-19 13:50:34 +05:30
Nuwan b876e1e253 open help pages on new tab 2024-09-19 04:56:21 +05:30
Nuwan 3300b5a37a edit profile page: fixing genres and instrument loading issue 2024-09-18 03:12:51 +05:30
Nuwan 3695b2f5d4 help links: redirect to relevent external urls 2024-09-14 12:05:47 +05:30
Nuwan d976cdf866 remove redundent association keys
In the api_users_controller#profile_show remove :genres, :instruments
keys from the association includes
2024-09-13 08:02:34 +05:30
Nuwan fa35930c75 fix for user instruements and genres are not been loaded on edit profile page load 2024-09-10 19:28:44 +05:30
Nuwan cd1930a2bc fix for user instruements and genres are not been loaded on edit profile page load 2024-09-10 18:10:18 +05:30
Nuwan b5a18f6501 trying to figure out why user instruements and genres are not being loaded on edit profile page load 2024-09-10 15:46:27 +05:30
Nuwan fd1c0714d3 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-09-09 15:27:21 +05:30
Nuwan 4f6bf663dd fix for instruments and genres initial loading in profile edit form 2024-09-09 15:26:56 +05:30
Seth Call 0c2102b308 clean it up again 2024-09-08 14:46:16 -05:00
Seth Call ba59e7b20b Newer build 2024-09-08 14:19:44 -05:00
Seth Call 3f1a3402d8 Merged in feature/all-clients-are-modern (pull request #49)
Move all clients to the 'modern' track.

* Force old client website to upgrade to new client

* Also add

* wording fix
2024-09-08 18:18:02 +00:00
Nuwan c60959126c Flip positions of Instruments and Genres UI cards on Profile pag 2024-09-08 07:22:01 +05:30
Nuwan c404cc0bb1 add filestack-js in package.json 2024-09-07 23:35:51 +05:30
Nuwan ef79d3a8c0 now notifications in header drawer scrollable 2024-09-06 23:15:48 +05:30
Nuwan 499cd7e16b header notifications
show number of unread notifiacation count on header
allow user to scroll through the notification in header notificaton
drawer
2024-09-03 00:11:36 +05:30
Nuwan 727147ffee Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-08-29 17:10:01 +05:30
Nuwan 3175f77b7f implement profile photo upload 2024-08-29 17:08:19 +05:30
Seth Call 6833c68e40 Merge branch 'develop' into feature/legacy-download 2024-08-28 06:23:41 -05:00
Nuwan 9668b59e23 integration with filestack for profile avatar image uploading - wip 2024-08-27 00:50:01 +05:30
Nuwan 8aa463c054 in header show notification number badge 2024-08-23 16:03:23 +05:30
Nuwan 136a3c399d edit profile page ui changes 2024-08-21 00:49:58 +05:30
Nuwan e973a5f55c add control to prevent unsaved changes
in profile edit if user tries to navigate away from the site
show native confirmation message asking user's consent
2024-08-19 19:53:04 +05:30
Nuwan 5a00f45d5c profile edit page ui improvements 2024-08-18 16:41:48 +05:30
Nuwan 39be8f2955 adujest the width of instrument selection section 2024-08-16 21:49:44 +05:30
Nuwan bca4f17c8f profile edit - make the profile photo bigger and fix alignments 2024-08-16 12:05:55 +05:30
Nuwan f9aee04dd5 add missing api call to rest.js 2024-08-15 13:58:36 +05:30
Nuwan 3945e97319 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-08-15 13:55:43 +05:30
Nuwan be1cca46b1 my jam tracks loading fixes 2024-08-14 08:44:46 +05:30
Nuwan 898154a775 fix my jam track filtering 2024-08-14 08:44:46 +05:30
Nuwan 94308e9c1d fix my jam track filtering 2024-08-14 08:44:46 +05:30
Nuwan 828939ff68 fix my jam track filtering 2024-08-14 08:44:46 +05:30
Nuwan 7d7dc7a620 fix not loading next page results in my jam tracks 2024-08-14 08:44:46 +05:30
Nuwan 3b451427fc jamtrack player, cusmtom mixes and download mixes 2024-08-14 08:44:43 +05:30
Nuwan f904bdfc1c wip jamtrack player 2024-08-14 08:44:08 +05:30
Nuwan faecb69db9 jamtrack player WIP 2024-08-14 08:43:29 +05:30
Nuwan 2cc14be759 WIP: jamtracks, shopping cart and checkout pages 2024-08-14 08:43:18 +05:30
Nuwan 6e29efd307 jamtracks pages
includes jamtrack listing, my jamtracks, jamtrack details pages
2024-08-14 08:40:38 +05:30
Nuwan fb537806ca my jam tracks loading fixes 2024-08-13 23:43:34 +05:30
Nuwan 22d4553f6f fix my jam track filtering 2024-08-13 01:19:24 +05:30
Nuwan a0e4c5fc33 fix my jam track filtering 2024-08-13 00:46:27 +05:30
Nuwan 44f78edc63 fix my jam track filtering 2024-08-13 00:11:26 +05:30
Nuwan 4a09e56d8b fix not loading next page results in my jam tracks 2024-08-12 14:15:37 +05:30
Nuwan 7cf5648b78 jamtrack player, cusmtom mixes and download mixes 2024-08-12 11:48:04 +05:30
Seth Call e55ad12b61 missed files 2024-08-11 22:10:47 -05:00
Seth Call c907d9c3ba Be sure to use the same product names as in the database 2024-08-11 20:12:33 -05:00
Seth Call c44db20385 Create /downloads-legacy, and update /downloads for the 3 clients 2024-08-11 19:39:56 -05:00
Nuwan 7af01a6c61 wip jamtrack player 2024-07-31 11:27:56 +05:30
Nuwan 5b750cc3d9 jamtrack player WIP 2024-07-19 21:03:28 +05:30
Nuwan 106ea91361 make login compulsory to access the other pages 2024-07-17 18:14:18 +05:30
Nuwan 041ebccaf1 active admin CRUD for app feature 2024-07-17 15:27:50 +05:30
Nuwan 86d77df2c9 app features on/off
add ability to control the visibility of beta site menu items.
the visibility state is stored in the back end api and the front
end menu items are been shown accordingly.
2024-07-16 17:26:48 +05:30
Nuwan a3c511d2b0 WIP: jamtracks, shopping cart and checkout pages 2024-07-13 15:17:13 +05:30
Nuwan adafcb8569 work in progress on jamtracks shopping 2024-06-21 18:16:29 +05:30
Nuwan 48335a9d9c add spaces between artists list items 2024-06-10 23:02:41 +05:30
Nuwan 5fd4015ee2 fix track preview alignment issue 2024-06-10 22:57:57 +05:30
Nuwan e2b4c901dc Jamtrack shopping page 2024-06-10 21:28:34 +05:30
Nuwan 176ba1febe JamTracks
includes JamTrack filter page
2024-06-10 13:45:15 +05:30
Nuwan 24aab60556 add cypress tests for affiliates pages 2024-05-23 17:22:41 +05:30
Nuwan 8868ff718f add tests for affiliate earnings 2024-05-23 00:55:03 +05:30
Nuwan bbe83a008f affiliate earnings page 2024-05-17 14:15:19 +05:30
Nuwan e878c64c3c affiliate signups and links pages 2024-05-17 10:03:36 +05:30
Nuwan 8f63547f34 affiliate program and payee pages 2024-05-09 18:42:55 +05:30
Nuwan 97e0a8d36a session history page:
list all the sessions in decending order they were created
2024-05-05 18:38:29 +05:30
Nuwan 7176fecd7b sessions history page wip 2024-05-03 10:31:57 +05:30
Nuwan 37ed2dddd4 beta site sessions history page wip 2024-05-03 08:25:51 +05:30
Nuwan cb0cb654c8 limit CORS only to /api/* 2024-04-26 16:35:45 +05:30
Nuwan 40fbc7b430 fix error when unmounting paymemnt page 2024-04-25 20:48:06 +05:30
Nuwan 81c1c17a2f add more tests for payment history page, responsive mobile view 2024-04-24 20:44:00 +05:30
Nuwan c2ffbff216 account payments page and cypress tests 2024-04-24 08:28:02 +05:30
Nuwan 4dd95af2fa tweaks to subscription page 2024-04-20 17:27:30 +05:30
Nuwan 20eb17b044 initial release of my friends page 2024-04-20 16:44:24 +05:30
Nuwan 703309aa65 add more tests for subscription page 2024-04-17 11:33:52 +05:30
Nuwan 3ae52098c6 fix for subscription display error 2024-04-16 18:30:37 +05:30
Nuwan bd45275107 prevent duplicate entries in friends page 2024-04-12 19:39:55 +05:30
Nuwan edb6bd0b90 fix friends page related cypress tests 2024-04-11 00:21:53 +05:30
Nuwan cdd12d621d Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-04-10 13:46:51 +05:30
Nuwan cb1a8f54c5 fix default plan selection in account subscription 2024-04-10 13:39:37 +05:30
Nuwan 05d8db9cfa add cypress tests for subscription page 2024-04-10 13:39:00 +05:30
Nuwan af1140fa05 fix default plan selection in account subscription 2024-04-05 19:36:44 +05:30
Nuwan 7b0d6c153e fix null value error 2024-04-05 11:11:13 +05:30
Nuwan dbb5c4a520 account subscription
let user to change subscription
2024-04-05 10:52:06 +05:30
Nuwan ee95d07dfc fix style of join session button 2024-03-21 19:22:44 +05:30
Nuwan 884203844b Join session link
add link under the join button in browse sessions page
2024-03-21 08:13:56 +05:30
Nuwan a420767446 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2024-03-21 00:31:47 +05:30
Nuwan 4ff3d2d83c enter.svg - change css color attribute 2024-03-21 00:31:35 +05:30
Nuwan Chaturanga d80627b5d4 Merged in develop-promise (pull request #46)
Develop promise

Approved-by: Seth Call
2024-03-20 14:00:10 +00:00
Seth Call 73c566fa9e Merged develop into develop-promise 2024-03-20 13:59:21 +00:00
Nuwan e305898a74 resize the join button icon in browser sessions page 2024-03-20 09:12:26 +05:30
Nuwan 2a31e81c65 remove whitespace 2024-03-18 08:52:18 +05:30
Nuwan 6ad9aed71f use var instead of let/const
let and const keywords in javascript can not use because the code based
is also been used in the production client.
2024-03-18 08:44:40 +05:30
Nuwan 2459b3d447 websocket-gateway copy updates to init 2024-03-16 22:53:15 +05:30
Nuwan 0476e5ebb6 set default for accept_desktop_notifications 2024-03-16 22:47:15 +05:30
Nuwan e5dc8b57ec fix syntax typo in websocket-gateway router.rb 2024-03-16 16:38:33 +05:30
Nuwan 52c8b48d81 merge websocket-gateway changes
from promised branch get the changes on router file and apply
on develop branch
2024-03-16 14:34:03 +05:30
Nuwan 4144d6d123 extract changes to artifacts from promised based branch 2024-03-16 14:18:31 +05:30
Nuwan 1c0a6b2138 change default value setting
change users migration not to lock the table by directly setting
the default value of the accept_desktop_notifications colums
when running the migration
2024-03-16 10:52:32 +05:30
Nuwan 17b0ea6111 fix errors while selecting country, region and city 2024-03-11 22:23:12 +05:30
Nuwan 95008f49e6 debug error on profile edit (in server) 2024-03-11 16:38:22 +05:30
Nuwan 9164a1058d debug error on profile edit (in server) 2024-03-11 07:57:30 +05:30
Nuwan 23830144d8 debug error on profile edit (in server) 2024-03-11 07:50:49 +05:30
Nuwan eb488e374b profile page update synchronously.
making this chage to fetch all the data that need to be present
for the page on initial loading
2024-03-11 07:27:00 +05:30
Nuwan 8f84e5d12d disable filestack code in image upload for now 2024-02-28 22:19:29 +05:30
Nuwan 238fc8a382 fix error on creating database index: wrong table 2024-02-28 21:58:03 +05:30
Nuwan 9dc101d3f6 fix instrument proficiency chage
update the state correctly of the instrument list when
proficiency is changed
2024-02-28 19:48:52 +05:30
Nuwan 1a11cc331c add e2e test cases for account/identity and profile edit pages 2024-02-23 16:22:55 +05:30
Nuwan 8cf7048b7f fixes related to beta site profile edit and lobby page 2024-02-19 19:00:53 +05:30
Nuwan 4c161025e8 profile image upload wip 2024-02-16 18:25:05 +05:30
Nuwan 6546cc08bc add language translation keys to session pages 2024-02-14 17:31:30 +05:30
Nuwan fd9632a26c add translations 2024-02-14 11:37:01 +05:30
Nuwan 861722e5d4 includes fixes in profile edit form and lobby page 2024-02-12 19:11:11 +05:30
Nuwan 30aa9eeed2 merge conflicts fix 2024-02-05 19:10:40 +05:30
Nuwan 1de7a1f2f2 fix merge conflicts 2024-02-05 19:07:10 +05:30
Nuwan 963cc238e8 remove duplicate method call in rest.js 2024-02-05 19:03:42 +05:30
Nuwan dd4239f1f3 account identity update
allow users to update their JamKazam email and password securly.
2024-02-05 18:26:01 +05:30
Nuwan fe6c372d3d wip: profile edit 2024-02-05 18:26:01 +05:30
Nuwan df90496d30 change session enter button icon 2024-02-05 18:24:08 +05:30
Nuwan b85a2b236c fix instrument icon size in mobile view 2024-02-05 18:23:51 +05:30
Nuwan 0406a64531 fix: validate latency badge props 2024-02-05 18:22:39 +05:30
Nuwan 3fed41899a fix /filter api - prevent error on exception conditions 2024-02-05 18:22:39 +05:30
Nuwan 6e131f6b5d fix query string construction when fetching user latencies 2024-02-05 18:22:39 +05:30
Nuwan c29d3459e6 fix lobby users query 2024-02-05 18:21:18 +05:30
Nuwan c16be14207 fix errors due to null values 2024-02-04 23:39:54 +05:30
Nuwan aeb2e50692 account identity update
allow users to update their JamKazam email and password securly.
2024-02-03 18:29:57 +05:30
Nuwan d2c525f498 more updates to lobby page
includes showing chat notifications. also ui improvements
2024-01-22 11:28:16 +05:30
Nuwan b563f22a32 wip: profile edit 2024-01-14 13:32:15 +05:30
Nuwan 4accb2296f merge conflict resolved 2024-01-02 02:28:36 +05:30
Nuwan 23e0a7096c change session enter button icon 2024-01-02 02:23:48 +05:30
Nuwan 3bf694d816 fix instrument icon size in mobile view 2024-01-02 02:23:48 +05:30
Nuwan b4200a1b87 fix: validate latency badge props 2024-01-02 02:23:48 +05:30
Nuwan 286841c3d0 fix /filter api - prevent error on exception conditions 2024-01-02 02:23:48 +05:30
Nuwan 9b59ef6121 fix query string construction when fetching user latencies 2024-01-02 02:23:48 +05:30
Nuwan 5a8c85e765 session lobby with global chat feature 2024-01-02 02:23:21 +05:30
Nuwan c07bf115e6 change session enter button icon 2023-12-27 20:44:15 +05:30
Nuwan 06e085fd13 fix instrument icon size in mobile view 2023-12-27 18:15:50 +05:30
Nuwan 9b72852a54 wip session lobby 2023-12-22 15:27:26 +05:30
Nuwan 0f25b00571 wip session lobby 2023-12-20 21:32:01 +05:30
Nuwan 8e792d1658 fix: validate latency badge props 2023-12-14 20:02:39 +05:30
Nuwan 84481a4fec fix /filter api - prevent error on exception conditions 2023-12-14 11:34:42 +05:30
Nuwan cff277d437 session lobby wip 2023-12-14 04:19:25 +05:30
Nuwan b0672a9cb3 fix query string construction when fetching user latencies 2023-12-06 04:51:17 +05:30
Nuwan 4fed7cbb1a wip session lobby 2023-12-06 04:23:17 +05:30
Nuwan 684fff910c wip session lobby 2023-12-05 15:04:19 +05:30
Nuwan 64c42b5de3 update cypress e2e tests 2023-12-05 12:07:19 +05:30
Nuwan 38f9d4869b fix UI related alignment issues in browse sessions page 2023-12-03 15:56:11 +05:30
Nuwan 317fdb2171 Instrument icon convered as a react component 2023-12-01 01:25:43 +05:30
Nuwan 6d5edf93bf tweek styles in use selection 2023-11-30 23:34:56 +05:30
Nuwan 335d7667b5 fix latency badge and avatar image 2023-11-30 09:59:11 +05:30
Nuwan 0a871c738a add condition to display latency badge only 2023-11-29 09:37:53 +05:30
Nuwan 1d355a3a96 hide latency numbers in latency badge in sessions page 2023-11-29 09:13:07 +05:30
Nuwan c1a4481bf2 latency badge - fix data 2023-11-29 08:59:04 +05:30
Nuwan 5315d88903 fix api response of latency data 2023-11-29 08:36:37 +05:30
Nuwan e5afb83f81 fix rest api getLatencyToUsers parameter 2023-11-29 08:04:14 +05:30
Nuwan 812cedb0e1 fix for latency badge in browse sessions page 2023-11-29 01:23:50 +05:30
Nuwan a07ff74dc0 fix musician avatar image src in large browser views 2023-11-28 17:26:08 +05:30
Nuwan 27a3b3c09b tweek ui and styles in browse sessions page 2023-11-28 16:48:55 +05:30
Nuwan 21d6801185 fix styles in browse sessions 2023-11-26 00:22:44 +05:30
Nuwan 66a7f81317 show instrument icons in profile details side panel 2023-11-25 23:10:50 +05:30
Nuwan 6fed528e84 fix styles in browse session page 2023-11-25 11:16:16 +05:30
Nuwan 2b96b4d8ef Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2023-11-24 20:03:55 +05:30
Nuwan d8685a00bd fix errornious src value to profile avatar image 2023-11-24 20:03:31 +05:30
Nuwan d0d2a41e96 change firends autocomplete default avatar 2023-11-24 20:03:31 +05:30
Nuwan 2edfccda87 browse sessions page ui improvements 2023-11-24 20:03:11 +05:30
Nuwan 3062238465 fix errornious src value to profile avatar image 2023-11-17 22:35:40 +05:30
Nuwan 67fbf932ee change firends autocomplete default avatar 2023-11-17 18:53:41 +05:30
Nuwan 5598b2ef17 fix responsive view of new session window in small and medium size windows 2023-11-15 19:43:36 +05:30
Nuwan 60ef40a51b fix styles in mobile view of create new session screen 2023-11-15 18:23:38 +05:30
Nuwan fcd9dd15f4 show native app unavailable modal
show this modal if the native JamKazam app is not available on user's computer.
occurs on submission of new session form and on clicking join session in
browse session page.
2023-11-09 16:19:15 +05:30
Nuwan b7615c3fcd hide preview session button 2023-11-05 19:49:34 +05:30
Nuwan 10e67e4cbb fix merge conflicts 2023-11-03 09:22:09 +05:30
Nuwan fef31f097f merge new beta site features to develop branch 2023-11-02 17:51:42 +05:30
Nuwan c108bdd058 fixes to cypress test of friends list 2023-11-02 17:00:45 +05:30
Seth Call f42383f0b4 build bump 2023-11-02 08:41:35 +05:30
Seth Call 2102f8807a Rollback pg 2023-11-02 08:41:35 +05:30
Seth Call c8a111f5f5 Beta download page 2023-11-02 08:41:35 +05:30
Seth Call e491461f64 notes 2023-11-02 08:41:35 +05:30
Nuwan 9b94ea6351 limits musicians in weekly email
this limits the number of users in weekly email to be 20
2023-11-02 08:41:35 +05:30
Nuwan 7149392fe2 Limits weekly email entries
this limits number of musician to be listed in weekly email to be 20
2023-11-02 08:41:35 +05:30
Nuwan 20c8df7121 show last active time in words
in user recommendation email show the last active time using
action_view time_ago_in_words helper
2023-11-02 08:41:35 +05:30
Nuwan 1ca3f5f245 improvements to sending weekly emails
- optimize user filtering sql
- dealing with default values
- eliminate null value errors in mailer templates
2023-11-02 08:41:35 +05:30
Nuwan 1e988931a4 sending weekly email to users about new users joined in 2023-11-02 08:41:29 +05:30
Nuwan f75d2c8c46 send weekly email to users about new musicians 2023-11-02 08:39:16 +05:30
Nuwan fad3b73d67 wip new user recommendation email 2023-11-02 08:33:48 +05:30
Nuwan 46202a2373 sip on user match mailer 2023-11-02 08:33:48 +05:30
Nuwan bbab6cdb9f user recom email wip 2023-11-02 08:33:48 +05:30
Nuwan 6a57530a8b beta site current session listing with e2e tests 2023-11-01 18:58:08 +05:30
Nuwan b3922ec025 wip browse music sessions 2023-10-26 17:25:02 +05:30
Nuwan dd03c215c4 new session opening jamkazam app
submit the form to open jamkazam app in to
new session window with the selected privacy level.
also contains e2e tests
2023-10-19 17:09:02 +05:30
Nuwan 20c02f0f2a wip on session create in beta site 2023-10-17 08:30:23 +05:30
Nuwan 02f3201cb2 wip new session form 2023-10-14 06:56:39 +05:30
Nuwan 65bc188af1 wip beta create session 2023-10-03 00:40:53 +05:30
Nuwan 484482e5bd modificaions to the leve side navigation and new sessions page 2023-09-29 22:45:26 +05:30
Nuwan 036d982ab7 package lock updated 2023-09-28 16:52:45 +05:30
Seth Call fb7e4a287e build bump 2023-09-08 06:48:18 -05:00
Seth Call 0a32c1fac9 Rollback pg 2023-09-01 17:53:20 -05:00
Seth Call c5767efbaa Beta download page 2023-09-01 17:18:41 -05:00
Seth Call 3981c47f9f notes 2023-02-17 12:32:34 -06:00
Seth Call 84e3609602 Merged in feature/user_recommendations_email (pull request #41)
WIP: Feature/user recommendations email
2023-02-14 15:56:01 +00:00
Nuwan 199086d06b add prop-types validations and cypress e2e tests 2023-02-14 01:59:55 +05:30
Nuwan fa082230b8 create new session page for beta site 2023-02-12 12:06:16 +05:30
Nuwan b589ad8553 working on new session screen 2023-02-09 09:35:29 +05:30
Nuwan 981b83cea2 wip jam-ui new session window 2023-02-07 10:05:03 +05:30
Nuwan e25b88d062 wip jam-ui session 2023-02-03 00:24:26 +05:30
Nuwan 550a458c8d limits musicians in weekly email
this limits the number of users in weekly email to be 20
2023-01-27 17:36:07 +05:30
Nuwan 100e14cad0 Limits weekly email entries
this limits number of musician to be listed in weekly email to be 20
2023-01-27 17:11:06 +05:30
Nuwan 529d3fc891 show last active time in words
in user recommendation email show the last active time using
action_view time_ago_in_words helper
2023-01-26 00:30:17 +05:30
Nuwan 6ea439b435 improvements to sending weekly emails
- optimize user filtering sql
- dealing with default values
- eliminate null value errors in mailer templates
2023-01-25 22:50:07 +05:30
Nuwan 2b80e277c9 sending weekly email to users about new users joined in 2023-01-24 09:53:04 +05:30
Nuwan 96a93c7daf send weekly email to users about new musicians 2023-01-20 04:50:27 +05:30
Nuwan 6ff25ad1b7 wip new user recommendation email 2023-01-13 11:10:50 +05:30
Nuwan 4405e08c0a sip on user match mailer 2023-01-04 21:41:57 +05:30
Nuwan db7525ad64 user recom email wip 2023-01-02 16:39:05 +05:30
Nuwan 50ed5116f7 fix for pagination 2022-10-27 12:16:02 +05:30
Nuwan 17207fc0b8 fix for offset var 2022-10-27 11:53:47 +05:30
Nuwan 2de5f3a3c2 improve cypress integration test for filter musicians 2022-10-27 11:29:20 +05:30
Nuwan e943a3235e use offset for pagination instead of page number 2022-10-26 22:44:20 +05:30
Nuwan 957c5dc3e9 clean up musician filter codes 2022-10-26 12:46:27 +05:30
Nuwan 5c0ed0d773 remove currentPage and NextPage variables and just use page variable for pagination 2022-10-26 12:15:11 +05:30
Nuwan 6fd7a6531b fix for pagination. just show what ever data received from api without checking unique 2022-10-26 10:45:09 +05:30
Nuwan a9c0315697 fixes for pagination people filter component 2022-10-25 23:27:58 +05:30
Nuwan 0cac99e407 friends list pagination fix 2022-10-25 21:42:30 +05:30
Nuwan f8eca9d538 fixes to musicians list filter prefetcing records 2022-10-25 18:45:48 +05:30
Nuwan 6e78f61f9c improve prefetching
Only fetch the 'next set of records that aren't yet shown' once the
initial request is done. When you click 'Load', it should be only making one request at that point -- which would be the next page after the current set being shown
2022-10-23 16:19:57 +05:30
Nuwan Chaturanga 78b9cd0156 Merged in improve/musician_filter_api (pull request #39)
Improve/musician filter api

Approved-by: Seth Call
2022-10-20 15:03:49 +00:00
Nuwan 295d613165 reduce number of sql queries in musicians filter
default last active option is set to 30 days
make it 5ms when neo4j returns 0 for audio latency
2022-10-20 17:53:23 +05:30
Nuwan 1080ac4a47 add pg_data directory to gitignore 2022-10-18 22:12:12 +05:30
Nuwan c2f7fe7c32 change to api musician filter to minimize the database queries 2022-10-18 22:11:09 +05:30
Nuwan 5bd67d431c change to api musician filter to minimize the database queries 2022-10-18 22:07:15 +05:30
Nuwan ee54464cfc jam-ui: fix pagination in musician listing 2022-03-18 19:27:48 +05:30
Nuwan 245b39f67d enable test for active_within_days and joined_within_days filter options 2022-02-17 20:17:20 +05:30
Nuwan 3606b4f281 enable joined_within_days and active_within_days to musician filter option 2022-02-17 19:37:23 +05:30
Nuwan 0fcd8bc873 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2022-02-15 12:21:36 +05:30
Nuwan 84e984a549 .gitignore 2022-02-15 12:21:11 +05:30
Nuwan Chaturanga e30aacc91d Merged in jam-ui-search-fixes (pull request #38)
more filter parameters to neo4j

Approved-by: Seth Call
2022-02-10 03:29:44 +00:00
Nuwan 22e207c9cc fix errors related to filter tests 2022-02-09 13:20:37 +05:30
Nuwan bffab7564d enable commented out lines (added for debugging) 2022-02-08 21:06:22 +05:30
Nuwan 3f5cceb031 more filter parameters to neo4j
* pass genres and instrument parameters to neo4j
* remove filtering based on these params using rails and pg data
* pass pagination offset to neo4j
2022-02-08 20:55:00 +05:30
Nuwan a4d8bc70b0 fix js errors when loading jamserver.js 2022-01-18 20:20:45 +05:30
Nuwan 87278e6adb fetch musicians - from_location parameter
when fetching musicians records for the first time if there is no
results been received then fetch again by turning on from_location
filter option
2022-01-13 18:24:01 +05:30
Nuwan 7f4947a590 ui related improvements and fixes 2022-01-11 16:19:39 +05:30
Nuwan c0b9b66b9d disable load more button when data are been loaded 2021-12-24 10:57:48 +05:30
Nuwan d19756b537 reverse filter debug 2021-12-23 16:24:10 +05:30
Nuwan d35778f5e2 fix pagination errors 2021-12-23 15:58:53 +05:30
Nuwan edab0fe9fc fix error in sorting musicians 2021-12-22 18:56:13 +05:30
Nuwan ef823df8eb change header dropdown behaviour 2021-12-21 19:53:34 +05:30
Nuwan 15bd48ce3b sort filtered musicians by latency order from neo4j 2021-12-18 22:34:34 +05:30
Nuwan 505f2d5592 paginate by more button
add "load more" button on bottom of musician listing that renders the records prefetched
2021-12-18 20:11:28 +05:30
Nuwan 961183bd47 minor fix 2021-12-13 20:18:13 +05:30
Nuwan 8d99f362a2 adding missing files 2021-12-13 19:56:45 +05:30
Nuwan 6c179d3220 refactor musican filter
restureture react components so that fiter component is now
a parent to the liast component. This way it is much easy to
have the commiunication between these two components
2021-12-13 19:46:07 +05:30
Nuwan caef794231 fix for latency data not showing. found a problem in react component structrue of JKPeople and JKPeopleSearch 2021-12-11 10:24:05 +05:30
Nuwan 178d4fcb3f remove cypress test artifacts 2021-12-08 23:03:23 +05:30
Nuwan 1717fc1a15 fix null error in JKProfilePerformanceSamples component 2021-12-08 22:59:54 +05:30
Nuwan 9e718cccdc diable musicians sort by score
'scores' as a table is useless & dead. therefore this sort is no longer
valuable
2021-12-07 21:35:19 +05:30
Nuwan 5bbc5999d7 change of logging to bugsnag /search_users 2021-12-07 19:35:32 +05:30
Nuwan 4eb009d76d benchmark neo4j /search_users 2021-12-07 19:21:05 +05:30
Nuwan cb344665cb after login redirect the user to the page he requeted 2021-12-06 19:00:48 +05:30
Victor Barba Martin c6c1e96e85 setup staging variables 2021-12-03 16:25:42 +01:00
Victor Barba 80fb8b2fce bitbucket-pipelines.yml edited online with Bitbucket 2021-12-01 20:22:22 +00:00
Nuwan 7a86300755 change latency values of FAIR category 2021-11-30 19:28:09 +05:30
Nuwan 97b1b03946 checking issue in staging attempt 2 2021-11-24 17:32:18 +05:30
Nuwan a63b5cd61f checking issue in staging 2021-11-24 17:08:45 +05:30
Nuwan 362d0a7ba9 fix error 2021-11-24 16:28:32 +05:30
Nuwan 08a69da490 new pages 2021-11-24 12:39:55 +05:30
Nuwan 480de3e89f fix cypress tests 2021-11-24 10:03:47 +05:30
Nuwan 2110c4b1ce UI changes as per the requests by David 2021-11-24 09:51:28 +05:30
Nuwan e769eb0531 force https in production 2021-11-13 12:05:27 +05:30
Nuwan 4ef2dcdc04 fix issues related to user login and logout 2021-11-11 16:54:00 +05:30
Nuwan 2438e45a1b merge confict fix 2021-11-11 08:02:36 +05:30
Nuwan 2ec02ee436 change user auth to have a login page for the users to sign in to the site 2021-11-11 07:55:17 +05:30
Nuwan 4dcb1c4dd8 add link to footer 2021-11-11 07:55:17 +05:30
Nuwan e88cf16702 setup i18n with locale switcher in header 2021-11-11 07:55:17 +05:30
Seth Call 56b49d4790 Initial Bitbucket Deployments configuration 2021-11-11 02:15:06 +00:00
Nuwan Chaturanga f5def534fe Merged in VRFS-5281-admin_latency_recommendation (pull request #36)
VRFS-5281 admin latency recommendation
2021-11-04 19:49:07 +00:00
Nuwan d4a517ab7c admin page for getting latency recommendation 2021-11-04 19:26:13 +05:30
Nuwan 5cc9868f4d admin page for getting latencies between users 2021-11-02 18:49:29 +05:30
Nuwan 690219e60e wip admin latency api 2021-10-29 15:07:40 +05:30
Nuwan 4f98bb7644 add bitbucket build vars to react env 2021-10-27 16:47:07 +05:30
Nuwan dc7469d400 Merge branch 'show_ci_build_number' into develop 2021-10-27 16:12:26 +05:30
Nuwan 9fe595e523 show ci/cd build meta data in layout 2021-10-27 16:05:51 +05:30
Victor Barba Martin 0f67c4f041 add deploy to staging 2021-10-26 17:10:47 +02:00
Victor Barba Martin 5535a44393 add deploy to staging 2021-10-26 16:48:45 +02:00
Nuwan cf21f61985 add env.staging file 2021-10-26 17:05:31 +05:30
Victor Barba Martin b4a94f596b add deploy to staging 2021-10-26 09:58:39 +02:00
Nuwan 8c5bba305c add link to footer 2021-10-25 01:22:08 +05:30
Nuwan e577d71d5d setup i18n with locale switcher in header 2021-10-25 00:50:23 +05:30
Seth Call 72092edf2b build bump 2021-10-22 14:36:29 -05:00
Nuwan 8e725686f9 add rack-cors gem to Gemfile 2021-10-22 22:32:06 +05:30
Nuwan e36385b41d go to bottom of the chat window on first load 2021-10-22 20:08:08 +05:30
Nuwan f95ed1ac0c refactor code related to send friend request functionality 2021-10-22 14:13:30 +05:30
Victor Barba 4d4cbde465 bitbucket-pipelines.yml edited online with Bitbucket 2021-10-21 18:38:16 +00:00
Seth Call 6c35c02bdf Merged in VRFS-5232-new_react_frontend (pull request #34)
New UI mvp1
2021-10-21 16:36:59 +00:00
Nuwan 20faef891c Merge branch 'VRFS-5232-new_react_frontend' of bitbucket.org:jamkazam/jam-cloud into VRFS-5232-new_react_frontend 2021-10-21 21:51:25 +05:30
Nuwan d9e91d2a2f fixes in redux stores. also dismiss warnning messages raised when building 2021-10-21 21:45:19 +05:30
Victor Barba Martin b2beb8db74 add pipeline for ui deploy 2021-10-19 22:21:05 +02:00
Victor Barba Martin 9721833ab8 add pipeline for ui deploy 2021-10-19 22:16:35 +02:00
Victor Barba Martin e26b713943 Merge branch 'VRFS-5232-new_react_frontend' of https://bitbucket.org/jamkazam/jam-cloud into VRFS-5232-new_react_frontend 2021-10-19 22:12:07 +02:00
Victor Barba Martin 35726ec8d5 add pipeline for ui deploy 2021-10-19 21:42:38 +02:00
Nuwan 053bc5f78a Merge branch 'VRFS-5232-new_react_frontend' of bitbucket.org:jamkazam/jam-cloud into VRFS-5232-new_react_frontend 2021-10-19 22:08:46 +05:30
Victor Barba Martin 0a85d4a1f5 add pipeline for ui deploy 2021-10-19 18:15:39 +02:00
Nuwan 1faf1ab722 add test for search filter 2021-10-19 19:19:44 +05:30
Victor Barba Martin a9a42ae62a add pipeline for ui deploy 2021-10-19 15:07:07 +02:00
Victor Barba Martin 05651ca74c add pipeline for ui deploy 2021-10-19 15:06:04 +02:00
Nuwan 8350d8793a remove unwanted ui elements 2021-10-18 18:55:54 +05:30
Nuwan b8e058396e signout functionality 2021-10-18 17:55:31 +05:30
Nuwan 97f26e5e13 setup playwright e2e tests 2021-10-15 17:36:58 +05:30
Nuwan Chathuranga 918788f643 auth e2e test 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 697ac3e74d add notifications page 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 803e9d4014 add infinite scroll to people list 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 2f4107ce68 rename conflict files 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 8e1e281d21 ability to reply for text message notifications 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga b2fe71e482 show notifications in header as a drawer dropdown 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 6dae6ba53c write README for setting up app in dev 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 791f536c8b use redux for people state
reate redux store to manage state related to
fetching musicians and showing them on friends page
2021-10-13 22:51:30 +05:30
Nuwan Chathuranga cb35148876 fix responsive issues in people list page 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 6e4432feb1 remove only guard in friends-list.spec 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 0af1efe8b2 add integration test cases for chat messages 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 89b3273125 showing incoming text mesages in chat window 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 7c60153c21 adding redux toolkit for state management 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 4c69f76e42 import jk js scripts in to reactjs app for interacting with websocket messages 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 13175f64f1 integrating websocket api
reduce javascripts in application.js bundle and
other related scripts/markup in templates of
legacy app and keep what is nedded for intracting
with websocket api. The stripped version of the javascript
endpoint /client_scripts can be referenced by the react app.
2021-10-13 22:51:30 +05:30
Nuwan Chathuranga b67af9d847 nav and latenvy changes
includes ui improvements to nagigation, showing latency details
of user and other ui related improments
2021-10-13 22:51:30 +05:30
Nuwan Chathuranga 6c88cd1215 wip - react components related to musician listing and filtering 2021-10-13 22:51:30 +05:30
Nuwan Chathuranga eb4c327eff wip new react ui 2021-10-13 22:51:29 +05:30
Nuwan Chathuranga 4ee649c7f1 added updated files 2021-10-13 22:51:29 +05:30
Nuwan Chathuranga 35a9c945db rename "jam-ui" directory to "ui" 2021-10-13 22:51:28 +05:30
Nuwan Chathuranga fa8cd2fa7c Initial changes to falcon package
* include changes to the templates to match new ui design.
* musician listing and filtering (initial phase)
* showing current logged in user in header
2021-10-13 22:51:27 +05:30
Nuwan Chathuranga ea4fc496a1 initial falcon react package 2021-10-13 22:51:27 +05:30
Nuwan Chathuranga bab8d14798 wip - filter musician records 2021-10-13 22:51:27 +05:30
Nuwan Chathuranga f57218f429 enable CORS on web - allowing to connect by client app 2021-10-13 22:51:27 +05:30
Seth Call ec8a481b42 Secret room token 2021-09-29 09:44:09 -05:00
Seth Call b9941da0a5 fix options 2021-09-21 15:36:41 -05:00
Seth Call ea8baaaa82 push 2021-09-21 15:18:52 -05:00
Seth Call dbe1cc9644 update to N/A 2021-08-30 16:00:25 -05:00
Seth Call a1ab88f641 Add session video beta button 2021-08-24 08:54:16 -05:00
Seth Call 24b4a80853 Fix latency + scheduled sessions 2021-08-18 13:30:42 -05:00
Seth Call b160b4fffb Fix scheduled 2021-08-18 07:46:04 -05:00
Nuwan Chaturanga 4b8861b9c5 Merged in VRFS-5251-admin_user_latency_info (pull request #32)
show user latency json data in admin

Approved-by: Seth Call
2021-06-24 13:02:30 +00:00
Nuwan Chaturanga 091117bfe3 Merged in VRFS-5196_find_sessions_screen_latency_info (pull request #33)
VRFS-5196 find sessions screen latency info

Approved-by: Seth Call
2021-06-24 13:01:40 +00:00
Nuwan Chathuranga 5da62ebd40 change latency badge text
show HIGH instead of POOR and UNACCEPTABLE
2021-06-23 14:54:56 +05:30
Nuwan Chathuranga 6fd1c2ce3b show user latency json data in admin 2021-06-23 12:51:44 +05:30
Nuwan Chathuranga d8fa7efdae show latency badge in find session screen 2021-06-19 22:17:28 +05:30
Nuwan 6483c40f82 latency badge showing in find sessions screen wip 2021-06-19 22:17:28 +05:30
Nuwan Chathuranga 18c735b098 WIP latency badge in find sessions 2021-06-19 22:17:28 +05:30
Nuwan Chathuranga 98898dd60e wip 2021-06-19 22:17:27 +05:30
Nuwan Chathuranga 85d5044622 wip find session latency 2021-06-19 22:17:27 +05:30
Nuwan Chathuranga 20376500b5 wip - find sessions latency badge 2021-06-19 22:17:27 +05:30
Nuwan Chathuranga 65cfa7c0fc wip 2021-06-19 22:17:27 +05:30
Nuwan Chathuranga 8ab287ed73 wip find session latency 2021-06-19 22:17:27 +05:30
Nuwan Chathuranga 4b1fb8b1ed wip - find sessions latency badge 2021-06-19 22:17:27 +05:30
Nuwan Chaturanga fc624115b5 Merged in VRFS-5222-asset_upload_api (pull request #29)
VRFS-5222 asset upload api

* migration file

* asset upload api wip

* /api/user_assets

this api endpoint is used to upload and query user_assets.
for uploads send following parameters..
- asset_type
- filename
- recording_id (optional)
- session_id (optional)
- ext_id (optional)
the api provides json response with signed url to aws s3

the same api endpoint is used to query uploaded user assets.
Following query parameters are supported.
- id
- ext_id
- recording_id + asset_type
- session_id + asset_type

* delete unused asset_uploader

* for user_asset uploads use aws_bucket

* db migration to add index on user_id of user_assets table

Approved-by: Seth Call
2021-06-17 02:20:55 +00:00
Seth Call 06e0852ee5 Merged in VRFS-5181_latency_in_musician_hover_bubble (pull request #31)
Hover fixes
2021-06-16 20:57:04 +00:00
Nuwan Chathuranga fb1d18ce6b fix error showing latency badge
this fixes the issue of not showing the correct
latency badge on when hover over more than one user
2021-06-17 00:47:53 +05:30
Nuwan Chathuranga 724b76709a Merge branch 'VRFS-5181_latency_in_musician_hover_bubble' of bitbucket.org:jamkazam/jam-cloud into VRFS-5181_latency_in_musician_hover_bubble 2021-06-17 00:18:50 +05:30
Nuwan 714853dc68 merge fix 2021-06-17 00:13:52 +05:30
Nuwan b15a62cd4e wip musiian latency badge fix 2021-06-17 00:08:57 +05:30
Nuwan ebc9c2692c musiian latency badge error fixing 2021-06-17 00:08:57 +05:30
Nuwan Chathuranga 280b8bc4ae discard decimal palces in latency values in musician hover bubble 2021-06-17 00:08:57 +05:30
Nuwan Chathuranga 1906e9a110 Merge branch 'VRFS-5181_latency_in_musician_hover_bubble' of bitbucket.org:jamkazam/jam-cloud into VRFS-5181_latency_in_musician_hover_bubble 2021-06-16 22:45:25 +05:30
Nuwan 7627b39925 musiian latency badge error fixing 2021-06-16 22:30:54 +05:30
Nuwan Chathuranga 4b21aa68e0 discard decimal palces in latency values in musician hover bubble 2021-06-15 23:49:04 +05:30
Seth Call 29e23548f0 revert 2021-06-15 11:15:58 -05:00
Seth Call de6e20c21c forec no email 2021-06-15 11:10:58 -05:00
Nuwan Chathuranga 1d0e33fdc1 discard decimal palces in latency values in musician hover bubble 2021-06-15 17:26:10 +05:30
Nuwan Chaturanga a0b7581c80 Merged in VRFS-5181_latency_in_musician_hover_bubble (pull request #30)
VRFS-5181 latency in musician hover bubble

Approved-by: Seth Call
2021-06-11 14:56:43 +00:00
Nuwan Chathuranga a3a34d4afe show latency scores alone with latency badge
in musician hover bubble show internet and audio latency
scores next to latency badge
2021-06-09 23:28:59 +05:30
Nuwan e7d89ecf30 fix for latency badge not showing
This fixes latency badge only working on one musician hover bubble.
2021-06-08 20:09:55 +05:30
Seth Call 1c71ead045 bring back fpm for now 2021-06-04 14:20:35 -05:00
Nuwan Chaturanga 4a296825e3 Merged in VRFS-5181_latency_in_musician_hover_bubble (pull request #28)
VRFS-5181 show latency score badge on musician hover

Approved-by: Seth Call
2021-06-03 18:53:02 +00:00
Nuwan Chathuranga 87a01bcd66 remove "unknown" parameters in get_latencies api call to latency server 2021-06-04 00:21:30 +05:30
Nuwan Chathuranga 047ae3ebb2 specify latency server url correctly 2021-06-04 00:16:07 +05:30
Nuwan 1ee14dd01a fix small spelling mistake 2021-06-01 21:39:09 +05:30
Nuwan c7547405f8 Musician hover latency badge
show latency score badge on hover over musician.
fetches data from new resolve latency data API
2021-06-01 20:15:13 +05:30
Nuwan 11d8af22bb fixes to musicion hover latency badge spec 2021-05-30 22:10:34 +05:30
Nuwan 4f9ffa6a80 testing hover latency badge 2021-05-30 07:14:54 +05:30
Nuwan Chathuranga 683e93e75e testing latency badge 2021-05-29 18:43:48 +05:30
Nuwan 307444431a wip sepcs for musician latency badge 2021-05-29 14:38:34 +05:30
Nuwan Chathuranga 10908623a4 wip musician latency badge 2021-05-27 15:58:34 +05:30
Nuwan 5144309ff4 show latency badge
on musician hover bubble show latency score badge by querying
resolve latency api
2021-05-27 04:59:34 +05:30
Nuwan Chathuranga bcbd36a221 showing latency badge wip 2021-05-26 00:54:53 +05:30
Nuwan Chaturanga 18a0681f9f Merged in modern_os_gemfile_amendment_1 (pull request #27)
Modern os gemfile amendment 1

Approved-by: Seth Call
2021-05-24 12:34:18 +00:00
Nuwan Chathuranga 8f09bdce5b musician latency badge wip 2021-05-23 18:27:53 +05:30
Nuwan Chathuranga a027a75b1d for modern O/S setup use Gemfile.alt instead of default Gemfile
configure bundler to use Gemfile.alt when bundling gems specifically
in newer OSs like apple m1. for thiw one can use BUNDLER_GEMFILE env variable
or add gemfile config entry to ./bundle/config
2021-05-22 15:24:00 +05:30
Nuwan Chathuranga eb6750d92d Gemfile changes for moden computers
use MODEN_OS env variable to selectively install
a version of pg gem that runs under newer O/S (ex: apple M1 Big sur)
2021-05-22 15:24:00 +05:30
Nuwan Chaturanga 04d42c1ad8 Merged in VRFS-5180_neo4j_serverless_setup-a1 (pull request #25)
fix default install path
2021-05-21 20:29:02 +00:00
Nuwan 34f8413861 fix default install path 2021-05-20 07:05:38 +05:30
Seth Call 128e9c6bb4 hotfix for bad installer 2021-05-18 17:42:18 -05:00
Nuwan Chaturanga fa9a976895 Merged in VRFS-5180_neo4j_serverless_setup (pull request #24)
handler to install serverless framework and neo4j to facilitate serveing latency data requests

Approved-by: Seth Call
2021-05-13 13:43:04 +00:00
Nuwan 06ec910cfe handler to install serverless framework and neo4j to facilitate serveing latency data requests 2021-05-13 15:39:24 +05:30
Nuwan Chaturanga 96f40aed76 Merged in VRFS-5179_resolve_latency_rest_api (pull request #23)
add api endpoint to fetch latency data

Approved-by: Seth Call
2021-05-12 14:53:48 +00:00
Nuwan 34bf811453 add response.body to bugsnag call of failed latency requests 2021-05-12 20:03:28 +05:30
Nuwan 2567292580 change bugsnag severity for failed latency requests 2021-05-12 19:56:21 +05:30
Nuwan 9dac3fdb56 on error in get_latencies send details to bugsnag 2021-05-12 19:51:29 +05:30
Nuwan 93b848c2d8 remove unused code bits 2021-05-12 19:09:21 +05:30
Nuwan 2421a4bc03 add api endpoint to fetch latency data
this api method fetches latency data for the current user from the
latency graph database service
2021-05-12 16:07:23 +05:30
Seth Call 65125e04ca Fix for ARS subscription 2021-04-29 14:13:32 -05:00
Seth Call 6862bb0f65 force ars_id even when new ARS 2021-04-27 15:07:56 -05:00
Seth Call 1f913071bc emit something even if no referred 2021-04-27 14:19:34 -05:00
Seth Call e2a60eda07 emit something even if no referred 2021-04-27 14:19:13 -05:00
Nuwan Chaturanga a89bc7f5d2 Merged in VRFS-5123_video_button_remember_token_fix (pull request #22)
skip api_signed_in_user for auth in api_music_sessions_controller

Approved-by: Seth Call
2021-04-27 18:28:39 +00:00
Nuwan f1f64aedb1 skip api_signed_in_user for auth in api_music_sessions_controller 2021-04-27 23:52:31 +05:30
Seth Call 849169e3c7 Remove duplicate definitions in select for ad campaign 2021-04-27 12:44:15 -05:00
Seth Call bf83538a2d Add RAILS_RELATIVE_URL_ROOT 2021-04-27 12:37:33 -05:00
Nuwan Chaturanga 9f924fee3c Merged in VRFS-5166-ad_campaigns_report_fixes_3 (pull request #21)
ad_campaigns.rb fixes

Approved-by: Seth Call
2021-04-27 16:57:18 +00:00
Nuwan eb3064f8aa ad_campaigns.rb fixes 2021-04-27 22:21:34 +05:30
Nuwan Chaturanga f9e3e644f1 Merged in VRFS-5147-user_view_edit_improvements (pull request #17)
changes to user show and edit pages ref: VRFS-5147

* changes to user show and edit pages ref: VRFS-5147

Approved-by: Seth Call
2021-04-26 12:19:08 +00:00
Nuwan Chaturanga 316cbdab83 Merged in VRFS-5146-school_user_form (pull request #16)
new admin form to quickly add school user

* new admin form to quickly add school user

* add required: true to all form fields in quick add school user
2021-04-23 17:10:01 +00:00
Nuwan Chaturanga 3a248df971 Merged in VRFS-5144-deleted_user_improvements (pull request #15)
exclude deleted users from search

Approved-by: Seth Call
2021-04-22 21:55:17 +00:00
Nuwan 37c5cab83f exclude deleted users from search
exclude deleted musicians and fans from search results
2021-04-22 17:14:35 +05:30
Nuwan Chaturanga c2fe4ffb98 Merged in VRFS-5128_report_for_ad_campaigns (pull request #14)
VRFS-5128 report for ad campaigns

* Ad campaign report

add new admin report for monitor and analyze the results
from a variety of paid campaigns

* reload report after updating values using best_in_place

* add users first_subscribed_plan_code

use this new column in ad campaigns report to filter by
subscription plan

* set first_subscribed_plan_code in recurly subscription creation

* set correct value for first_subscribed_plan_code
2021-04-21 21:27:55 +00:00
Nuwan Chaturanga 253d82a32c Merged in VRFS-5099_clean_up_dump_paths (pull request #12)
VRFS-5099 clean up dump paths

Approved-by: Seth Call
2021-04-16 21:24:10 +00:00
Nuwan 098e828d0f refactor crash_dump 2021-04-16 05:16:22 +05:30
Nuwan Chaturanga da8133bd8f Merged in VRFS-5123_change_video_button_url (pull request #13)
change video_btn url generation

Approved-by: Seth Call
2021-04-15 10:51:50 +00:00
Nuwan e3fb76cb54 change video_btn url generation
directly call the video conferencing server url API
and bind that value to the button click handler
2021-04-15 14:02:18 +05:30
Nuwan ba9a91eb1f crash_dump fix test error in content_type 2021-04-13 01:19:03 +05:30
Seth Call 714dab3e8d default conf host 2021-04-12 13:51:32 -05:00
Nuwan eae35db92d refactor crash_dump in users api 2021-04-13 00:20:46 +05:30
Seth Call 95483b759f fix bundler 2021-04-11 14:01:49 -05:00
Nuwan Chaturanga dccd971d2e Merged in VRFS-5004-revamp_notification (pull request #11)
VRFS-5004 revamp notification
2021-04-11 18:50:51 +00:00
Seth Call 940470dbc3 done 2021-04-11 13:33:59 -05:00
Nuwan Chaturanga f42fc31c03 Merged in VRFS-5005-open_video_conf_page (pull request #10)
VRFS-5005 open video conf page

Approved-by: Seth Call
2021-04-11 16:44:01 +00:00
Nuwan b574b5e0c6 Support optional video server 2021-04-11 11:42:01 -05:00
Seth Call 43aae66fb2 add in wp changes 2021-04-10 20:49:49 -05:00
Nuwan 9711a9a666 change to notification toast and sidebar
* show 3 notification toasts instead of one
* open notification tray automatically for for priority notifications
2021-04-10 08:15:51 +05:30
Seth Call c6d1e0b466 add exception 2021-04-03 09:40:41 -05:00
Seth Call 2000dc0663 more debugging 2021-04-02 17:05:48 -05:00
Seth Call 09233022ac debug print 2021-04-02 13:26:01 -05:00
Seth Call 2b229f0409 still confused 2021-04-02 11:55:05 -05:00
Seth Call 4d797c48a1 remoove ver qualifier 2021-04-02 11:23:03 -05:00
Seth Call 421e335315 check 2021-04-01 23:15:10 -05:00
Nuwan 4db1c3b686 for testing enable video capability of the client 2021-03-29 14:44:02 +05:30
Seth Call 6f27f40962 Fix the notification highlighter tests 2021-03-28 23:29:42 -05:00
Seth Call cf4f5c89e0 session_video_spec 2021-03-28 17:34:32 -05:00
Seth Call dcbf52a88b ignore extra args when test env 2021-03-24 20:18:18 -05:00
Seth Call 1f862baccf make tests go a little faster 2021-03-24 20:12:38 -05:00
Nuwan f6074d75d8 more fixes to spec 2021-03-24 19:23:33 +05:30
Nuwan 5db2cdeca4 fixing test driver related errors in notification_highlighter_spec 2021-03-24 18:47:16 +05:30
Seth Call 49ab06180d skip_repatcha pass through to method 2021-03-19 15:27:51 -05:00
Seth Call bb0de9570d skip recaptcha 2021-03-19 11:57:52 -05:00
Nuwan Chaturanga b1484f0a71 Merged in VRFS-5011-fix_landing_signup_error (pull request #9)
VRFS-5011 fix landing signup error

Approved-by: Seth Call
2021-03-19 15:29:18 +00:00
Nuwan 69d4a01298 Update landing page to match spec 2021-03-19 10:22:31 -05:00
Seth Call fc7a685423 Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop 2021-03-17 20:51:38 -05:00
Seth Call 7a5c731b25 Fix bug with affiliate links and also move paypal.me text 2021-03-17 20:51:32 -05:00
Nuwan Chaturanga b9b62f1661 Merged in VRFS-5012_fix_nil_error_in_admin_affiliate_cohorts (pull request #8)
fix error cause by nil partner_user in admin affiliate_cohorts

Approved-by: Seth Call
2021-03-17 22:18:03 +00:00
Nuwan c5e7b37420 fix error cause by nil partner_user in admin affiliate_cohorts 2021-03-17 15:05:33 +05:30
Seth Call 8b94c17d0e Remove bugsnag hit 2021-03-16 15:23:56 -05:00
Seth Call 86a7994d02 don't count refunds 2021-03-16 13:34:50 -05:00
Seth Call 30a3fce222 fix affiliate rate cut 2021-03-16 10:09:55 -05:00
Nuwan Chaturanga d8f7582790 Merged in VRFS-4993_signup_and_download_page_changes (pull request #6)
VRFS-4993 signup and download page changes

Approved-by: Seth Call
2021-03-16 14:00:51 +00:00
Seth Call ad7a02746b advance time better 2021-03-16 08:35:47 -05:00
Nuwan c00d75b032 fixing merge conflicts 2021-03-16 18:40:46 +05:30
Nuwan 6e51f57bff new landing pages for signup and download pages 2021-03-16 17:10:58 +05:30
Nuwan c2a3cd3cc1 remove musician radio buttons in signup form 2021-03-16 17:10:58 +05:30
Nuwan 29a4491a38 add download_spec to bin/test 2021-03-16 17:10:58 +05:30
Nuwan 9ab8cb276c change layout/template of signup and downloads
change to new layout for user signup and download pages.
2021-03-16 17:10:58 +05:30
Seth Call 9a0c70517b add rake_util 2021-03-15 08:59:46 -05:00
Nuwan c99d8e2dd3 remove musician radio buttons in signup form 2021-03-15 11:50:17 +05:30
Seth Call 4dbf9fa17c Bug fixes for affiliate syncing 2021-03-14 16:23:43 -05:00
Seth Call f58be87187 turn crash emails off by default 2021-03-14 09:29:29 -05:00
Seth Call 0aac1329e2 Add wordpress plugin and fix one link 2021-03-13 17:40:31 -06:00
Nuwan 8f7f7b4b68 add download_spec to bin/test 2021-03-13 12:03:32 +05:30
Nuwan 9315a3f01a change layout/template of signup and downloads
change to new layout for user signup and download pages.
2021-03-13 11:46:20 +05:30
Seth Call deadc2fd68 Update test xml and mocks to match real API 2021-03-11 20:26:15 -06:00
Nuwan Chaturanga 95dea2c6f3 Merged in change_to_affiliate_program (pull request #5)
Update affiliate program to 2021 spec.

Includes modifications to showing affiliate signups and earnings in client and affiliate cohorts in admin
2021-03-12 01:37:55 +00:00
Seth Call cf47777115 Update Affliate Code and Reports to 2021 spec
Add support to account for subscriptions
Change rate to 30%.  JamTracks 25cents
Reports updated for end users and admin
2021-03-11 19:36:14 -06:00
Seth Call c07e799fdb turn off personal feed again 2021-02-22 09:04:02 -06:00
Seth Call 201bc94947 build bump 2021-02-22 08:29:39 -06:00
Seth Call cecd09b726 Merge in develop 2021-02-21 15:09:10 -06:00
Seth Call 03fab14ef3 Add more test cases and logic changes 2021-02-21 15:07:31 -06:00
Seth Call ad2f29fe01 add executable 2021-02-14 12:10:55 -06:00
Seth Call 13b230a247 run working tests with bin/test 2021-02-14 12:10:46 -06:00
Seth Call 2058631c50 Merged VRFS-4950-add_rails_db_migrations into develop 2021-02-13 20:39:50 -06:00
Nuwan 48dfb68f89 change database migrations to be natural rails db migrations. 2021-02-13 20:17:18 -06:00
Seth Call d52755876f remove extra bullet 2021-02-13 15:26:18 -06:00
Seth Call 6f39421c74 new welcome email 2021-02-13 15:04:28 -06:00
Nuwan e8d74a119c fix session overlapped duration with other users
change calculation of MusicSessionUserHistory.duration_minutes to
exactly get the number of minutes overlapped with other user sessions.

previously it returned the entire music session time if a other user
joined in and left without staying compleyely within the session.

this commit also fixs an edge case of the query in
MusicSessionUserHistory.overlapping_connections
2021-02-11 20:17:36 +05:30
Seth Call 1e00b9b44e force false because only used by client path 2021-02-09 10:49:12 -06:00
Seth Call 6d14054310 http for natve client 2021-02-09 09:19:48 -06:00
Seth Call 7f6198299a use HTTP to sign 2021-02-08 22:58:53 -06:00
Seth Call 005e54f80b Add back in correct true check for email 2021-02-08 11:38:57 -06:00
Seth Call dc7c7a0c33 Slightly bigger 2021-02-08 10:52:01 -06:00
Seth Call 7d56d644ba fix hover 2021-02-07 22:08:51 -06:00
Seth Call e1d0fe2760 Fix notify bug; bette crash dump subject 2021-02-03 10:57:44 -06:00
Seth Call 877ea031d1 Pin sass/sass-rails 2021-02-02 08:29:30 -06:00
Seth Call a452b2216c monthly cohorts 2021-02-01 23:20:11 -06:00
Seth Call 6bd6958df1 Always close rating dialog on submit 2021-02-01 18:59:47 -06:00
Seth Call f98f34d5fe Pin more gems, fix CSS bugs, and fix many tests 2021-02-01 17:24:08 -06:00
Seth Call 36c25b7b49 fix websocket-gateway 2021-02-01 01:53:22 -06:00
Seth Call 839081f076 pinning more gems 2021-02-01 01:48:19 -06:00
Seth Call 1c2e96b359 more pinning 2021-02-01 01:42:02 -06:00
Seth Call a520def1c5 older bundler 2021-02-01 01:40:01 -06:00
Seth Call aa9abd6019 Updating Gemfile/locks for 2.4.1 2021-02-01 00:10:01 -06:00
Seth Call e97b19564c more changes 2021-01-31 21:25:09 -06:00
Seth Call e01d623e28 Send email control, and db gemfile 2021-01-31 14:14:29 -06:00
Seth Call a329167f05 shorten 2021-01-31 12:57:47 -06:00
Seth Call ef9f2d3441 generalize descirption for crash upload 2021-01-31 10:06:41 -06:00
Seth Call f43d6728f8 Add Nuwan to dev_users bootstrap 2021-01-31 09:29:01 -06:00
Seth Call d156d7f606 Allow longer signing and fix importer 2021-01-31 09:27:37 -06:00
Seth Call 823720f217 make websocket-gateway happy 2021-01-18 17:16:14 -06:00
Seth Call 416f615768 name 2021-01-18 10:55:52 -06:00
Seth Call 209cb891c7 crash dump tweaok 2021-01-17 12:16:09 -06:00
Seth Call ebf8e39b5c bump 2021-01-17 08:12:11 -06:00
Seth Call 1262b9fd60 ARS vs P2P, subscription fixes, no block on max time 2021-01-16 19:37:34 -06:00
Seth Call ba22761222 bump 2021-01-13 08:19:51 -06:00
Seth Call ad1e784adb update existing users 2021-01-11 17:51:06 -06:00
Seth Call 1eaaf8d4bf try new sync 2021-01-11 12:15:15 -06:00
Seth Call ee1dc427ce build 2021-01-10 23:44:49 -06:00
Seth Call 3e953b1b4c music session ratingsl 2021-01-09 16:15:56 -06:00
Seth Call 270f28be9e check if builds 2021-01-09 13:25:39 -06:00
Seth Call 67e7e8e8ed revert back again 2021-01-07 22:39:09 -06:00
Seth Call a9f1a2a422 fix typos 2021-01-06 09:14:30 -06:00
Seth Call a6f798c99a force student 2021-01-05 23:59:10 -06:00
Seth Call a0c08cf601 fix change plan to silver 2021-01-05 23:46:26 -06:00
Seth Call 88892c7e9f use plan code not derised code 2021-01-05 23:38:12 -06:00
Seth Call 900ca24c40 change asio defaults 2021-01-05 22:40:54 -06:00
Seth Call 38213a68fd try 2021-01-05 21:45:35 -06:00
Seth Call 3bc73afb88 stonk 2021-01-05 09:22:45 -06:00
Seth Call 0841409e50 let trials in 2021-01-05 08:55:37 -06:00
Seth Call 185d3e0b16 protect against uclient 2021-01-04 23:41:49 -06:00
Seth Call 9dff16d26f apply 2021-01-04 18:38:15 -06:00
Seth Call fa38b05cb9 fixes 2021-01-04 07:40:49 -06:00
Seth Call 339d63f374 try with bug snag 2021-01-01 15:33:34 -06:00
Seth Call 57c3217768 remove trial buffer 2021-01-01 12:42:05 -06:00
Seth Call 0fe8ac3330 use desired plan code while in trial 2021-01-01 10:32:13 -06:00
Seth Call 7ac66f9f0f ebui 2021-01-01 10:03:48 -06:00
Seth Call 95a4eb4ec8 better help desk check 2021-01-01 10:00:38 -06:00
Seth Call a09e33a083 push 2021-01-01 09:02:49 -06:00
Seth Call 8b3cb159ae clean up 2020-12-30 16:27:35 -06:00
Seth Call 4de066e505 done 2020-12-29 19:02:08 -06:00
Seth Call 48fc8152a4 indexes 2020-12-28 22:21:18 -06:00
1981 changed files with 227221 additions and 45029 deletions

23
.gitea/workflows/ci.yaml Normal file
View File

@ -0,0 +1,23 @@
name: CI Pipeline
on: [push]
jobs:
build:
name: Build and Publish Admin
runs-on: ubuntu-latest
container:
image: daggerdev/dagger:latest
steps:
- name: Checkout
run: |
# Native checkout without node.js
git clone http://gitea.jam-cloud-infra.svc.cluster.local/seth/jam-cloud.git .
git checkout ${{ gitea.sha }}
- name: Login to Gitea Registry
run: echo "${{ gitea.token }}" | docker login git.staging.jamkazam.com -u ${{ gitea.actor }} --password-stdin
- name: Build and Publish Admin
working-directory: ./admin
run: |
dagger call build-local --source=. --repo-root=../ publish --address=git.staging.jamkazam.com/seth/jam-cloud-admin:latest

View File

@ -0,0 +1,41 @@
name: Environment Orchestrator
on: [push]
jobs:
orchestrate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Component Deployment Gatekeeper
run: |
# JAM_CLUSTER_ENV should be set to 'staging' or 'production' in the Gitea Runner
ENV="${JAM_CLUSTER_ENV:-staging}"
echo "🌐 Cluster Environment: $ENV"
# 1. Extract modes for this environment
ADMIN_MODE=$(jq -r ".environments.$ENV.admin" .jk-deploy.json)
WEB_MODE=$(jq -r ".environments.$ENV.web" .jk-deploy.json)
WS_MODE=$(jq -r ".environments.$ENV.[\"websocket-gateway\"]" .jk-deploy.json)
# 2. Conditional Execution
if [ "$ADMIN_MODE" == "short-circuit" ]; then
echo "⚡ ADMIN: Short-circuit detected. Deploying immediately..."
cd admin && dagger call ship --source=.
else
echo "⏸️ ADMIN: Mode is $ADMIN_MODE. Skipping short-circuit deploy."
fi
if [ "$WEB_MODE" == "short-circuit" ]; then
echo "⚡ WEB: Short-circuit detected. Deploying immediately..."
cd web && dagger call ship --source=.
else
echo "⏸️ WEB: Mode is $WEB_MODE. Skipping short-circuit deploy."
fi
if [ "$WS_MODE" == "short-circuit" ]; then
echo "⚡ WS-GATEWAY: Short-circuit detected. Deploying immediately..."
cd websocket-gateway && just ship
else
echo "⏸️ WS-GATEWAY: Mode is $WS_MODE. Skipping short-circuit deploy."
fi

View File

@ -0,0 +1,8 @@
name: Test Runner
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo "Runner is working!"

4
.gitignore vendored
View File

@ -8,3 +8,7 @@ HTML
coverage
dump.rdb
working.png
ruby/.rails5-gems
web/.rails5-gems
websocket-gateway/.rails5-gems
.pg_data/

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.4.1

3
admin/.gitignore vendored
View File

@ -21,3 +21,6 @@ artifacts
.idea
BUILD_NUMBER
# Gemfile.lock
Gemfile.alt.lock
.byebug_history
.ruby-version

File diff suppressed because one or more lines are too long

1
admin/.ruby-version Normal file
View File

@ -0,0 +1 @@
2.4.1

View File

@ -1,29 +1,55 @@
source 'http://rubygems.org'
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
ruby_version = ENV["JAM_RUBY_VERSION"]
ruby_version = "2.3.1" if ruby_version.nil?
ruby ruby_version
devenv = ENV["BUILD_NUMBER"].nil?
if devenv
gem 'jam_db', :path=> "../db/target/ruby_package"
#gem 'jam_db', :path=> "../db/target/ruby_package"
gem 'jampb', :path => "../pb/target/ruby/jampb"
gem 'jam_ruby', :path => "../ruby"
else
gem 'jam_db', "0.1.#{ENV["BUILD_NUMBER"]}"
gem 'jampb', "0.1.#{ENV["BUILD_NUMBER"]}"
gem 'jam_ruby', "0.1.#{ENV["BUILD_NUMBER"]}"
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/' do
#gem 'jam_db', "0.1.#{ENV["BUILD_NUMBER"]}"
gem 'jampb', "0.1.#{ENV["BUILD_NUMBER"]}"
gem 'jam_ruby', "0.1.#{ENV["BUILD_NUMBER"]}"
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
end
end
gem 'activeadmin_addons'
gem 'json', '1.8.6'
gem 'rails', '> 4.2'
gem 'rails', '= 4.2.8'
gem 'protected_attributes'
gem 'rails-observers'
gem 'bootstrap-sass', '2.0.4'
gem 'bcrypt-ruby', '3.0.1'
gem 'sass-rails' #, '~> 3.2.3'
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
# This should be the same in ruby/admin/web/websocket-gateway
#######
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
gem 'rubyzip', '1.2.1' # pinned until we are on ruby 2.5; then remove
gem 'recurly', '2.18.16' # should upgrade to 3.x when we have time to validaate
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
gem 'redis', '3.3.3' # pinned until we are on 2.5; then remove
gem 'redis-namespace', '1.5.3' # pinned until we are on 2.5; then remove
gem 'oj', '3.1.3' # pinned until we are on 2.5; then remove
gem 'bcrypt', '3.1.15'
gem 'sass-rails', '5.0.7' # compiler mismatch issue between build and www
gem 'sass', '3.5.5 '# compiler mismatch issue between build and www
#######
gem 'bootstrap-sass', '2.0.4'
gem 'coffee-rails' #, '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
@ -32,6 +58,7 @@ gem 'coffee-rails' #, '~> 3.2.1'
gem 'kickbox'
gem 'uglifier' #, '>= 1.0.3'
gem 'net-ssh'
gem 'sprockets-rails', '2.3.2'
# this version is pinned due to this: https://github.com/gregbell/active_admin/issues/1939
gem 'coffee-script-source' #, '~> 1.4.0' # ADD THIS LINE, 1.5.0 doesn't compile ActiveAdmin JavaScript files
@ -45,15 +72,17 @@ gem 'jquery-ui-rails'# , '5.0.5' #, '4.2.1'
gem 'jquery-rails'# , '4.1.1' # both this and jquery-ui-rails are pinned; if you unpin, jquery/autocomplete is missing during precomplie
gem 'rails-jquery-autocomplete' # This is the maintained version of rails3-jquery-autocomplete
gem 'activeadmin' #, '1.0.0.pre4'# github: 'activeadmin', branch: 'master'
gem 'activeadmin-searchable_select'
gem 'mime-types', '1.25'
#gem 'meta_search'
gem 'fog', "~> 1.32.0"
gem 'fog'
gem 'xmlrpc'
gem 'unf', '0.1.3' #optional fog dependency
gem 'country-select'
gem 'aasm' #, '3.0.16'
gem 'postgres-copy', '0.6.0'
gem 'aws-sdk', '~> 1'
gem 'bugsnag'
gem 'bugsnag', '5.3.2'
gem 'gon'
gem 'cocoon'
gem 'haml-rails'
@ -64,7 +93,13 @@ gem 'resque-lonely_job', '~> 1.0.0'
gem 'eventmachine', '1.2.3'
gem 'amqp', '0.9.8'
#gem 'logging-rails', :require => 'logging/rails'
gem 'pg_migrate', '0.1.14'
#gem 'pg_migrate', '0.1.14'
if ENV["MODERN_OS"] == "1"
gem 'pg', '0.21.0'
else
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw]
end
gem 'ruby-protocol-buffers', '1.2.2'
gem 'sendgrid', '1.2.0'
gem 'geokit-rails'
@ -72,20 +107,20 @@ gem 'postgres_ext' #, '1.0.0'
gem 'resque_mailer'
gem 'rest-client'
gem 'iso-639'
gem 'rubyzip'
gem 'sanitize'
gem 'slim'
#gem 'influxdb', '0.1.8'
#gem 'influxdb-rails', '0.1.10'
gem 'influxdb-rails'
gem 'recurly', '~> 2'
gem 'influxdb', '0.3.14'
gem 'influxdb-rails', '0.1.12'
gem 'sendgrid_toolkit', '>= 1.1.1'
gem 'stripe'
gem 'zip-codes'
gem 'email_validator'
gem 'best_in_place' #, github: 'bernat/best_in_place'
gem 'auto_strip_attributes', '2.6.0'
gem 'elasticsearch'
gem 'logging', '1.7.2'
#group :libv8 do
# gem 'libv8', "~> 4.5.95"
@ -110,14 +145,14 @@ end
#gem 'debugger' # not working with 2.1.2p95
group :development, :test do
gem 'capybara'
gem 'capybara', '2.13.0'
gem 'rspec-rails' #, '2.14.2'
gem 'jasmine', '1.3.1'
gem 'execjs', '1.4.0'
#gem 'therubyracer' #, '0.11.0beta8'
gem 'factory_girl_rails' # , '4.1.0'
gem 'database_cleaner' #, '0.7.0'
gem 'launchy'
gem 'launchy', '2.4.3' # can unpin when go to ruby 2.4+
gem 'faker', '1.3.0'
gem 'puma'
gem 'test-unit'

172
admin/Gemfile.alt Normal file
View File

@ -0,0 +1,172 @@
source 'http://rubygems.org'
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
ruby_version = ENV["JAM_RUBY_VERSION"]
ruby_version = "2.3.1" if ruby_version.nil?
ruby ruby_version
devenv = ENV["BUILD_NUMBER"].nil?
if devenv
#gem 'jam_db', :path=> "../db/target/ruby_package"
gem 'jampb', :path => "../pb/target/ruby/jampb"
gem 'jam_ruby', :path => "../ruby"
else
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/' do
#gem 'jam_db', "0.1.#{ENV["BUILD_NUMBER"]}"
gem 'jampb', "0.1.#{ENV["BUILD_NUMBER"]}"
gem 'jam_ruby', "0.1.#{ENV["BUILD_NUMBER"]}"
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
end
end
gem 'activeadmin_addons'
gem 'json', '1.8.6'
gem 'rails', '= 4.2.8'
gem 'protected_attributes'
gem 'rails-observers'
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
# This should be the same in ruby/admin/web/websocket-gateway
#######
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
gem 'rubyzip', '1.2.1' # pinned until we are on ruby 2.5; then remove
gem 'recurly', '2.18.16' # should upgrade to 3.x when we have time to validaate
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
gem 'redis', '3.3.3' # pinned until we are on 2.5; then remove
gem 'redis-namespace', '1.5.3' # pinned until we are on 2.5; then remove
gem 'oj', '3.1.3' # pinned until we are on 2.5; then remove
gem 'bcrypt', '3.1.15'
gem 'sass-rails', '5.0.7' # compiler mismatch issue between build and www
gem 'sass', '3.5.5 '# compiler mismatch issue between build and www
#######
gem 'bootstrap-sass', '2.0.4'
gem 'coffee-rails' #, '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'kickbox'
gem 'uglifier' #, '>= 1.0.3'
gem 'net-ssh'
gem 'sprockets-rails', '2.3.2'
# this version is pinned due to this: https://github.com/gregbell/active_admin/issues/1939
gem 'coffee-script-source' #, '~> 1.4.0' # ADD THIS LINE, 1.5.0 doesn't compile ActiveAdmin JavaScript files
gem 'devise' #, '3.3.0'
gem 'will_paginate' #, '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'carrierwave', '0.11.2' #, '0.9.0'
gem 'carrierwave_direct'
gem 'uuidtools', '2.1.2'
gem 'jquery-ui-rails'# , '5.0.5' #, '4.2.1'
gem 'jquery-rails'# , '4.1.1' # both this and jquery-ui-rails are pinned; if you unpin, jquery/autocomplete is missing during precomplie
gem 'rails-jquery-autocomplete' # This is the maintained version of rails3-jquery-autocomplete
gem 'activeadmin' #, '1.0.0.pre4'# github: 'activeadmin', branch: 'master'
gem 'activeadmin-searchable_select'
gem 'mime-types', '1.25'
#gem 'meta_search'
gem 'fog'
gem 'xmlrpc'
gem 'unf', '0.1.3' #optional fog dependency
gem 'country-select'
gem 'aasm' #, '3.0.16'
gem 'postgres-copy', '0.6.0'
gem 'aws-sdk', '~> 1'
gem 'bugsnag', '5.3.2'
gem 'gon'
gem 'cocoon'
gem 'haml-rails'
gem 'resque'
gem 'resque-retry'
gem 'resque-failed-job-mailer'
gem 'resque-lonely_job', '~> 1.0.0'
gem 'eventmachine', '1.2.3'
gem 'amqp', '0.9.8'
#gem 'logging-rails', :require => 'logging/rails'
#gem 'pg_migrate', '0.1.14'
if ENV["MODERN_OS"] == "1"
gem 'pg', '0.21.0'
else
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw]
end
gem 'ruby-protocol-buffers', '1.2.2'
gem 'sendgrid', '1.2.0'
gem 'geokit-rails'
gem 'postgres_ext' #, '1.0.0'
gem 'resque_mailer'
gem 'rest-client'
gem 'iso-639'
gem 'sanitize'
gem 'slim'
#gem 'influxdb', '0.1.8'
#gem 'influxdb-rails', '0.1.10'
gem 'influxdb', '0.3.14'
gem 'influxdb-rails', '0.1.12'
gem 'sendgrid_toolkit', '>= 1.1.1'
gem 'stripe'
gem 'zip-codes'
gem 'best_in_place' #, github: 'bernat/best_in_place'
gem 'auto_strip_attributes', '2.6.0'
gem 'elasticsearch'
gem 'logging', '1.7.2'
#group :libv8 do
# gem 'libv8', "~> 4.5.95"
#end
# To use Jbuilder templates for JSON
# gem 'jbuilder'
group :production do
gem 'unicorn'
end
group :package do
gem 'fpm'
end
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
#gem 'debugger' # not working with 2.1.2p95
group :development, :test do
gem 'capybara', '2.13.0'
gem 'rspec-rails' #, '2.14.2'
gem 'jasmine', '1.3.1'
gem 'execjs', '1.4.0'
#gem 'therubyracer' #, '0.11.0beta8'
gem 'factory_girl_rails' # , '4.1.0'
gem 'database_cleaner' #, '0.7.0'
gem 'launchy', '2.4.3' # can unpin when go to ruby 2.4+
gem 'faker', '1.3.0'
gem 'puma'
gem 'test-unit'
end
group :test do
gem 'simplecov', '~> 0.7.1'
gem 'simplecov-rcov'
# gem 'capybara-webkit'
# gem 'capybara-screenshot', '0.3.22' # 1.0.0 broke compat with rspec. maybe we need newer rspec
# gem 'poltergeist'
end
gem 'pry'
gem 'pry-remote'
gem 'pry-stack_explorer'
#gem 'pry-debugger'

View File

@ -1,9 +1,3 @@
PATH
remote: ../db/target/ruby_package
specs:
jam_db (0.1.1)
pg_migrate (= 0.1.14)
PATH
remote: ../pb/target/ruby/jampb
specs:
@ -19,70 +13,80 @@ GEM
remote: https://jamjam:blueberryjam@int.jamkazam.com/gems/
specs:
CFPropertyList (2.3.6)
aasm (4.12.3)
aasm (5.1.1)
concurrent-ruby (~> 1.0)
actionmailer (4.2.10)
actionpack (= 4.2.10)
actionview (= 4.2.10)
activejob (= 4.2.10)
actionmailer (4.2.8)
actionpack (= 4.2.8)
actionview (= 4.2.8)
activejob (= 4.2.8)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.10)
actionview (= 4.2.10)
activesupport (= 4.2.10)
actionpack (4.2.8)
actionview (= 4.2.8)
activesupport (= 4.2.8)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.10)
activesupport (= 4.2.10)
actionview (4.2.8)
activesupport (= 4.2.8)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activeadmin (1.2.1)
active_material (1.4.2)
activeadmin (1.4.3)
arbre (>= 1.1.1)
coffee-rails
formtastic (~> 3.1)
formtastic_i18n
inherited_resources (~> 1.7)
inherited_resources (>= 1.9.0)
jquery-rails (>= 4.2.0)
kaminari (>= 0.15, < 2.0)
railties (>= 4.2, < 5.2)
ransack (~> 1.3)
kaminari (>= 0.15)
railties (>= 4.2, < 5.3)
ransack (>= 1.8.7)
sass (~> 3.1)
sprockets (< 4.1)
activeadmin_addons (1.1.2)
activeadmin-searchable_select (1.4.0)
activeadmin (>= 1.x, < 3)
jquery-rails (>= 3.0, < 5)
select2-rails (~> 4.0)
activeadmin_addons (1.7.1)
active_material
railties
require_all
require_all (~> 1.5)
sass
select2-rails (~> 4.0)
xdan-datetimepicker-rails (~> 2.5.1)
activejob (4.2.10)
activesupport (= 4.2.10)
activejob (4.2.8)
activesupport (= 4.2.8)
globalid (>= 0.3.0)
activemodel (4.2.10)
activesupport (= 4.2.10)
activemodel (4.2.8)
activesupport (= 4.2.8)
builder (~> 3.1)
activerecord (4.2.10)
activemodel (= 4.2.10)
activesupport (= 4.2.10)
activerecord (4.2.8)
activemodel (= 4.2.8)
activesupport (= 4.2.8)
arel (~> 6.0)
activesupport (4.2.10)
activesupport (4.2.8)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
aliyun-sdk (0.8.0)
nokogiri (~> 1.6)
rest-client (~> 2.0)
amq-client (0.9.12)
amq-protocol (>= 1.2.0)
eventmachine
amq-protocol (2.3.0)
amq-protocol (2.3.2)
amqp (0.9.8)
amq-client (~> 0.9.5)
amq-protocol (>= 0.9.4)
eventmachine
arbre (1.1.1)
arbre (1.2.1)
activesupport (>= 3.0.0)
arel (6.0.4)
arr-pm (0.0.10)
@ -94,9 +98,8 @@ GEM
aws-sdk-v1 (1.67.0)
json (~> 1.4)
nokogiri (~> 1)
backports (3.11.1)
bcrypt (3.1.11)
bcrypt-ruby (3.0.1)
backports (3.20.2)
bcrypt (3.1.15)
best_in_place (3.1.1)
actionpack (>= 3.2)
railties (>= 3.2)
@ -105,9 +108,8 @@ GEM
bootstrap-sass (2.0.4.0)
bootstrap-will_paginate (0.0.6)
will_paginate
bugsnag (6.6.3)
concurrent-ruby (~> 1.0)
builder (3.2.3)
bugsnag (5.3.2)
builder (3.2.4)
cabin (0.9.0)
capybara (2.13.0)
addressable
@ -122,15 +124,15 @@ GEM
json (>= 1.7)
mime-types (>= 1.16)
mimemagic (>= 0.3.0)
carrierwave_direct (0.0.15)
carrierwave
fog
uuidtools
childprocess (0.8.0)
carrierwave_direct (1.0.0)
carrierwave (~> 0.11)
fog-aws
cause (0.1)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
clamp (1.0.1)
cocoon (1.2.11)
coderay (1.1.2)
cocoon (1.2.15)
coderay (1.1.3)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
@ -138,28 +140,36 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
country-select (1.1.1)
crass (1.0.3)
database_cleaner (1.6.2)
debug_inspector (0.0.3)
devise (4.4.1)
concurrent-ruby (1.1.8)
country-select (1.2.1)
crass (1.0.6)
database_cleaner (1.99.0)
debug_inspector (1.0.0)
devise (4.7.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.3)
domain_name (0.5.20170404)
diff-lcs (1.4.4)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.2.1)
dotenv (2.7.6)
elasticsearch (7.4.0)
elasticsearch-api (= 7.4.0)
elasticsearch-transport (= 7.4.0)
elasticsearch-api (7.4.0)
multi_json
elasticsearch-transport (7.4.0)
faraday
multi_json
email_validator (1.6.0)
activemodel
erubis (2.7.0)
et-orbi (1.0.9)
et-orbi (1.2.4)
tzinfo
eventmachine (1.2.3)
excon (0.60.0)
excon (0.79.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (4.9.0)
@ -169,22 +179,31 @@ GEM
railties (>= 3.0.0)
faker (1.3.0)
i18n (~> 0.5)
faraday (0.14.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
ffi (1.12.2)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.32.0)
fog (1.41.0)
fog-aliyun (>= 0.1.0)
fog-atmos
fog-aws (>= 0.6.0)
fog-brightbox (~> 0.4)
fog-core (~> 1.32)
fog-ecloud (= 0.1.1)
fog-google (>= 0.0.2)
fog-cloudatcost (~> 0.1.0)
fog-core (~> 1.45)
fog-digitalocean (>= 0.3.0)
fog-dnsimple (~> 1.0)
fog-dynect (~> 0.0.2)
fog-ecloud (~> 0.1)
fog-google (<= 0.1.0)
fog-internet-archive
fog-joyent
fog-json
fog-local
fog-openstack
fog-powerdns (>= 0.1.1)
fog-profitbricks
fog-rackspace
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
@ -194,44 +213,85 @@ GEM
fog-terremark
fog-vmfusion
fog-voxel
fog-vsphere (>= 0.4.0)
fog-xenserver
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
json (>= 1.8, < 2.0)
fog-aliyun (0.3.19)
aliyun-sdk (~> 0.8.0)
fog-core
fog-json
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (2.0.0)
fog-aws (2.0.1)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.14.0)
fog-brightbox (0.11.0)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-cloudatcost (0.1.2)
fog-core (~> 1.36)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.45.0)
builder
excon (~> 0.58)
formatador (~> 0.2)
fog-ecloud (0.1.1)
fog-core
fog-xml
fog-google (0.6.0)
fog-digitalocean (0.4.0)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.4.0)
fog-core (~> 1.27)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
ipaddress (>= 0.5)
fog-dnsimple (1.0.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-dynect (0.0.3)
fog-core
fog-json
fog-xml
fog-ecloud (0.3.0)
fog-core
fog-xml
fog-google (0.1.0)
fog-core
fog-json
fog-xml
fog-internet-archive (0.0.2)
fog-core
fog-json
fog-xml
fog-joyent (0.0.1)
fog-core (~> 1.42)
fog-json (>= 1.0)
fog-json (1.2.0)
fog-core
multi_json (~> 1.10)
fog-local (0.6.0)
fog-core (>= 1.27, < 3.0)
fog-openstack (0.3.10)
fog-core (>= 1.45, <= 2.1.0)
fog-json (>= 1.0)
ipaddress (>= 0.8)
fog-powerdns (0.2.0)
fog-core
fog-json
fog-xml
fog-profitbricks (4.1.1)
fog-core (~> 1.42)
fog-json (~> 1.0)
fog-rackspace (0.1.6)
fog-core (>= 1.35)
fog-json (>= 1.0)
fog-xml (>= 0.1)
ipaddress (>= 0.8)
fog-radosgw (0.0.5)
fog-core (>= 1.21.0)
fog-json
@ -261,6 +321,13 @@ GEM
fog-voxel (0.1.0)
fog-core
fog-xml
fog-vsphere (3.5.0)
fog-core
rbvmomi (>= 1.9, < 3)
fog-xenserver (1.0.0)
fog-core
fog-xml
xmlrpc
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
@ -268,28 +335,35 @@ GEM
formtastic (3.1.5)
actionpack (>= 3.2.13)
formtastic_i18n (0.6.0)
fpm (1.9.3)
fpm (1.12.0)
arr-pm (~> 0.0.10)
backports (>= 2.6.2)
cabin (>= 0.6.0)
childprocess
childprocess (< 1.0.0)
clamp (~> 1.0.0)
ffi
json (>= 1.7.7, < 2.0)
ffi (~> 1.12.0)
git (>= 1.3.0, < 2.0)
json (>= 1.7.7, < 3.0)
pleaserun (~> 0.0.29)
ruby-xz
ruby-xz (~> 0.2.3)
stud
geokit (1.11.0)
geokit-rails (2.3.0)
fugit (1.4.2)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.4)
geokit (1.13.1)
geokit-rails (2.3.2)
geokit (~> 1.5)
rails (>= 3.0)
globalid (0.4.1)
git (1.8.1)
rchardet (~> 1.8)
globalid (0.4.2)
activesupport (>= 4.2.0)
gon (6.2.0)
actionpack (>= 3.0)
gon (6.4.0)
actionpack (>= 3.0.20)
i18n (>= 0.7)
multi_json
request_store (>= 1.0)
haml (5.0.4)
haml (5.2.1)
temple (>= 0.8.0)
tilt
haml-rails (1.0.0)
@ -298,61 +372,65 @@ GEM
haml (>= 4.0.6, < 6.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
has_scope (0.7.1)
actionpack (>= 4.1, < 5.2)
activesupport (>= 4.1, < 5.2)
has_scope (0.7.2)
actionpack (>= 4.1)
activesupport (>= 4.1)
html2haml (2.2.0)
erubis (~> 2.7.0)
haml (>= 4.0, < 6)
nokogiri (>= 1.6.0)
ruby_parser (~> 3.5)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
httparty (0.15.6)
httparty (0.16.2)
multi_xml (>= 0.5.2)
i18n (0.9.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
icalendar (2.4.0)
inflecto (0.0.2)
influxdb (0.5.3)
influxdb-rails (0.4.3)
influxdb (~> 0.5.0)
railties (> 3)
inherited_resources (1.8.0)
actionpack (>= 4.2, <= 5.2)
influxdb (0.3.14)
cause
json
influxdb-rails (0.1.12)
influxdb (~> 0.3.0)
railties
inherited_resources (1.9.0)
actionpack (>= 4.2, < 5.3)
has_scope (~> 0.6)
railties (>= 4.2, <= 5.2)
railties (>= 4.2, < 5.3)
responders
insist (1.0.0)
io-like (0.3.0)
io-like (0.3.1)
ipaddress (0.8.3)
iso-639 (0.2.8)
iso-639 (0.3.5)
jasmine (1.3.1)
jasmine-core (~> 1.3.1)
rack (~> 1.0)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
jasmine-core (1.3.1)
jquery-rails (4.3.1)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (1.8.6)
kaminari (1.1.1)
kaminari (1.2.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
kgio (2.11.1)
kickbox (2.0.3)
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
kgio (2.11.3)
kickbox (2.0.4)
faraday (~> 0.9)
json (>= 1.8)
launchy (2.4.3)
@ -360,82 +438,81 @@ GEM
little-plugger (1.1.4)
logging (1.7.2)
little-plugger (>= 1.1.3)
loofah (2.1.1)
loofah (2.9.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (0.9.0)
method_source (1.0.0)
mime-types (1.25)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.2)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.3)
mono_logger (1.1.0)
multi_json (1.13.1)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.0.0)
multipart-post (2.1.1)
mustache (0.99.8)
net-ssh (4.2.0)
net-ssh (6.1.0)
netrc (0.11.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
nokogumbo (1.4.13)
nokogiri
nio4r (2.5.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.4)
nokogiri (~> 1.8, >= 1.8.4)
oj (3.1.3)
optimist (3.0.1)
orm_adapter (0.5.0)
pg (0.17.1)
pg_array_parser (0.0.9)
pg_migrate (0.1.14)
logging (= 1.7.2)
pg (= 0.17.1)
thor
pleaserun (0.0.30)
pleaserun (0.0.31)
cabin (> 0)
clamp
dotenv
insist
mustache (= 0.99.8)
stud
polyamorous (1.3.3)
activerecord (>= 3.0)
postgres-copy (0.6.0)
activerecord (>= 3.0.0)
pg
rails (>= 3.0.0)
responders
postgres_ext (3.0.0)
activerecord (>= 4.0.0)
postgres_ext (3.0.1)
activerecord (~> 4.0)
arel (>= 4.0.1)
pg_array_parser (~> 0.0.9)
power_assert (1.1.1)
power_assert (2.0.0)
protected_attributes (1.1.4)
activemodel (>= 4.0.1, < 5.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry (0.14.0)
coderay (~> 1.1)
method_source (~> 1.0)
pry-remote (0.1.8)
pry (~> 0.9)
slop (~> 3.0)
pry-stack_explorer (0.4.9.2)
binding_of_caller (>= 0.7)
pry (>= 0.9.11)
public_suffix (3.0.1)
puma (3.11.2)
rack (1.6.8)
rack-protection (1.5.3)
pry-stack_explorer (0.4.12)
binding_of_caller (~> 0.7)
pry (~> 0.13)
public_suffix (4.0.6)
puma (5.2.1)
nio4r (~> 2.0)
raabro (1.4.0)
rack (1.6.13)
rack-protection (1.5.5)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.10)
actionmailer (= 4.2.10)
actionpack (= 4.2.10)
actionview (= 4.2.10)
activejob (= 4.2.10)
activemodel (= 4.2.10)
activerecord (= 4.2.10)
activesupport (= 4.2.10)
rails (4.2.8)
actionmailer (= 4.2.8)
actionpack (= 4.2.8)
actionview (= 4.2.8)
activejob (= 4.2.8)
activemodel (= 4.2.8)
activerecord (= 4.2.8)
activesupport (= 4.2.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.10)
railties (= 4.2.8)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
@ -443,38 +520,43 @@ GEM
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails-jquery-autocomplete (1.0.3)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-jquery-autocomplete (1.0.5)
rails (>= 3.2)
rails-observers (0.1.5)
activemodel (>= 4.0)
railties (4.2.10)
actionpack (= 4.2.10)
activesupport (= 4.2.10)
railties (4.2.8)
actionpack (= 4.2.8)
activesupport (= 4.2.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.19.0)
rake (12.3.0)
ransack (1.8.6)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
raindrops (0.19.1)
rake (13.0.3)
ransack (1.8.10)
actionpack (>= 3.0, < 5.2)
activerecord (>= 3.0, < 5.2)
activesupport (>= 3.0, < 5.2)
i18n
polyamorous (~> 1.3.2)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
recurly (2.18.18)
redis (4.0.1)
redis-namespace (1.6.0)
redis (>= 3.0.4)
request_store (1.4.0)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbvmomi (2.4.1)
builder (~> 3.0)
json (>= 1.8)
nokogiri (~> 1.5)
optimist (~> 3.0)
rchardet (1.8.0)
recurly (2.18.16)
redis (3.3.3)
redis-namespace (1.5.3)
redis (~> 3.0, >= 3.0.4)
request_store (1.5.0)
rack (>= 1.4)
require_all (1.5.0)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
resque (1.27.4)
mono_logger (~> 1.0)
multi_json (~> 1.0)
@ -484,55 +566,57 @@ GEM
resque-failed-job-mailer (0.0.3)
resque-lonely_job (1.0.2)
resque (>= 1.2)
resque-retry (1.5.0)
resque (~> 1.25)
resque-retry (1.7.4)
resque (>= 1.25, < 3.0)
resque-scheduler (~> 4.0)
resque-scheduler (4.3.1)
resque-scheduler (4.4.0)
mono_logger (~> 1.0)
redis (>= 3.3, < 5)
resque (~> 1.26)
redis (>= 3.3)
resque (>= 1.26)
rufus-scheduler (~> 3.2)
resque_mailer (2.4.3)
actionmailer (>= 3.0)
activesupport (>= 3.0)
rest-client (2.0.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rspec-support (~> 3.10.0)
rspec-rails (4.0.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
ruby-prof (0.15.9)
ruby-protocol-buffers (1.2.2)
ruby-xz (0.2.3)
ffi (~> 1.9)
io-like (~> 0.3)
ruby_parser (3.10.1)
ruby_parser (3.15.1)
sexp_processor (~> 4.9)
rubyzip (1.2.1)
rufus-scheduler (3.4.2)
et-orbi (~> 1.0)
sanitize (4.5.0)
rufus-scheduler (3.7.0)
fugit (~> 1.1, >= 1.1.6)
sanitize (5.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.4.4)
nokogumbo (~> 1.4.1)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
@ -544,16 +628,15 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
select2-rails (4.0.3)
thor (~> 0.14)
selenium-webdriver (3.8.0)
select2-rails (4.0.13)
selenium-webdriver (3.14.0)
childprocess (~> 0.5)
rubyzip (~> 1.0)
rubyzip (~> 1.2)
sendgrid (1.2.0)
json
sendgrid_toolkit (1.4.0)
httparty (>= 0.7.6)
sexp_processor (4.10.0)
sexp_processor (4.15.2)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
@ -564,34 +647,33 @@ GEM
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
slim (3.0.9)
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 1.3.3, < 2.1)
tilt (>= 2.0.6, < 2.1)
slop (3.6.0)
sprockets (3.7.1)
sprockets (3.6.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
stripe (3.9.1)
faraday (~> 0.10)
sprockets-rails (2.3.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
stripe (5.29.1)
stud (0.0.23)
temple (0.8.0)
test-unit (3.2.7)
temple (0.8.2)
test-unit (3.4.0)
power_assert
thor (0.20.0)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.4)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.1.4)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.3)
unf_ext
unf_ext (0.0.7.4)
unicorn (5.4.0)
unf_ext (0.0.7.7)
unicorn (5.8.0)
kgio (~> 2.6)
raindrops (~> 0.7)
uuidtools (2.1.2)
@ -599,10 +681,14 @@ GEM
rack (>= 1.0.0)
warden (1.2.7)
rack (>= 1.0)
will_paginate (3.1.6)
webrick (1.7.0)
will_paginate (3.3.0)
xdan-datetimepicker-rails (2.5.4)
jquery-rails
rails (>= 3.2.16)
xml-simple (1.1.8)
xmlrpc (0.3.2)
webrick
xpath (2.1.0)
nokogiri (~> 1.3)
zip-codes (0.2.1)
@ -613,16 +699,17 @@ PLATFORMS
DEPENDENCIES
aasm
activeadmin
activeadmin-searchable_select
activeadmin_addons
amqp (= 0.9.8)
auto_strip_attributes (= 2.6.0)
aws-sdk (~> 1)
bcrypt-ruby (= 3.0.1)
bcrypt (= 3.1.15)
best_in_place
bootstrap-sass (= 2.0.4)
bootstrap-will_paginate (= 0.0.6)
bugsnag
capybara
bugsnag (= 5.3.2)
capybara (= 2.13.0)
carrierwave (= 0.11.2)
carrierwave_direct
cocoon
@ -631,19 +718,23 @@ DEPENDENCIES
country-select
database_cleaner
devise
email_validator
elasticsearch
email_validator (= 1.6.0)
eventmachine (= 1.2.3)
execjs (= 1.4.0)
factory_girl_rails
faker (= 1.3.0)
fog (~> 1.32.0)
faraday (= 0.9.2)
fog
fog-brightbox (= 0.11.0)
fpm
geokit-rails
gon
haml-rails
influxdb-rails
icalendar (= 2.4.0)
influxdb (= 0.3.14)
influxdb-rails (= 0.1.12)
iso-639
jam_db!
jam_ruby!
jampb!
jasmine (= 1.3.1)
@ -651,10 +742,13 @@ DEPENDENCIES
jquery-ui-rails
json (= 1.8.6)
kickbox
launchy
launchy (= 2.4.3)
logging (= 1.7.2)
mime-types (= 1.25)
net-ssh
pg_migrate (= 0.1.14)
nokogiri (= 1.10.10)
oj (= 3.1.3)
pg (= 0.17.1)
postgres-copy (= 0.6.0)
postgres_ext
protected_attributes
@ -662,10 +756,12 @@ DEPENDENCIES
pry-remote
pry-stack_explorer
puma
rails (> 4.2)
rails (= 4.2.8)
rails-jquery-autocomplete
rails-observers
recurly (~> 2)
recurly (= 2.18.16)
redis (= 3.3.3)
redis-namespace (= 1.5.3)
resque
resque-failed-job-mailer
resque-lonely_job (~> 1.0.0)
@ -673,15 +769,19 @@ DEPENDENCIES
resque_mailer
rest-client
rspec-rails
ruby-prof (= 0.15.9)
ruby-protocol-buffers (= 1.2.2)
rubyzip
rubyzip (= 1.2.1)
sanitize
sass-rails
sass (= 3.5.5)
sass-rails (= 5.0.7)
sendgrid (= 1.2.0)
sendgrid_toolkit (>= 1.1.1)
simplecov (~> 0.7.1)
simplecov-rcov
slim
sprockets (= 3.6.3)
sprockets-rails (= 2.3.2)
stripe
test-unit
uglifier
@ -689,7 +789,11 @@ DEPENDENCIES
unicorn
uuidtools (= 2.1.2)
will_paginate
xmlrpc
zip-codes
RUBY VERSION
ruby 2.4.1p111
BUNDLED WITH
1.17.1
1.17.3

View File

@ -6,3 +6,9 @@
require File.expand_path('../config/application', __FILE__)
JamAdmin::Application.load_tasks
require 'jam_ruby'
spec = Gem::Specification.find_by_name 'jam_ruby'
rakefile = "#{spec.gem_dir}/Rakefile"
load rakefile

View File

@ -0,0 +1,161 @@
module AdCampaignsHelper
def self.spacer(val, total)
percentage = ((val * 100) / total.to_f).round(1).to_s
('%-5.5s' % percentage).gsub(' ', '&nbsp;') + '%&nbsp;-&nbsp;' + val.to_s
end
def self.cac(campaign)
if campaign.subscribed && campaign.subscribed > 0
(campaign.spend/campaign.subscribed.to_f).round(2)
end
end
def self.cac_divide_by_ltv(campaign)
customer_ltv = GenericState.singleton.customer_ltv
if cac(campaign) && customer_ltv && customer_ltv > 0
return (cac(campaign)/customer_ltv.to_f).round(2)
end
end
def self.format_number(num)
if num
num.to_s.reverse.scan(/\d{3}|.+/).join(",").reverse
end
end
end
ActiveAdmin.register JamRuby::AdCampaign, as: 'AdCampaign' do
menu :label => 'Ad Campaigns', :parent => 'Reports'
before_filter :skip_sidebar!, :only => :index
config.batch_actions = false
config.clear_action_items!
config.sort_order = "users.origin_utm_campaign DESC"
config.per_page = 100
config.paginate = true
index do
div do
render 'customer_ltv'
end
column "Campaign" do |campaign|
campaign.origin_utm_campaign
end
column "Medium" do |campaign|
campaign.origin_utm_medium
end
column "End Date" do |campaign|
best_in_place campaign, :end_date, as: :date, url: inplace_update_admin_ad_campaigns_path(campaign: campaign.origin_utm_campaign, medium: campaign.origin_utm_medium), param: 'ad_campaign', classes: 'ac_bip'
end
column "Hard Date" do |campaign|
(campaign.end_date + 45.days).strftime('%Y-%m-%d') if campaign.end_date.present?
end
column "Subscribed" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.subscribed, campaign.joined))
end
column "Spend" do |campaign|
best_in_place campaign, :spend, as: :input, url: inplace_update_admin_ad_campaigns_path(campaign: campaign.origin_utm_campaign, medium: campaign.origin_utm_medium), param: 'ad_campaign', display_with: Proc.new{|spend| number_to_currency(spend) }, classes: 'ac_bip'
end
column "CAC" do |campaign|
number_to_currency(AdCampaignsHelper.cac(campaign)) if AdCampaignsHelper.cac(campaign) && AdCampaignsHelper.cac(campaign) > 0
end
column "LTV/CAC" do |campaign|
AdCampaignsHelper.cac_divide_by_ltv(campaign)
end
column "Referred" do |campaign|
best_in_place campaign, :referred, as: :input, url: inplace_update_admin_ad_campaigns_path(campaign: campaign.origin_utm_campaign, medium: campaign.origin_utm_medium), param: 'ad_campaign', display_with: Proc.new{|referred| AdCampaignsHelper.format_number(referred) }, classes: 'ac_bip'
end
column "Signed Up" do |campaign|
if campaign.referred && campaign.referred > 0
raw(AdCampaignsHelper.spacer(campaign.joined, campaign.referred))
else
raw("? - #{campaign.joined}")
end
end
column "Downloaded" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.downloaded, campaign.joined))
end
column "Ran Client" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.ran_client, campaign.joined))
end
column "FTUE" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.ftue, campaign.joined))
end
column "Any Session" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.any_session, campaign.joined))
end
column "2+ Session" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.real_session, campaign.joined))
end
column "Good Session" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.good_session, campaign.joined))
end
column "Invited" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.invited, campaign.joined))
end
column "Friended" do |campaign|
raw(AdCampaignsHelper.spacer(campaign.friended, campaign.joined))
end
column "Platinum" do |campaign|
campaign.platinum
end
column "Gold" do |campaign|
campaign.gold
end
column "Silver" do |campaign|
campaign.silver
end
end
controller do
def scoped_collection
User.select("users.origin_utm_campaign,
users.origin_utm_medium, COUNT(users.id) AS joined,
COUNT(users.first_downloaded_client_at) AS downloaded,
COUNT(users.first_subscribed_at) AS subscribed,
COUNT(users.first_ran_client_at) AS ran_client,
COUNT(users.first_certified_gear_at) AS ftue,
COUNT(users.first_music_session_at) AS any_session,
COUNT(users.first_real_music_session_at) AS real_session,
COUNT(users.first_good_music_session_at) AS good_session,
COUNT(users.first_invited_at) AS invited,
COUNT(users.first_friended_at) AS friended,
COUNT(CASE WHEN users.first_subscribed_plan_code = 'jamsubplatinum' OR users.first_subscribed_plan_code = 'jamsubplatinumyearly' THEN users.first_subscribed_plan_code END) AS platinum,
COUNT(CASE WHEN users.first_subscribed_plan_code = 'jamsubgold' OR users.first_subscribed_plan_code = 'jamsubgoldyearly' THEN users.first_subscribed_plan_code END) AS gold,
COUNT(CASE WHEN users.first_subscribed_plan_code = 'jamsubsilver' OR users.first_subscribed_plan_code = 'jamsubsilveryearly' THEN users.first_subscribed_plan_code END) AS silver,
ad_campaigns.id,
COALESCE(MAX(ad_campaigns.referred), NULL) as referred,
COALESCE(MAX(ad_campaigns.end_date), NULL) AS end_date,
COALESCE(MAX(ad_campaigns.spend), 0) AS spend").joins("
LEFT JOIN ad_campaigns ON users.origin_utm_campaign = ad_campaigns.campaign
AND users.origin_utm_medium = ad_campaigns.medium").where("
users.origin_utm_campaign IS NOT NULL AND users.origin_utm_medium IS NOT NULL AND users.origin_utm_source = 'paid'").group("
ad_campaigns.id, users.origin_utm_campaign, users.origin_utm_medium").order("
users.origin_utm_campaign DESC")
end
def permitted_params
params.permit :campaign, :medium, :_method, ad_campaign: [:spend, :referred, :end_date]
end
end
collection_action :inplace_update, method: :put do
campaign = permitted_params[:campaign]
medium = permitted_params[:medium]
@ad_campaign = JamRuby::AdCampaign.where(campaign: campaign, medium: medium).first_or_create
respond_to do |format|
if @ad_campaign.update_attributes(permitted_params[:ad_campaign])
format.json { head :ok }
else
format.json{ render :json => @ad_campaign.errors.full_messages, :status => :unprocessable_entity }
end
end
end
end

View File

@ -0,0 +1,43 @@
# module AdCampaignsHelper
# def campaign_brought_in_users(campaign, medium)
# User.where(origin_utm_campaign: campaign, origin_utm_medium: medium)
# end
# end
# ActiveAdmin.register JamRuby::AdCampaign do
# permit_params :campaign, :medium, :spend
# end
# ActiveAdmin.register_page "Ad campaigns" do
# menu parent: 'Reports'
# content :title => "Paid Advertising Report" do
# table_for User.select("users.origin_utm_campaign, users.origin_utm_medium, COALESCE(MAX(ad_campaigns.end_date), NULL) AS end_date, COALESCE(MAX(ad_campaigns.spend), NULL) AS spend").joins("LEFT JOIN ad_campaigns ON users.origin_utm_campaign = ad_campaigns.campaign AND users.origin_utm_medium = ad_campaigns.medium").group("ad_campaigns.id, users.origin_utm_campaign, users.origin_utm_medium") do
# column "Campaign" do |campaign|
# campaign.origin_utm_campaign
# end
# column "Medium" do |campaign|
# campaign.origin_utm_medium
# end
# column "End Date" do |campaign|
# campaign.end_date
# end
# column "Hard Date" do |campaign|
# campaign.end_date + 45.days if campaign.end_date.present?
# end
# column "Subscribed" do |campaign|
# end
# column "Spend" do |campaign|
# best_in_place campaign, :spend, as: :input, url: admin_ad_campaigns_update_path(campaign: campaign.origin_utm_campaign, medium: campaign.origin_utm_medium), param: 'ad_campaign'
# end
# end
# end
# page_action :update, method: :put do
# campaign = params[:campaign]
# medium = params[:medium]
# ad_campaign = AdCampaign.where(campaign: campaign, medium: medium).first_or_initialize
# ad_campaign.attributes = params["ad_campaign"]
# ad_campaign.save!
# respond_with_bip(ad_campaign)
# end
# end

View File

@ -0,0 +1,108 @@
class AffiliateCohortsHelper
def self.percentage(opTop, opBottom)
"#{(opTop/opBottom * 100).round(1)}%"
end
def self.quarter(date)
case date.month
when 1, 2, 3 then 0
when 4, 5, 6 then 1
when 7, 8, 9 then 2
when 10, 11, 12 then 3
end
end
def self.payments_for_months(affiliate_partner, year, start_month, end_month)
JamRuby::AffiliateMonthlyPayment.where(
"affiliate_partner_id = ? AND month >= ? AND month <= ? AND year = ?",
affiliate_partner.id,
start_month,
end_month,
year
).order('month DESC')
end
def self.payments_for_quarter(affiliate_partner, year, quarter)
JamRuby::AffiliateQuarterlyPayment.where(
"affiliate_partner_id = ? AND quarter = ? AND year = ?",
affiliate_partner.id,
quarter,
year
).order('quarter DESC')
end
def self.all_time_payments(affiliate_partner)
JamRuby::AffiliateQuarterlyPayment.where(
"affiliate_partner_id = ?", affiliate_partner.id
)
end
def self.current_quarter_payments(affiliate_partner)
AffiliateCohortsHelper.payments_for_quarter(affiliate_partner,
Date.today.year,
AffiliateCohortsHelper.quarter(Date.today)
)
end
def self.current_quarter_monthly_payments(affiliate_partner)
AffiliateCohortsHelper.payments_for_months(affiliate_partner,
Date.today.beginning_of_quarter.year,
Date.today.beginning_of_quarter.month,
Date.today.end_of_quarter.month
)
end
def self.prior_quarter_payments(affiliate_partner)
prev_quarter_start = (Date.today.beginning_of_quarter - 1.day).beginning_of_quarter
prev_quarter = AffiliateCohortsHelper.quarter(prev_quarter_start)
AffiliateCohortsHelper.payments_for_quarter(affiliate_partner,
prev_quarter_start.year,
prev_quarter
)
end
def self.prior_quarter_payable_amount(affiliate_partner)
total = AffiliateCohortsHelper.prior_quarter_payments(affiliate_partner).inject(0.0){ | sum, payment |
sum += payment.due_amount_in_cents }
paid = AffiliateCohortsHelper.prior_quarter_payments(affiliate_partner).where(paid: false).inject(0.0){ | sum, payment |
sum += payment.due_amount_in_cents }
(total - paid) / 100.0
end
end
ActiveAdmin.register_page "Affiliate Cohorts" do
menu parent: 'Reports'
content :title => "Affiliate Cohorts" do
table_for AffiliatePartner.includes(:partner_user).all do
column 'Affiliate Name' do |partner|
link_to partner.partner_name, admin_affiliate_path(partner)
end
column 'Affiliate ID', :id
column 'Affiliate Email', Proc.new{ | partner | partner&.partner_user&.email}
column 'Affiliate Paypal', Proc.new{| partner | partner.paypal_id }
column 'All Time Users', :referral_user_count
column 'All Time Subscribers', Proc.new{ | partner | partner.subscribed_user_referrals.size }
column 'All Time Subscriber Conversion Rate', Proc.new{ | partner |
AffiliateCohortsHelper.percentage(partner.subscribed_user_referrals.size.to_f, partner.referral_user_count.to_f) }
column 'All Time Revenues', Proc.new{ | partner |
number_to_currency(AffiliateCohortsHelper.all_time_payments(partner).inject(0.0){ | sum, payment | sum += payment.due_amount_in_cents } / 100.0)
}
column 'Current Quarter Revenues', Proc.new{ | partner |
number_to_currency(AffiliateCohortsHelper.current_quarter_payments(partner).inject(0.0){ | sum, payment | sum += payment.due_amount_in_cents } / 100.0 )
}
column 'Current Quarter Revenues by Month', Proc.new{ | partner |
AffiliateCohortsHelper.current_quarter_monthly_payments(partner).each do |monthly_payment|
li "#{Date::MONTHNAMES[monthly_payment.month]} #{monthly_payment.year} - #{number_to_currency(monthly_payment.due_amount_in_cents.to_f / 100.0)}"
end
''.html_safe
}
column 'Prior Quarter Revenues', Proc.new{ | partner |
number_to_currency(AffiliateCohortsHelper.prior_quarter_payments(partner).inject(0.0){ | sum, payment | sum += payment.due_amount_in_cents } / 100.0)
}
column 'Prior Quarter Payable', Proc.new{ | partner |
number_to_currency(AffiliateCohortsHelper.prior_quarter_payable_amount(partner))
}
end
end
end

View File

@ -0,0 +1,33 @@
ActiveAdmin.register JamRuby::AffiliateLink, :as => 'Affiliate Links' do
menu :label => 'Links', :parent => 'Affiliates'
config.sort_order = 'created_at ASC'
config.batch_actions = false
# config.clear_action_items!
config.filters = false
config.per_page = 50
config.paginate = true
#form :partial => 'form'
form do |f|
f.inputs 'Fields' do
f.input(:name, :input_html => { :maxlength => 255 })
f.input(:link, :input_html => { :maxlength => 255 })
end
f.actions
end
index do
column 'Name' do |oo|
oo.name
end
column 'Link' do |oo|
oo.link
end
actions
end
end

View File

@ -2,7 +2,7 @@ ActiveAdmin.register JamRuby::AffiliateQuarterlyPayment, :as => 'Affiliate Quart
menu :label => 'Quarterly Reports', :parent => 'Affiliates'
config.sort_order = 'due_amount_in_cents DESC'
config.sort_order = 'year desc, quarter desc, due_amount_in_cents desc'
config.batch_actions = false
config.clear_action_items!
config.filters = true
@ -14,18 +14,32 @@ ActiveAdmin.register JamRuby::AffiliateQuarterlyPayment, :as => 'Affiliate Quart
filter :quarter
filter :closed
filter :paid
filter :jamtracks_sold
filter :subscriptions_count
filter :due_amount_in_cents
form :partial => 'form'
scope("Sorted By Due Amount", default: true) { |scope| scope.order('year desc, quarter desc, due_amount_in_cents desc') }
scope("Sorted By Jamtracks Sold", default: false) { |scope| scope.order('year desc, quarter desc, jamtracks_sold desc') }
scope("Sorted By Subs", default: false) { |scope| scope.order('year desc, quarter desc, subscriptions_count desc') }
scope("Sorted By Newest First") { |scope| scope.order('year desc, quarter desc, id desc') }
scope("Any") { |scope| scope.order('year desc, quarter desc, due_amount_in_cents desc') }
index do
# default_actions # use this for all view/edit/delete links
column 'Year' do |oo| oo.year end
column 'Quarter' do |oo| oo.quarter end
column 'Partner Id' do |oo| oo.affiliate_partner.id end
column 'Partner' do |oo| link_to(oo.affiliate_partner.display_name, oo.affiliate_partner.admin_url, {:title => oo.affiliate_partner.display_name}) end
column "Due (\u00A2)" do |oo| oo.due_amount_in_cents end
column 'JamTracks Sold' do |oo| oo.jamtracks_sold end
column "Tot ($)" do |oo| sprintf("$%.2f", oo.due_amount_in_cents.to_f / 100.to_f) end
column "Sub ($)" do |oo| sprintf("$%.2f", oo.subscription_due_amount_in_cents.to_f / 100.to_f) end
column "Jam ($)" do |oo| sprintf("$%.2f", oo.jamtrack_due_amount_in_cents.to_f / 100.to_f) end
column 'JamTracks' do |oo| oo.jamtracks_sold end
column 'Subscriptions' do |oo| oo.subscriptions_count end
column 'Paid' do |oo| oo.paid end
column 'Closed' do |oo| oo.paid end

View File

@ -23,7 +23,9 @@ ActiveAdmin.register JamRuby::AffiliateTrafficTotal, :as => 'Affiliate Daily Sta
# default_actions # use this for all view/edit/delete links
column 'Day' do |oo| oo.day end
column 'Partner' do |oo| link_to(oo.affiliate_partner.display_name, oo.affiliate_partner.admin_url, {:title => oo.affiliate_partner.display_name}) end
column 'Partner ID' do |oo| oo.affiliate_partner.id end
column 'Partner Name' do |oo| oo.affiliate_partner.display_name end
column 'Partner User' do |oo| link_to(oo.affiliate_partner.partner_user.name, admin_user_path(oo.affiliate_partner.partner_user.id), { :title => oo.affiliate_partner.partner_user.name }) end
column 'Signups' do |oo| oo.signups end
column 'Visits' do |oo| oo.visits end
@ -31,6 +33,16 @@ ActiveAdmin.register JamRuby::AffiliateTrafficTotal, :as => 'Affiliate Daily Sta
controller do
def scoped_collection
rel = end_of_association_chain
.includes([:affiliate_partner])
.order('day DESC')
if (ref_id = params[AffiliatePartner::PARAM_REFERRAL]).present?
qq = ['affiliate_partner_id = ?', ref_id]
else
qq = ['affiliate_partner_id IS NOT NULL']
end
@users ||= rel.where(qq)
end
end
end

View File

@ -8,27 +8,32 @@ ActiveAdmin.register JamRuby::User, :as => 'Referrals' do
config.filters = true
filter :affiliate_referral
filter :email
## scope("Has Signups", default: true) { |scope| scope.where('visits != 0 or signups != 0').order('day desc') }
index do
column 'User' do |oo| link_to(oo.name, oo.admin_url, {:title => oo.name}) end
column 'Email' do |oo| oo.email end
column 'User Email' do |oo| oo.email end
column 'Created' do |oo| oo.created_at end
column 'Partner' do |oo| oo.affiliate_referral.display_name end
column 'Partner ID' do |oo| oo.affiliate_referral.id end
column 'Partner Name' do |oo| oo.affiliate_referral.display_name end
column 'Partner User' do |oo| link_to(oo.affiliate_referral.partner_user.name, admin_user_path(oo.affiliate_referral.partner_user.id), { :title => oo.affiliate_referral.partner_user.name }) end
end
controller do
def scoped_collection
rel = end_of_association_chain
.includes([:affiliate_referral])
.order('created_at DESC')
if (ref_id = params[AffiliatePartner::PARAM_REFERRAL]).present?
qq = ['affiliate_referral_id = ?', ref_id]
else
qq = ['affiliate_referral_id IS NOT NULL']
end
@users ||= rel.where(qq)
def scoped_collection
rel = end_of_association_chain
.includes([:affiliate_referral])
.order('created_at DESC')
if (ref_id = params[AffiliatePartner::PARAM_REFERRAL]).present?
qq = ['affiliate_referral_id = ?', ref_id]
else
qq = ['affiliate_referral_id IS NOT NULL']
end
@users ||= rel.where(qq)
end
end
end

View File

@ -5,26 +5,104 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
config.sort_order = 'referral_user_count DESC'
config.batch_actions = false
# config.clear_action_items!
config.filters = false
config.per_page = 50
config.filters = true
config.per_page = 100
config.paginate = true
form :partial => 'form'
#form :partial => 'form'
scope("Active", default: true) { |scope| scope.where('partner_user_id IS NOT NULL').order('referral_user_count desc') }
#filter :partner_user
filter :partner_name
filter :id
filter :current_quarter_in_cents
filter :cumulative_earnings_in_cents
filter :jamtracks_sold
filter :subscriptions_count
filter :referral_user_count
scope("Sorted By Current Quarter", default: true) { |scope| scope.where('partner_user_id IS NOT NULL').order('current_quarter_in_cents desc') }
scope("Sorted By Jamtracks Sold", default: false) { |scope| scope.where('partner_user_id IS NOT NULL').order('jamtracks_sold desc') }
scope("Sorted By Subs", default: false) { |scope| scope.where('partner_user_id IS NOT NULL').order('subscriptions_count desc') }
scope("Sorted By Signups", default: false) { |scope| scope.where('partner_user_id IS NOT NULL').order('referral_user_count desc') }
scope("Sorted By Newest First") { |scope| scope.where('partner_user_id IS NOT NULL').order('id desc') }
scope("Any") { |scope| scope.where('partner_user_id IS NOT NULL').order('referral_user_count desc') }
scope("Unpaid") { |partner| partner.unpaid }
controller do
helper 'active_admin/subscription'
end
form do |f|
f.inputs 'Fields' do
f.input(:partner_name, :input_html => { :maxlength => 128 })
f.input(:partner_user, as: :searchable_select, hint: 'This person is the owner of the affiliate. Has access to reporting info in account section of www.jamkazam.com')
f.input(:entity_type, :as => :select, :collection => AffiliatePartner::ENTITY_TYPES)
f.input(:rate)
f.input(:paypal_id)
end
f.actions
end
index do
# actions # use this for all view/edit/delete links
column 'User' do |oo| link_to(oo.partner_user.name, admin_user_path(oo.partner_user.id), {:title => oo.partner_user.name}) end
column 'Name' do |oo| oo.partner_name end
column 'Type' do |oo| oo.entity_type end
column 'Code' do |oo| oo.id end
column 'Referral Count' do |oo| oo.referral_user_count end
column 'Earnings' do |oo| sprintf("$%.2f", oo.cumulative_earnings_in_dollars) end
column 'Amount Owed' do |oo| sprintf("$%.2f", oo.due_amount_in_cents.to_f / 100.to_f) end
column 'User' do |oo|
link_to(oo.partner_user.name, admin_user_path(oo.partner_user.id), { :title => oo.partner_user.name })
end
column 'Name' do |oo|
oo.partner_name
end
column 'Type' do |oo|
oo.entity_type
end
column 'Code' do |oo|
oo.id
end
column 'Signups' do |oo|
oo.referral_user_count
end
column 'JamTracks' do |oo|
oo.jamtracks_sold
end
column 'Subs' do |oo|
oo.subscriptions_count
end
column 'Cum Earnings' do |oo|
div do
sprintf("Tot $%.2f", oo.cumulative_earnings_in_dollars)
end
div do
sprintf("Jam $%.2f", oo.jamtrack_cumulative_earnings_in_dollars)
end
div do
sprintf("Sub $%.2f", oo.subscriptions_cumulative_earnings_in_dollars)
end
end
column 'Current Quarter' do |oo|
div do
sprintf("Tot $%.2f", oo.current_quarter_in_dollars)
end
div do
sprintf("Jam $%.2f", oo.jamtrack_current_quarter_in_dollars)
end
div do
sprintf("Sub $%.2f", oo.subscriptions_current_quarter_in_dollars)
end
end
column 'Amount Owed' do |oo|
div do
sprintf("Tot $%.2f", oo.due_amount_in_cents.to_f / 100.to_f)
end
div do
sprintf("Jam $%.2f", oo.jamtrack_due_amount_in_cents.to_f / 100.to_f)
end
div do
sprintf("Sub $%.2f", oo.subscription_due_amount_in_cents.to_f / 100.to_f)
end
end
column 'Pay Actions' do |oo|
link_to('Mark Paid', mark_paid_admin_affiliate_path(oo.id), :confirm => "Mark this affiliate as PAID?") if oo.unpaid
end
@ -32,6 +110,31 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
actions
end
show do |affiliate_partner|
attributes_table do
row :id
row :partner_name
row :entity_type
row :rate
row :address
row :tax_identifier
row :paypal_id
row :venmo_user_id
row :jamtracks_sold
row :subscriptions_count
row :cumulative_earnings_in_dollars
row :jamtrack_cumulative_earnings_in_dollars
row :subscriptions_cumulative_earnings_in_dollars
row :current_quarter_in_dollars
row :jamtrack_current_quarter_in_dollars
row :subscriptions_current_quarter_in_dollars
end
render 'earnings', { affiliate_partner: affiliate_partner }
end
action_item :only => [:show] do
link_to("Mark Paid",

View File

@ -0,0 +1,21 @@
ActiveAdmin.register JamRuby::AppFeature, as: 'App Features' do
menu parent: 'Misc', label: 'App Features'
config.sort_order = 'created_at ASC'
config.batch_actions = false
config.filters = false
config.per_page = 50
config.paginate = true
form do |f|
f.inputs 'Fields' do
f.input(:feature_type, as: :select, collection: JamRuby::AppFeature::FEATURE_TYPES)
f.input(:handle, :input_html => { :maxlength => 1025 })
f.input(:is_enabled, as: :boolean)
f.input(:env, as: :select, collection: %w(production staging development))
end
f.actions
end
end

View File

@ -3,7 +3,7 @@ ActiveAdmin.register JamRuby::GenericState, :as => 'GenericState' do
config.clear_action_items!
filter :env
permit_params :top_message, :event_page_top_logo_url, :connection_policy
permit_params :top_message, :event_page_top_logo_url, :customer_ltv, :connection_policy
actions :all, :except => [:destroy]

View File

@ -1,5 +1,11 @@
ActiveAdmin.register JamRuby::User, :as => 'Users' do
searchable_select_options(scope: User.all,
text_attribute: :username,
filter: lambda do |term, scope|
scope.ransack(full_name_or_email_cont: term).result
end)
collection_action :autocomplete_user_email, :method => :get
actions :all, :except => [:destroy]
@ -17,6 +23,116 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
form :partial => "form"
action_item :school_user, only: :index do
link_to "Quick Add School User", add_school_user_admin_users_path
end
action_item :latency, only: :show do
link_to 'Show Latency', latency_admin_user_path(resource)
end
collection_action :add_school_user, method: [:get, :post] do
if request.post?
@client = RecurlyClient.new
errors = []
user_params = params[:jam_ruby_user]
user_type = user_params[:user_type].strip
school_id = user_params[:school_id].strip
return (render text: "Please select school") if school_id.blank?
first_name = user_params[:first_name].strip
last_name = user_params[:last_name].strip
email = user_params[:email].strip.downcase
license_start = user_params[:license_start].strip
license_end = user_params[:license_end].strip
import_source = user_params[:import_source].strip
password = SecureRandom.uuid
options = {
first_name: first_name,
last_name: last_name,
email: email,
license_start: license_start,
license_end: license_end,
import_source: import_source,
terms_of_service: true,
musician: true,
skip_recaptcha: true,
password: password,
password_confirmation: password
}
options.merge!({ school_id: school_id }) if school_id.present?
instrument = Instrument.find('electric guitar')
instruments = [{instrument_id: instrument.id, proficiency_level: 3, priority: 1}]
options[:instruments] = instruments
parse_user_type(user_type, options)
@user = User.find_by_email(options[:email])
unless @user.nil?
@user.user_type = user_type
#if @user.import_source.nil?
#TODO: do we need to have following 3 lines for an existing user?
@user.import_source = options[:import_source]
@user.license_start = options[:license_start]
@user.license_end = options[:license_end]
if options[:student]
@user.school_id = options[:school_id]
@user.is_a_student = true
elsif options[:teacher]
@user.school = school
if @user.teacher.nil?
@user.teacher = Teacher.build_teacher(@user, validate_introduction: true, biography: "Empty biography", school_id: school.id)
end
elsif options[:platform_instructor]
@user.is_platform_instructor = true
end
if @user.save
@client.sync_subscription(@user)
if options[:student]
UserMailer.school_welcome_message(@user, nil).deliver_now
elsif options[:teacher]
UserMailer.school_welcome_message(@user, nil).deliver_now
elsif options[:platform_instructor]
end
end
if @user.errors.any?
flash[:error] = "Error updating User #{@user.name} #{@user.email}"
render :add_school_user
else
flash[:notice] = "User #{@user.name} #{@user.email} updated successfully"
redirect_to admin_users_path
end
#end
else
@user = User.signup(options)
if @user.errors.none?
@client.sync_subscription(@user)
puts "User #{@user.email} created"
flash[:notice] = "User #{@user.name} #{@user.email} added successfully"
redirect_to admin_users_path
else
flash[:error] = "Error adding school user"
render :add_school_user
end
end
else
@user = User.new
@user.import_source = 'Manual'
end
end
member_action :update_school_user, method: [:get, :put] do
end
member_action :delete_forever, :method => :get do
resource.permanently_delete
redirect_to :back, {notice: 'User email and login credentials have been permanently changed'}
@ -74,6 +190,12 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
redirect_to :back, {notice: "Check the Subscription Plan Code, Subscription Sync Code, Subscription Sync Msg"}
end
member_action :reset_monthly_play, :method => :get do
resource.used_month_play_time = 0
resource.save!
redirect_to :back, {notice: "Reset user's monthly play time to 0"}
end
member_action :change_to_plan, :method => :get do
@client = RecurlyClient.new
plan_code = params[:plan_code]
@ -108,7 +230,28 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
end
member_action :latency, method: :get do
@user = resource
latency_url = "#{Rails.application.config.latency_data_host}/user/#{@user.id}"
uri = URI(latency_url)
begin
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if Rails.application.config.latency_data_host.start_with?("https://")
req = Net::HTTP::Get.new(uri.request_uri)
req["Authorization"] = "Basic #{Rails.application.config.latency_data_host_auth_code}"
req["Content-Type"] = "application/json"
response = http.request(req)
render text: "404 Not Found", status: 404 if response.is_a?(Net::HTTPNotFound)
#render json: response.body, status: 200 if response.is_a?(Net::HTTPOK) || response.is_a?(Net::HTTPSuccess)
@user_latency = response.body
rescue => e
render text: e.message
end
end
show do |user|
panel "Common" do
@ -128,6 +271,7 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
row :gender
row :email_confirmed
row :remember_token
=begin
row "Session Ready" do |user|
div do
if user.ready_for_session_at
@ -154,6 +298,7 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
end
end
end
=end
row "Delete Forever" do |user|
span do
link_to("delete forever", delete_forever_admin_user_path(user.id), :data => {:confirm => 'Are you sure?'})
@ -201,6 +346,24 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
row :subscription_sync_msg
row :is_past_due
row :stored_credit_card
row "Monthly Time Used" do |user|
div do
remaining_month_play_time = user.subscription_rules[:remaining_month_play_time]
if remaining_month_play_time.nil?
span do
"No limit"
end
elsif user.played_this_month?
span do
"Used: #{user.used_month_play_time / 60} min | Remaining #{remaining_month_play_time / 60} min"
end
else
span do
"Did not play this month. Last played #{user.used_current_month}"
end
end
end
end
end
end
div do
@ -225,25 +388,44 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
'sets secret override to give user a free plan (link goes to another page)'
end
div do
link_to("Give No-Payment Plan", edit_admin_subscription_path(user.id))
link_to("give no-payment plan", edit_admin_user_override_path(user.id))
end
end
div do
h3 do
'Reset Monthly Play Time'
end
h4 do
'sets the user\'s monthly play time to 0'
end
div do
link_to("reset monthly play time", reset_monthly_play_admin_user_path(user.id), :data => {:confirm => 'Are you sure?'})
end
end
div do
h3 do
'Change Plan Actions'
end
h4 do
'Change desired plan xactly as if the user did it on /client#/accounts/subscription'
'Change desired plan exactly as if the user did it on /client#/accounts/subscription'
end
div do
link_to("change plan to silver", change_to_plan_admin_user_path(user.id, 'jamsubsilver'), :data => {:confirm => 'Are you sure?'})
link_to("change plan to silver monthly", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubsilver'), :data => {:confirm => 'Are you sure?'})
end
div do
link_to("change plan to gold", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubgold'), :data => {:confirm => 'Are you sure?'})
link_to("change plan to gold monthly", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubgold'), :data => {:confirm => 'Are you sure?'})
end
div do
link_to("change plan to platinum", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubplatinum'), :data => {:confirm => 'Are you sure?'})
link_to("change plan to platinum monthly", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubplatinum'), :data => {:confirm => 'Are you sure?'})
end
div do
link_to("change plan to silver yearly", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubsilveryearly'), :data => {:confirm => 'Are you sure?'})
end
div do
link_to("change plan to gold yearly", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubgoldyearly'), :data => {:confirm => 'Are you sure?'})
end
div do
link_to("change plan to platinum yearly", change_to_plan_admin_user_path(user.id, plan_code: 'jamsubplatinumyearly'), :data => {:confirm => 'Are you sure?'})
end
div do
link_to("change plan to free", change_to_plan_admin_user_path(user.id, plan_code: ''), :data => {:confirm => 'Are you sure?'})
@ -293,35 +475,56 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
end
end
panel "Onboarding" do
attributes_table do
row :onboarding_status
row "Support Consultant" do |user|
if user.onboarder
link_to "#{user.onboarder.name} (#{user.onboarder.onboarding_users.count})", user.onboarder.admin_url
else
panel "School" do
div do
attributes_table do
row "School" do |user|
span do
if user.school
link_to user.school.name, admin_school_path(user.school), target: '_blank'
end
end
end
if user.school
row :license_start
row :license_end
row :is_platform_instructor
end
end
row "Signup" do
user.created_at.to_date
end
row "Assigned", :onboarder_assigned_at
row "Email 1", :onboarding_email_1_sent_at
row "Email 2", :onboarding_email_2_sent_at
row "Email 3", :onboarding_email_3_sent_at
row "Email 4", :onboarding_email_4_sent_at
row "Email 5", :onboarding_email_5_sent_at
row "Test Session Scheduled Time", :onboarding_test_session_at
row "When Test Session Was Requested", :onboarding_test_session_at
row "Test Session Outcome", :onboarding_test_session_outcome
row "Notes", :onboarding_onboarder_notes
row "Lost Reason", :onboarding_lost_reason
row "Lost At", :onboarding_lost_at
row "Escalated Reason", :onboarding_escalation_reason
row "Escalated At", :onboarding_escalated_at
end
end
# panel "Onboarding" do
# attributes_table do
# row :onboarding_status
# row "Support Consultant" do |user|
# if user.onboarder
# link_to "#{user.onboarder.name} (#{user.onboarder.onboarding_users.count})", user.onboarder.admin_url
# else
# end
# end
# row "Signup" do
# user.created_at.to_date
# end
# row "Assigned", :onboarder_assigned_at
# row "Email 1", :onboarding_email_1_sent_at
# row "Email 2", :onboarding_email_2_sent_at
# row "Email 3", :onboarding_email_3_sent_at
# row "Email 4", :onboarding_email_4_sent_at
# row "Email 5", :onboarding_email_5_sent_at
# row "Test Session Scheduled Time", :onboarding_test_session_at
# row "When Test Session Was Requested", :onboarding_test_session_at
# row "Test Session Outcome", :onboarding_test_session_outcome
# row "Notes", :onboarding_onboarder_notes
# row "Lost Reason", :onboarding_lost_reason
# row "Lost At", :onboarding_lost_at
# row "Escalated Reason", :onboarding_escalation_reason
# row "Escalated At", :onboarding_escalated_at
# end
# end
=begin
panel "Teacher Setting" do
attributes_table do
@ -387,6 +590,8 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
end
=end
panel "JamTracks" do
div do
link_to "Give JamTrack", "../jam_track_rights/new"
@ -416,32 +621,31 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
links << link_to("Edit", edit_resource_path(user), :class => "member_link edit_link")
links
end
column "ID" do |user|
link_to(truncate(user.id, {:length => 12}),
resource_path(user),
{:title => user.id})
end
column "Email" do |user|
link_to user.email, resource_path(user)
end
column :admin
column :subscription_plan_code
column :desired_plan_code
column :created_at
column :musician do |user|
user.musician? ? true : false
end
column :city
column :state
column :first_name
column :last_name
column :city
column :state
end
controller do
# this actually searches on first name, last name, and email, because of get_autocomplete_items defined below
autocomplete :user, :email, :full => true, :display_value => :autocomplete_display_name
autocomplete :user, :email, :full => true, :display_value => :autocomplete_display_name, extra_data: [:last_jam_addr]
def get_autocomplete_items(parameters)
User.select("email, first_name, last_name, id").where(["email ILIKE ? OR first_name ILIKE ? OR last_name ILIKE ?", "%#{parameters[:term]}%", "%#{parameters[:term]}%", "%#{parameters[:term]}%"])
term = parameters[:term]
if term.include?('@')
User.select("email, first_name, last_name, id, last_jam_addr").where(["email = ?", term]).limit(5)
else
User.select("email, first_name, last_name, id, last_jam_addr").where(["email ILIKE ? OR first_name ILIKE ? OR last_name ILIKE ?", "%#{term}%", "%#{term}%", "%#{term}%"]).limit(40)
end
end
@ -463,7 +667,6 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
@user = resource
@user.email = params[:jam_ruby_user][:email]
@user.admin = params[:jam_ruby_user][:admin]
@user.is_onboarder = params[:jam_ruby_user][:is_onboarder]
@user.subscribe_email = params[:jam_ruby_user][:subscribe_email]
@user.musician = params[:jam_ruby_user][:musician]
@user.first_name = params[:jam_ruby_user][:first_name]
@ -500,6 +703,97 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
redirect_to edit_admin_user_path(@user)
end
def user_latency_recommendation
recommendation_params = params[:latency_recommendation]
offset = recommendation_params[:offset].blank?? 0 : recommendation_params[:offset]
limit = recommendation_params[:limit].blank?? 20 : recommendation_params[:limit]
is_valid = [
recommendation_params[:my_user_id],
recommendation_params[:my_public_ip]
].all?{ |param|
param.present?
}
if is_valid
instruments = []
instruments << recommendation_params[:instruments_beginner].reject(&:blank?).map{|i| { id: i, proficiency: 1} }
instruments << recommendation_params[:instruments_advanced].reject(&:blank?).map{|i| { id: i, proficiency: 2} }
instruments << recommendation_params[:instruments_expert].reject(&:blank?).map{|i| { id: i, proficiency: 3} }
instruments.flatten!
genres = recommendation_params[:genres].reject(&:blank?)
wifi = recommendation_params[:wifi]
max_latency = recommendation_params[:max_latency]
data = {
my_user_id: recommendation_params[:my_user_id],
my_public_ip: recommendation_params[:my_public_ip],
offset: offset,
limit: limit
}
data.merge!({query: recommendation_params[:query]}) unless recommendation_params[:query].blank?
data.merge!({instruments: instruments}) unless instruments.empty?
data.merge!({genres: genres}) unless genres.empty?
data.merge!({wifi: wifi}) if %w(true false).include?(wifi)
data.merge!({max_latency: max_latency}) unless max_latency.blank?
latency_url = "#{Rails.application.config.latency_data_host}/recommendations"
uri = URI(latency_url)
begin
http = Net::HTTP.new(uri.host, uri.port)
http.read_timeout = 5
http.use_ssl = true if Rails.application.config.latency_data_host.start_with?("https://")
request = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
request.body = data.to_json
request["Authorization"] = "Basic #{Rails.application.config.latency_data_host_auth_code}"
response = http.request(request)
@latency_recommendation = response.body
rescue => exception
render text: exception.message
end
else
flash[:error] = 'Please provide all required fields'
redirect_to admin_latency_recommendation_path
end
end
def user_latencies
latency_params = params[:latencies]
latency_url = "#{Rails.application.config.latency_data_host}/user_latencies"
uri = URI(latency_url)
if not ([latency_params[:my_user_id], latency_params[:my_public_ip], latency_params[:user_1_id]]).any?{|param| param.blank? }
user_ids = [latency_params[:user_1_id]]
user_ids.push(latency_params[:user_2_id]) unless latency_params[:user_2_id].blank?
user_ids.push(latency_params[:user_3_id]) unless latency_params[:user_3_id].blank?
user_ids.push(latency_params[:user_4_id]) unless latency_params[:user_4_id].blank?
user_ids.push(latency_params[:user_5_id]) unless latency_params[:user_5_id].blank?
begin
http = Net::HTTP.new(uri.host, uri.port)
http.read_timeout = 5
http.use_ssl = true if Rails.application.config.latency_data_host.start_with?("https://")
request = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
request.body = {
my_user_id: latency_params[:my_user_id],
my_public_ip: latency_params[:my_public_ip],
users: user_ids
}.to_json
request["Authorization"] = "Basic #{Rails.application.config.latency_data_host_auth_code}"
response = http.request(request)
@user_latencies = response.body
#render text: JSON.pretty_generate(@user_latencies)
rescue => e
render text: e.message
end
else
flash[:error] = 'Please provide all required fields'
redirect_to admin_latency_between_users_path
end
end
end
end

View File

@ -17,6 +17,14 @@ ActiveAdmin.register JamRuby::JamTrackRight, :as => 'JamTrackRights' do
filter :jam_track
controller do
def create
jt_params = params[:jam_ruby_jam_track_right]
jt_params[:jam_track] =JamRuby::JamTrack.where("id=?", jt_params[:jam_track_id_val]).first # jt_params[:jam_track_id_val]
jt_params[:user] = JamRuby::User.where("id=?", jt_params[:user_id_val]).first # jt_params[:user_id_val]
create!
end
end
index do
actions
@ -47,9 +55,14 @@ ActiveAdmin.register JamRuby::JamTrackRight, :as => 'JamTrackRights' do
form do |f|
f.inputs 'New Jam Track Right' do
f.input :jam_track, :required=>true, collection: JamTrack.all, include_blank: false
f.input :user, :required=>true, collection: User.all, include_blank: false
f.input :can_download, :required => true, as: :boolean
#f.input :jam_track, :required=>true, collection: JamTrack.all, include_blank: false
f.input :jam_track_id_val, :required=>true, :as => :hidden
f.input :jam_track, :required=>true, :as => :autocomplete, :url => autocomplete_jam_track_name_admin_jam_tracks_path, hint: 'Select a jamtrack to give to this user'
#f.input :user, :required=>true, collection: User.all, include_blank: false
f.input :user_id_val, :required=>true, :as => :hidden
f.input :user, :required=>true, :as => :autocomplete, :url => autocomplete_user_email_admin_users_path, hint: 'Give a free jamtrack to this user'
f.input :can_download, :required => true, as: :boolean, :input_html => { :checked => 'checked' }
end
f.actions
end

View File

@ -1,5 +1,7 @@
ActiveAdmin.register JamRuby::JamTrack, :as => 'JamTracks' do
collection_action :autocomplete_jam_track_name, :method => :get
menu :label => 'JamTracks', :parent => 'JamTracks'
config.sort_order = 'name_asc'
@ -19,6 +21,19 @@ ActiveAdmin.register JamRuby::JamTrack, :as => 'JamTracks' do
form :partial => 'form'
controller do
# this actually searches on first name, last name, and email, because of get_autocomplete_items defined below
autocomplete :jam_track, :name, :full => true, :display_value => :autocomplete_display_name
def get_autocomplete_items(parameters)
JamTrack.select("name, original_artist, id").where(["name ILIKE ? OR original_artist ILIKE ?", "%#{parameters[:term]}%", "%#{parameters[:term]}%"])
end
end
index do
# actions # use this for all view/edit/delete links

View File

@ -0,0 +1,185 @@
class Spacer
def self.spacer(val, row)
percentage = ((val * 100) / row.total.to_f).round(1).to_s
('%-5.5s' % percentage).gsub(' ', '&nbsp;') + '%&nbsp;-&nbsp;' + val.to_s
end
end
=begin
select
count(id) as total,
count(first_downloaded_client_at) as downloaded,
count(first_ran_client_at) as ran_client,
count(first_certified_gear_at) as ftue,
count(first_music_session_at) as any_session,
count(first_real_music_session_at) as real_session,
count(first_good_music_session_at) as good_session,
count(first_invited_at) as invited,
count(first_friended_at) as friended,
count(first_subscribed_at) as subscribed
from users where users.created_at >= '2024-11-01' AND users.created_at < '2025-04-01'
select first_name, last_name, email
from users where users.created_at >= '2024-11-01' AND users.created_at < '2025-04-01'
AND first_music_session_at is NULL;
=end
ActiveAdmin.register_page "Jammers Subscription Cohorts" do
menu :parent => 'Reports'
content :title => "Jammers Subscription Cohorts" do
filter_type = params[:filter_type] || 'All'
filter_campaign = params[:filter_campaign]
filter_campaign_id = params[:filter_campaign_id]
filter_ad_set = params[:filter_ad_set]
filter_ad_name = params[:filter_ad_name]
campaigns = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_utm_campaign).compact.sort
campaign_ids = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_id).compact.sort
ad_sets = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_term).compact.sort
ad_names = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_content).compact.sort
div style: "margin-bottom: 20px; padding: 10px; background-color: #f4f4f4; border-radius: 4px;" do
form action: admin_jammers_subscription_cohorts_path, method: :get do
span "Source: ", style: "font-weight: bold; margin-right: 5px;"
select name: 'filter_type', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
option "All", value: 'All', selected: filter_type == 'All'
option "Organic", value: 'Organic', selected: filter_type == 'Organic'
option "Advertising", value: 'Advertising', selected: filter_type == 'Advertising'
end
if filter_type == 'Advertising'
div style: "margin-top: 10px;" do
span "Campaign Name: ", style: "font-weight: bold; margin-right: 5px;"
select name: 'filter_campaign', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
option "All", value: ''
option "Null", value: 'NULL', selected: filter_campaign == 'NULL'
campaigns.each do |c|
option c, value: c, selected: filter_campaign == c
end
end
end
div style: "margin-top: 10px;" do
span "Campaign ID: ", style: "font-weight: bold; margin-right: 5px;"
select name: 'filter_campaign_id', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
option "All", value: ''
option "Null", value: 'NULL', selected: filter_campaign_id == 'NULL'
campaign_ids.each do |c|
option c, value: c, selected: filter_campaign_id == c
end
end
end
div style: "margin-top: 10px;" do
span "Ad Set: ", style: "font-weight: bold; margin-right: 5px;"
select name: 'filter_ad_set', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
option "All", value: ''
option "Null", value: 'NULL', selected: filter_ad_set == 'NULL'
ad_sets.each do |c|
option c, value: c, selected: filter_ad_set == c
end
end
div style: "margin-top: 10px;" do
span "Ad Name: ", style: "font-weight: bold; margin-right: 5px;"
select name: 'filter_ad_name', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
option "All", value: ''
option "Null", value: 'NULL', selected: filter_ad_name == 'NULL'
ad_names.each do |c|
option c, value: c, selected: filter_ad_name == c
end
end
end
end
end
noscript { input type: :submit, value: "Filter" }
end
end
h2 "Users Grouped By Month as Paying Subscribers"
query = User.select(%Q{date_trunc('month', users.created_at) as month,
count(id) as total,
count(first_downloaded_client_at) as downloaded,
count(first_ran_client_at) as ran_client,
count(first_certified_gear_at) as ftue,
count(first_music_session_at) as any_session,
count(first_real_music_session_at) as real_session,
count(first_good_music_session_at) as good_session,
count(first_invited_at) as invited,
count(first_friended_at) as friended,
count(first_subscribed_at) as subscribed,
count(first_played_jamtrack_at) as played_jamtrack
})
.joins(%Q{LEFT JOIN LATERAL (
SELECT
j.created_at
FROM
jam_track_rights as j
WHERE
j.user_id = users.id
ORDER BY
j.created_at
LIMIT 1 -- Select only that single row
) j ON TRUE })
if filter_type == 'Organic'
query = query.where("users.origin_utm_source = 'organic'")
elsif filter_type == 'Advertising'
query = query.where("origin_utm_medium = 'cpc'")
if filter_campaign.present?
if filter_campaign == 'NULL'
query = query.where("users.origin_utm_campaign IS NULL")
elsif filter_campaign != 'All'
query = query.where("users.origin_utm_campaign = ?", filter_campaign)
end
end
if filter_campaign_id.present?
if filter_campaign_id == 'NULL'
query = query.where("users.origin_id IS NULL")
elsif filter_campaign_id != 'All'
query = query.where("users.origin_id = ?", filter_campaign_id)
end
end
if filter_ad_set.present?
if filter_ad_set == 'NULL'
query = query.where("users.origin_term IS NULL")
elsif filter_ad_set != 'All'
query = query.where("users.origin_term = ?", filter_ad_set)
end
end
if filter_ad_name.present?
if filter_ad_name == 'NULL'
query = query.where("users.origin_content IS NULL")
elsif filter_ad_name != 'All'
query = query.where("users.origin_content = ?", filter_ad_name)
end
end
end
table_for query.group("date_trunc('month', users.created_at)")
.where("j.created_at IS NULL OR (j.created_at - users.created_at) >= INTERVAL '2 hours'")
.order("date_trunc('month', users.created_at) DESC") do |row|
column "Month", Proc.new { |user| user.month.strftime('%B %Y') }
column "Total", :total
column "Subscribed", Proc.new { |user| raw(Spacer.spacer(user.subscribed, user)) }
column "Downloaded", Proc.new { |user| raw(Spacer.spacer(user.downloaded, user)) }
column "Ran Client", Proc.new { |user| raw(Spacer.spacer(user.ran_client, user)) }
column "FTUE", Proc.new { |user| raw(Spacer.spacer(user.ftue, user)) }
column "Any Session", Proc.new { |user| raw(Spacer.spacer(user.any_session, user)) }
column "2+ Session", Proc.new { |user| raw(Spacer.spacer(user.real_session, user)) }
column "Good Session", Proc.new { |user| raw(Spacer.spacer(user.good_session, user)) }
column "Invited", Proc.new { |user| raw(Spacer.spacer(user.invited, user)) }
column "Friended", Proc.new { |user| raw(Spacer.spacer(user.friended, user)) }
column "Played JT", Proc.new { |user| raw(Spacer.spacer(user.played_jamtrack, user)) }
end
end
end

View File

@ -0,0 +1,73 @@
class Spacer
def self.spacer(val, row)
percentage = ((val * 100) / row.total.to_f).round(1).to_s
('%-5.5s' % percentage).gsub(' ', '&nbsp;') + '%&nbsp;-&nbsp;' + val.to_s
end
end
=begin
select
count(id) as total,
count(first_downloaded_client_at) as downloaded,
count(first_ran_client_at) as ran_client,
count(first_certified_gear_at) as ftue,
count(first_music_session_at) as any_session,
count(first_real_music_session_at) as real_session,
count(first_good_music_session_at) as good_session,
count(first_invited_at) as invited,
count(first_friended_at) as friended,
count(first_subscribed_at) as subscribed
from users where users.created_at >= '2024-11-01' AND users.created_at < '2025-04-01'
select first_name, last_name, email
from users where users.created_at >= '2024-11-01' AND users.created_at < '2025-04-01'
AND first_music_session_at is NULL;
=end
ActiveAdmin.register_page "JamTrack Subscription Cohorts" do
menu :parent => 'Reports'
content :title => "JamTrack Subscription Cohorts" do
h2 "Users Grouped By Month as Paying Subscribers"
table_for User.select(%Q{date_trunc('month', users.created_at) as month,
count(id) as total,
count(first_downloaded_client_at) as downloaded,
count(first_ran_client_at) as ran_client,
count(first_certified_gear_at) as ftue,
count(first_music_session_at) as any_session,
count(first_real_music_session_at) as real_session,
count(first_good_music_session_at) as good_session,
count(first_invited_at) as invited,
count(first_friended_at) as friended,
count(first_subscribed_at) as subscribed,
count(first_played_jamtrack_at) as played_jamtrack
})
.joins(%Q{INNER JOIN LATERAL (
SELECT
j.created_at
FROM
jam_track_rights as j
WHERE
j.user_id = users.id
ORDER BY
j.created_at
LIMIT 1 -- Select only that single row
) j ON (j.created_at - users.created_at) < INTERVAL '2 hours' })
.group("date_trunc('month', users.created_at)").order("date_trunc('month', users.created_at) DESC") do |row|
column "Month", Proc.new { |user| user.month.strftime('%B %Y') }
column "Total", :total
column "Subscribed", Proc.new { |user| raw(Spacer.spacer(user.subscribed, user)) }
column "Downloaded", Proc.new { |user| raw(Spacer.spacer(user.downloaded, user)) }
column "Ran Client", Proc.new { |user| raw(Spacer.spacer(user.ran_client, user)) }
column "FTUE", Proc.new { |user| raw(Spacer.spacer(user.ftue, user)) }
column "Any Session", Proc.new { |user| raw(Spacer.spacer(user.any_session, user)) }
column "2+ Session", Proc.new { |user| raw(Spacer.spacer(user.real_session, user)) }
column "Good Session", Proc.new { |user| raw(Spacer.spacer(user.good_session, user)) }
column "Invited", Proc.new { |user| raw(Spacer.spacer(user.invited, user)) }
column "Friended", Proc.new { |user| raw(Spacer.spacer(user.friended, user)) }
column "Played JT", Proc.new { |user| raw(Spacer.spacer(user.played_jamtrack, user)) }
end
end
end

View File

@ -7,22 +7,25 @@ ActiveAdmin.register_page "SchoolUserUploads" do
puts params
@client = RecurlyClient.new
file = params[:jam_ruby_user][:csv]
created = 0
already_existing = 0
array_of_arrays = CSV.read(file.tempfile.path, headers:true, encoding: 'bom|utf-8')
errors = 0
updated = 0
skipped = 0
array_of_arrays = CSV.read(file.tempfile.path, headers: true, encoding: 'bom|utf-8')
array_of_arrays.each do |row|
school_name = row['School Name']
school_tag = row['School ID']
school_name = row['School Name'].strip
school_tag = row['School ID'].strip
school = School.autocreate_find_from_upload(school_name, school_tag)
first_name = row['First Name']
last_name = row['Last Name']
email_address = row['Email Address']
license_start = parse_date(row['License Start Date'])
license_end = parse_date(row['License End Date'])
source = row['Source']
first_name = row['First Name'].strip
last_name = row['Last Name'].strip
email_address = row['Email Address'].strip.downcase
license_start = parse_date(row['License Start Date'].strip)
license_end = parse_date(row['License End Date'].strip)
source = row['Source'].strip
password = SecureRandom.uuid
options = {
first_name: first_name,
@ -39,30 +42,80 @@ ActiveAdmin.register_page "SchoolUserUploads" do
password_confirmation: password
}
parse_user_type(row['User Type'], options)
parse_user_type(row['User Type'].strip, options)
instrument = Instrument.find('electric guitar')
instruments= [{instrument_id: instrument.id, proficiency_level: 3, priority: 1}]
options[:instruments] = instruments
user = User.signup(options)
if user.errors.any?
puts "User #{user.name} #{user.email} had errors"
puts user.errors.inspect
already_existing = already_existing + 1
existing = User.find_by_email(options[:email])
if existing
if existing.import_source.nil?
if options[:student]
existing.school = school
existing.is_a_student = true
existing.import_source = options[:import_source]
existing.license_start = options[:license_start]
existing.license_end = options[:license_end]
elsif options[:teacher]
existing.school = school
existing.import_source = options[:import_source]
existing.license_start = options[:license_start]
existing.license_end = options[:license_end]
if existing.teacher.nil?
existing.teacher = Teacher.build_teacher(existing, validate_introduction: true, biography: "Empty biography", school_id: school.id)
end
elsif options[:platform_instructor]
existing.import_source = options[:import_source]
existing.is_platform_instructor = true
existing.license_start = options[:license_start]
existing.license_end = options[:license_end]
end
existing.save
if existing.errors.any?
puts "User #{user.name} #{user.email} had errors"
puts user.errors.inspect
errors = errors + 1
else
@client.sync_subscription(existing)
updated = updated + 1
if options[:student]
UserMailer.school_welcome_message(existing, nil).deliver_now
elsif options[:teacher]
UserMailer.school_welcome_message(existing, nil).deliver_now
elsif options[:platform_instructor]
end
end
else
skipped = skipped + 1
end
else
puts "User #{user.email} created"
created = created + 1
user = User.signup(options)
if user.errors.any?
puts "User #{user.name} #{user.email} had errors"
puts user.errors.inspect
errors = errors + 1
else
@client.sync_subscription(user)
puts "User #{user.email} created"
created = created + 1
end
end
end
redirect_to admin_schooluseruploads_path, :notice => "Created #{created} school students. Ignored #{already_existing} because already existed."
redirect_to admin_schooluseruploads_path, :notice => "Created #{created}. Updated #{updated}. Errors #{errors}. Skipped #{skipped}"
end
end
content do
panel "Help" do
link_to "Download Sample CSV", asset_path("Sample_School_User_Upload.csv", target: "_blank", download: "Sample_School_User_Upload.csv")
link_to "Download Sample CSV", asset_path("Sample_School_User_Upload.csv", target: "_blank", download: "Sample_School_User_Upload.csv")
end
active_admin_form_for User.new, :url => admin_schooluseruploads_upload_schooluseruploads_path, :builder => ActiveAdmin::FormBuilder do |f|

View File

@ -1,4 +1,4 @@
ActiveAdmin.register User, :as => 'Subscription' do
ActiveAdmin.register User, :as => 'User_Override' do
menu :label => 'Subscription', :parent => 'Users'

View File

@ -0,0 +1,7 @@
ActiveAdmin.register_page "Latency Between Users" do
menu parent: 'Users'
content :title => "Latency Between Users" do
render 'admin/users/users_latency_form'
end
end

View File

@ -0,0 +1,7 @@
ActiveAdmin.register_page "Latency Recommendation" do
menu parent: 'Users'
content :title => "Latency Recommentation" do
render 'admin/users/latency_recommendation_form'
end
end

View File

@ -6,15 +6,18 @@ ActiveAdmin.register JamRuby::User, :as => 'UserSource' do
config.batch_actions = false
config.clear_action_items!
config.filters = false
config.per_page = 250
scope("Most Recent First", default: true) { |scope| scope.unscoped.order('created_at desc')}
scope("Paid", default: true) { |scope| scope.unscoped.where(:origin_utm_medium => 'cpc').order('created_at desc') }
scope("Inorganic Source") { |scope| scope.unscoped.where("origin_utm_source != 'organic' OR origin_utm_source IS NULL").order('created_at desc') }
scope("Include Organic") { |scope| scope.unscoped.order('created_at desc') }
index do
column "Email" do |user|
user.email
end
column "Bought TestDrive" do |user|
!user.most_recent_test_drive_purchase.nil? ? "Yes" : "No"
column "Signup (CST)" do |user|
user.created_at.in_time_zone("Central Time (US & Canada)")
end
column "UTM Source" do |user|
user.origin_utm_source
@ -25,8 +28,23 @@ ActiveAdmin.register JamRuby::User, :as => 'UserSource' do
column "UTM Campaign" do |user|
user.origin_utm_campaign
end
column "UTM ID" do |user|
user.origin_id
end
column "UTM Term" do |user|
user.origin_term
end
column "UTM Content" do |user|
user.origin_content
end
column "Referrer" do |user|
user.origin_referrer
end
column "FB Click ID" do |user|
user.facebook_click_id
end
column "FB Browser ID" do |user|
user.facebook_browser_id
end
end
end

View File

@ -9,11 +9,15 @@
// require jquery.ui.autocomplete
//= require cocoon
//= require active_admin/base
//= require active_admin/searchable_select
// //= require autocomplete-rails
//= require base
//= require_tree .
//= require best_in_place.jquery-ui
$(document).ready(function() {
jQuery(".best_in_place").best_in_place()
jQuery(".best_in_place").best_in_place();
$.datepicker.setDefaults({
dateFormat: 'yy-mm-dd',
});
})

View File

@ -0,0 +1,3 @@
$(document).ready(function() {
jQuery(".ac_bip").bind("ajax:success", function(){ window.location.reload(); });
})

View File

@ -0,0 +1,110 @@
function intToIP(int) {
var part1 = int & 255;
var part2 = ((int >> 8) & 255);
var part3 = ((int >> 16) & 255);
var part4 = ((int >> 24) & 255);
return part4 + "." + part3 + "." + part2 + "." + part1;
}
function handleJamTrackRightsForm() {
var $jamTrackRights = $('form#new_jam_ruby_jam_track_right');
var $jamTrack = $jamTrackRights.find('#jam_ruby_jam_track_right_jam_track_id');
var $jamTrackVal = $jamTrackRights.find('#jam_ruby_jam_track_right_jam_track_id_val')
var $user = $jamTrackRights.find('#jam_ruby_jam_track_right_user_id');
var $userVal = $jamTrackRights.find('#jam_ruby_jam_track_right_user_id_val');
$jamTrack.on('change', function(){
console.log("change jam track");
});
/**
$user.on('change', function(){
console.log("change user");
});
$jamTrack.on('focus', function(){
$userVal.val('')
});*/
$jamTrack.bind('railsAutocomplete.select', function(event, data){
$jamTrackVal.val('');
$jamTrackVal.val(data.item.id);
console.log("jam track selected with id " + data.item.id);
});
$user.bind('railsAutocomplete.select', function(event, data){
$userVal.val('');
$userVal.val(data.item.id);
console.log("user selected with id " + data.item.id);
});
}
function handleUserLatencyForm(){
var $userLatenciesForm = $('form#user_latencies_form');
var $latenciesMyUser = $userLatenciesForm.find('#latencies_my_user');
var $latenciesMyUserId = $userLatenciesForm.find('#latencies_my_user_id');
var $latenciesMyPublicIp = $userLatenciesForm.find('#latencies_my_public_ip');
$latenciesMyUser.on('focus', function(){
$latenciesMyUserId.val('')
});
$latenciesMyUser.bind('railsAutocomplete.select', function(event, data){
$latenciesMyUserId.val('');
$latenciesMyPublicIp.val('');
if(data.item.last_jam_addr){
var ipAddr = intToIP(data.item.last_jam_addr);
$latenciesMyPublicIp.val(ipAddr);
}
$latenciesMyUserId.val(data.item.id);
});
$userLatenciesForm.find('#latencies_user_1').bind('railsAutocomplete.select', function(event, data){
$userLatenciesForm.find('#latencies_user_1_id').val(data.item.id);
});
$userLatenciesForm.find('#latencies_user_2').bind('railsAutocomplete.select', function(event, data){
$userLatenciesForm.find('#latencies_user_2_id').val(data.item.id);
});
$userLatenciesForm.find('#latencies_user_3').bind('railsAutocomplete.select', function(event, data){
$userLatenciesForm.find('#latencies_user_3_id').val(data.item.id);
});
$userLatenciesForm.find('#latencies_user_4').bind('railsAutocomplete.select', function(event, data){
$userLatenciesForm.find('#latencies_user_4_id').val(data.item.id);
});
$userLatenciesForm.find('#latencies_user_5').bind('railsAutocomplete.select', function(event, data){
$userLatenciesForm.find('#latencies_user_5_id').val(data.item.id);
});
}
function handleLatencyRecommendationForm(){
var $latencyRecommendationForm = $('form#latency_recommendation_form');
var $latenciesMyUser = $latencyRecommendationForm.find('#latency_recommendation_my_user');
var $latenciesMyUserId = $latencyRecommendationForm.find('#latency_recommendation_my_user_id');
var $latenciesMyPublicIp = $latencyRecommendationForm.find('#latency_recommendation_my_public_ip');
$latenciesMyUser.on('focus', function(){
$latenciesMyUserId.val('')
});
$latenciesMyUser.bind('railsAutocomplete.select', function(event, data){
$latenciesMyUserId.val('');
$latenciesMyPublicIp.val('');
if(data.item.last_jam_addr){
var ipAddr = intToIP(data.item.last_jam_addr);
$latenciesMyPublicIp.val(ipAddr);
}
$latenciesMyUserId.val(data.item.id);
});
}
$(document).ready(function() {
handleUserLatencyForm();
handleLatencyRecommendationForm();
handleJamTrackRightsForm();
});

View File

@ -15,6 +15,7 @@
// Active Admin's got SASS!
@import "active_admin/mixins";
@import "active_admin/base";
@import "active_admin/searchable_select";
// Overriding any non-variable SASS must be done after the fact.
// For example, to change the default status-tag color:

View File

@ -38,3 +38,7 @@
width:auto;
}
}
.admin_subscription_cohorts #main_content td.col{
font-family:Courier;
}

View File

@ -2,49 +2,97 @@ class ArsesController < ApplicationController
respond_to :json
def index
if params[:code] != Rails.application.config.data_dump_code
render :json => {error: "Unauthorized"}, :status => 401
return
end
@arses = JamRuby::Ars.all
render :json => @arses
end
def update
if params[:code] != Rails.application.config.data_dump_code
render :json => {error: "Unauthorized"}, :status => 401
return
end
begin
# Primary ID lookup
@ars = JamRuby::Ars.find_by_id(params[:id])
# Explicit secondary lookups if primary ID fails
@ars ||= JamRuby::Ars.find_by_id_int(params[:id_int]) if params[:id_int]
@ars ||= JamRuby::Ars.find_by_name(params[:name]) if params[:name]
if @ars.nil?
render :json => {error: "Not Found"}, :status => 404
return
end
allowed = [:password, :username, :active, :beta, :name, :provider, :id_int, :ip, :port, :continent, :country, :city, :subdivision, :latitude, :longitude]
update_hash = {}
allowed.each do |attr|
update_hash[attr] = params[attr] if params.has_key?(attr)
end
if @ars.update_attributes(update_hash, as: :admin)
render :json => @ars, :status => :ok
else
render :json => @ars.errors, :status => :unprocessable_entity
end
rescue => e
render :json => {error: e.message, backtrace: e.backtrace.first(5)}, :status => 500
end
end
# create or update a client_artifact row
def get_or_create
name = params[:name]
provider = params[:provider]
active = params[:active]
ip = params[:ip]
username = params[:username]
password = params[:password]
topology = params[:topology]
ars_id = params[:ars_id]
puts "TOPOLOGY #{topology}"
begin
name = params[:name]
provider = params[:provider]
active = params[:active]
beta = params.has_key?(:beta) ? params[:beta] : true
ip = params[:ip]
username = params[:username]
password = params[:password]
topology = params[:topology]
ars_id = params[:ars_id]
if ars_id
ars = Ars.find_by_id_int(ars_id)
end
if ars.nil?
ars = Ars.new
ars.name = name
end
# Explicit field-based lookups
ars = nil
ars = JamRuby::Ars.find_by_id_int(ars_id) if ars_id
ars ||= JamRuby::Ars.find_by_name(name) if name
ars.provider = provider
ars.active = active
ars.ip = ip
ars.password = password
ars.username = username
if topology
ars.city = topology['city']
ars.country = topology['country']
ars.continent = topology['continent']
ars.latitude = topology['latitude']
ars.longitude = topology['longitude']
ars.subdivision = topology['subdivision']
end
ars.save
if ars.nil?
ars = JamRuby::Ars.new
ars.name = name
end
@ars = ars
unless @ars.errors.any?
@ars = Ars.find_by_name(name)
render :json => {id_int: @ars.id_int, id: @ars.id, name: @ars.name, provider: @ars.provider, active: @ars.active, ip: @ars.ip}, :status => :ok
else
response.status = :unprocessable_entity
respond_with @ars
end
ars.id_int = ars_id if !ars_id.nil?
ars.provider = provider
ars.active = active
ars.beta = params[:beta]
ars.beta = beta
ars.ip = ip
ars.password = password
ars.username = username
if topology
ars.city = topology['city']
ars.country = topology['country']
ars.continent = topology['continent']
ars.latitude = topology['latitude']
ars.longitude = topology['longitude']
ars.subdivision = topology['subdivision']
end
ars.save!
@ars = ars
render :json => {id_int: @ars.id_int, id: @ars.id, name: @ars.name, provider: @ars.provider, active: @ars.active, beta: @ars.beta, ip: @ars.ip}, :status => :ok
rescue => e
render :json => {error: e.message, backtrace: e.backtrace.first(5)}, :status => 500
end
end
end

View File

@ -0,0 +1,20 @@
module ActiveAdmin
module SubscriptionHelper
def subscription_plan_name(code)
case code
when 'jamrubysilver'
'Silver'
when 'jamrubygold'
'Gold'
when 'jamrubyplatinum'
'Platinum'
when 'jamsubgoldyearly'
'Gold Yearly'
when 'jamsubsilveryearly'
'Silver Yearly'
when 'jamsubplatinumyearly'
'Platinum Yearly'
end
end
end
end

View File

@ -39,5 +39,4 @@ module ApplicationHelper
end
end

View File

@ -1,7 +1,7 @@
module MetaHelper
def version()
"web=#{::JamAdmin::VERSION} lib=#{JamRuby::VERSION} db=#{JamDb::VERSION}"
"web=#{::JamAdmin::VERSION} lib=#{JamRuby::VERSION}"
end
end

View File

@ -112,6 +112,19 @@ class Cohort < ActiveRecord::Base
def self.cohort_users(cohort)
User.where(created_at: cohort.group_start..cohort.group_end)
end
=begin
SELECT played.user_id FROM
(SELECT user_id, COUNT(*) cnt FROM music_sessions_user_history msuh1
WHERE
msuh1.created_at >= '2024-11-01' AND
msuh1.created_at <= '202' AND
EXTRACT(EPOCH FROM (msuh1.session_removed_at - msuh1.created_at)) >= 900 AND
(SELECT COUNT(*) FROM music_sessions_user_history msuh2
WHERE msuh1.music_session_id = msuh2.music_session_id
) > 1
GROUP BY user_id
) played
=end
def _played_online_subquery(constraint)
where = if constraint.is_a?(Range)

View File

@ -0,0 +1,4 @@
<%= label_tag :customer_ltv, 'Customer LTV : $' %>
<%= best_in_place GenericState.singleton, :customer_ltv, :as => :input, url: "#{ENV['RAILS_RELATIVE_URL_ROOT']}/admin/generic_states/#{GenericState.singleton.id}", place_holder: "---", :ok_button => 'Save', :cancel_button => 'Cancel', classes: 'ac_bip' %>
<br />
<br />

View File

@ -0,0 +1,42 @@
<h3>Earnings by Month</h3>
<table class="index_table index">
<thead>
<tr>
<th>Month</th>
<th>JamTracks</th>
<th>Subscriptions</th>
<th>Affiliate Earnings</th>
</tr>
</thead>
<tbody>
<% AffiliateMonthlyPayment.index(affiliate_partner.partner_user, {})[0].each do |payment| %>
<tr>
<td>
<%= Date::MONTHNAMES[payment.month] if payment.month %>
<%= payment.year %>
</td>
<td>
<% if payment.jamtracks_sold > 0 %>
JamTracks: <%= pluralize payment.jamtracks_sold, 'unit' %>
<% end %>
</td>
<td>
<%
month_start = Date.new(payment.year, payment.month, 1)
month_end = Date.new(payment.year, payment.month, 1).end_of_month
AffiliateDistribution.subscription_plans_count(affiliate_partner.id, month_start, month_end).each do |plan_count|
%>
<div>
<%= subscription_plan_name(plan_count[:plan]) -%>: <%= pluralize(plan_count.count, 'unit') -%> sold
</div>
<%
end
%>
</td>
<td>
<%= number_to_currency(payment.due_amount_in_cents.to_f/100.0) %>
</td>
</tr>
<% end %>
</tbody>
</table>

View File

@ -2,6 +2,7 @@
<%= f.semantic_errors *f.object.errors.keys %>
<%= f.inputs do %>
<%= f.input(:partner_name, :input_html => {:maxlength => 128}) %>
<%= f.input(:partner_user, as: :searchable_select, ajax: true, hint: 'The user that manages/owns this affiliate. They can see affiliate reports') %>
<%= f.input(:entity_type, :as => :select, :collection => AffiliatePartner::ENTITY_TYPES) %>
<%= f.input(:rate) %>
<% end %>

View File

@ -2,7 +2,6 @@
= f.inputs "Details" do
= f.input :email, label: 'Email'
= f.input :admin
= f.input :is_onboarder, label: 'Is Support Consultant'
= f.input :subscribe_email, label: 'Subscribed to Emails?'
= f.input :is_platform_instructor, label: 'Is Platform Instructor?'
= f.input :gifted_jamtracks, label: 'JamTrack Credits'
@ -11,6 +10,8 @@
= f.input :city
= f.input :state
= f.input :musician
= f.input :beta
= f.input :use_video_conferencing_server
= f.inputs "Gear Mods" do
= f.input :show_frame_options, as: :boolean
= f.inputs "Do Not Shows" do

View File

@ -0,0 +1,22 @@
<%= semantic_form_for 'latency_recommendation', url: user_latency_recommendation_admin_users_path, html: {id: 'latency_recommendation_form'} do |f| %>
<%= f.inputs :name => 'Select user', :class => 'inputs' do %>
<%= f.input :my_user, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'My user name/email' %>
<%= f.input :my_user_id, as: :hidden %>
<%= f.input :my_public_ip, label: 'My user public IP' %>
<% end %>
<%= f.inputs :name => 'Query parameters', :class => 'inputs' do %>
<%= f.input :query, required: false %>
<%= f.input :instruments_beginner, collection: JamRuby::Instrument.all, input_html: { multiple: true }, required: false %>
<%= f.input :instruments_advanced, collection: JamRuby::Instrument.all, input_html: { multiple: true }, required: false %>
<%= f.input :instruments_expert, collection: JamRuby::Instrument.all, input_html: { multiple: true }, required: false %>
<%= f.input :genres, as: :select, collection: JamRuby::Genre.all, input_html: { multiple: true }, required: false %>
<%= f.input :wifi, as: :select, collection: {'Any': 'any', 'Yes': true, 'No': false }, required: false %>
<%= f.input :max_latency, required: false %>
<%= f.input :offset, input_html: { value: 0 } %>
<%= f.input :limit, input_html: { value: 20 } %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :button, label: 'Submit' %>
<%= f.action :cancel, :as => :link, label: 'Cancel' %>
<% end %>
<% end %>

View File

@ -0,0 +1,23 @@
<%= semantic_form_for 'latencies', url: user_latencies_admin_users_path, html: {id: 'user_latencies_form'} do |f| %>
<%= f.inputs :name => 'Select user', :class => 'inputs' do %>
<%= f.input :my_user, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'My user name/email' %>
<%= f.input :my_user_id, as: :hidden %>
<%= f.input :my_public_ip, label: 'My user public IP' %>
<% end %>
<%= f.inputs :name => 'Select other users', :class => 'inputs' do %>
<%= f.input :user_1, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 1' %>
<%= f.input :user_1_id, as: :hidden %>
<%= f.input :user_2, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 2', required: false %>
<%= f.input :user_2_id, as: :hidden %>
<%= f.input :user_3, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 3', required: false %>
<%= f.input :user_3_id, as: :hidden %>
<%= f.input :user_4, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 4', required: false %>
<%= f.input :user_4_id, as: :hidden %>
<%= f.input :user_5, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 5', required: false %>
<%= f.input :user_5_id, as: :hidden %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :button, label: 'Submit' %>
<%= f.action :cancel, :as => :link, label: 'Cancel' %>
<% end %>
<% end %>

View File

@ -0,0 +1,12 @@
= semantic_form_for([:admin_users, @user], builder: ActiveAdmin::FormBuilder, :url => @user.new_record? ? add_school_user_admin_users_path : "/admin/users/#{@user.id}/add_school_user") do |f|
= f.inputs "Details" do
= f.input :email, label: 'Email', required: true
= f.input :first_name, required: true
= f.input :last_name, required: true
= f.input :license_start, as: :datepicker, required: true
= f.input :license_end, as: :datepicker, required: true
= f.input :import_source, required: true
= f.input :school_id, as: :select, collection: School.all, required: true
= f.input :user_type, as: :select, collection: ['Student', 'Student Instructor', 'Platform Instructor'], include_blank: false, required: true
= f.actions

View File

@ -0,0 +1,2 @@
<h2><%= @user.name %></h2>
<pre><%= debug @user_latency -%></pre>

View File

@ -0,0 +1 @@
<pre><%= JSON.pretty_generate(JSON.parse(@user_latencies)) -%></pre>

View File

@ -0,0 +1 @@
<pre><%= JSON.pretty_generate(JSON.parse(@latency_recommendation)) -%></pre>

1
admin/bin/start_mx Executable file
View File

@ -0,0 +1 @@
BUNDLE_GEMFILE=Gemfile.alt RAILS_ENV=development LOCAL_DEV=1 MODERN_OS=1 JAM_RUBY_VERSION=2.4.1 bundle _1.17.3_ exec rails server -b 0.0.0.0 -p 3333

View File

@ -17,7 +17,7 @@ if [ -z "$BUILD_NUMBER" ]; then
GEM_VERSION="0.1.${BUILD_NUMBER}"
# copy needed gems to cache so they'll be bundled up in the debian
mkdir -p vendor/cache
cp ../db/target/ruby_package/jam_db-${GEM_VERSION}.gem vendor/cache/ || { echo "unable to copy jam-db gem"; exit 1; }
#cp ../db/target/ruby_package/jam_db-${GEM_VERSION}.gem vendor/cache/ || { echo "unable to copy jam-db gem"; exit 1; }
cp ../pb/target/ruby/jampb/jampb-${GEM_VERSION}.gem vendor/cache/ || { echo "unable to copy jam-pb gem"; exit 1; }
cp ../ruby/jam_ruby-${GEM_VERSION}.gem vendor/cache/ || { echo "unable to copy jam-ruby gem"; exit 1; }

View File

@ -131,7 +131,7 @@ module JamAdmin
config.email_smtp_starttls_auto = true
config.verify_email_enabled = false
config.musician_count = '200,000+'
config.musician_count = '300,000+'
config.facebook_app_id = ENV['FACEBOOK_APP_ID'] || '468555793186398'
config.facebook_app_secret = ENV['FACEBOOK_APP_SECRET'] || '546a5b253972f3e2e8b36d9a3dd5a06e'
@ -169,5 +169,8 @@ module JamAdmin
config.download_tracker_day_range = 30
config.max_user_ip_address = 10
config.max_multiple_users_same_ip = 2
config.latency_data_host = "https://latency-production.naas.jamkazam.com"
config.latency_data_host_auth_code = "amFtQXBpOm5pNWY0eFRjRlpNc0lXNEd4IUR5cQ=="
end
end

View File

@ -46,4 +46,7 @@ JamAdmin::Application.configure do
config.email_generic_from = 'nobody-dev@jamkazam.com'
config.email_alerts_alias = 'alerts-dev@jamkazam.com'
config.email_social_alias = 'social-dev@jamkazam.com'
config.latency_data_host = "http://localhost:4001/local"
config.latency_data_host_auth_code = "c2VydmVyOnBhc3N3b3Jk"
end

View File

@ -1,7 +1,7 @@
class Footer < ActiveAdmin::Component
def build(namespace)
super(id: "footer")
para "version info: web=#{::JamAdmin::VERSION} lib=#{JamRuby::VERSION} db=#{JamDb::VERSION}"
para "version info: web=#{::JamAdmin::VERSION} lib=#{JamRuby::VERSION}"
render :inline => include_gon
end
end

View File

@ -1,5 +1,5 @@
Bugsnag.configure do |config|
config.api_key = "7e24985b93dd922a731daca26fc2aa13"
config.api_key = "fa0e229f687bcb2c8711fcb80223744e"
#config.use_ssl = false
config.notify_release_stages = ["production"] # add 'development' if you want to test a feature locally
config.auto_notify = true

View File

@ -0,0 +1,18 @@
class JamRuby::JamTrackRight
attr_accessible :jam_track, :user, :jam_track_id_val, :user_id_val, as: :admin
def jam_track_id_val
end
def jam_track_id_val=(val)
end
def user_id_val
end
def user_id_val=(val)
end
end

View File

@ -3,4 +3,8 @@ class JamRuby::JamTrack
# add a custom validation
def autocomplete_display_name
"#{original_artist} - #{name}"
end
end

View File

@ -14,6 +14,15 @@ JamAdmin::Application.routes.draw do
namespace :admin do
resources :users do
get :autocomplete_user_email, :on => :collection
get :add_school_user, on: :collection
post :add_school_user, on: :collection
patch :add_school_user, on: :member
post :user_latencies, on: :collection
post :user_latency_recommendation, on: :collection
end
resources :jam_tracks do
get :autocomplete_jam_track_name, :on => :collection
end
end
@ -35,6 +44,8 @@ JamAdmin::Application.routes.draw do
match '/api/jam_tracks/released' => 'jam_track#dump_released', :via => :get, as: 'released_jamtracks_csv'
match '/api/arses/register' => 'arses#get_or_create', :via => :post
match '/api/arses' => 'arses#index', :via => :get
match '/api/arses/:id' => 'arses#update', :via => :post
mount Resque::Server.new, :at => "/resque"

View File

@ -1,28 +1,45 @@
class SpecDb
TEST_DB_NAME="jam_admin_test"
#TEST_DB_NAME="jam_admin_test"
def self.recreate_database(db_config)
recreate_database_jdbc(db_config)
end
def self.recreate_database_jdbc(db_config)
db_test_name = db_config["database"]
def self.reset_test_database
ENV['RAILS_ENV'] = 'test'
db_config = YAML::load(File.open('config/database.yml'))[ENV['RAILS_ENV']]
db_test_name = db_config["database"]
# jump into the 'postgres' database, just so we have somewhere to 'land' other than our test db,
# since we are going to drop/recreate it
db_config["database"] = "postgres"
ActiveRecord::Base.establish_connection(db_config)
# since we are going to drop/recreate it
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
ActiveRecord::Base.establish_connection(db_config_admin)
ActiveRecord::Base.connection.execute("DROP DATABASE IF EXISTS #{db_test_name}")
ActiveRecord::Base.connection.execute("CREATE DATABASE #{db_test_name}")
db_config["database"] = db_test_name
JamDb::Migrator.new.migrate(:dbname => db_config["database"], :user => db_config["username"], :password => db_config["password"], :host => db_config["host"])
end
def self.recreate_database_pg
conn = PG::Connection.open("dbname=postgres")
conn.exec("DROP DATABASE IF EXISTS #{TEST_DB_NAME}")
conn.exec("CREATE DATABASE #{TEST_DB_NAME}")
JamDb::Migrator.new.migrate(:dbname => TEST_DB_NAME)
def self.recreate_database
self.reset_test_database
JamRuby::TestSupport.migrate_database
end
# def self.recreate_database(db_config)
# recreate_database_jdbc(db_config)
# end
# def self.recreate_database_jdbc(db_config)
# db_test_name = db_config["database"]
# # jump into the 'postgres' database, just so we have somewhere to 'land' other than our test db,
# # since we are going to drop/recreate it
# db_config["database"] = "postgres"
# ActiveRecord::Base.establish_connection(db_config)
# ActiveRecord::Base.connection.execute("DROP DATABASE IF EXISTS #{db_test_name}")
# ActiveRecord::Base.connection.execute("CREATE DATABASE #{db_test_name}")
# db_config["database"] = db_test_name
# JamDb::Migrator.new.migrate(:dbname => db_config["database"], :user => db_config["username"], :password => db_config["password"], :host => db_config["host"])
# end
# def self.recreate_database_pg
# conn = PG::Connection.open("dbname=postgres")
# conn.exec("DROP DATABASE IF EXISTS #{TEST_DB_NAME}")
# conn.exec("CREATE DATABASE #{TEST_DB_NAME}")
# JamDb::Migrator.new.migrate(:dbname => TEST_DB_NAME)
# end
end

View File

@ -1,19 +1,25 @@
ENV["RAILS_ENV"] ||= 'test'
require 'simplecov'
# provision database
require 'active_record'
require 'jam_db'
# require 'jam_db'
require 'spec_db'
require 'yaml'
# recreate test database and migrate it
db_config = YAML::load(File.open('config/database.yml'))["test"]
SpecDb::recreate_database(db_config)
ActiveRecord::Base.establish_connection(YAML::load(File.open('config/database.yml'))["test"])
#SpecDb::recreate_database(db_config)
ActiveRecord::Base.establish_connection(db_config)
# This file is copied to spec/ when you run 'rails generate rspec:install'
require 'jam_ruby'
SpecDb::recreate_database
require File.expand_path("../../config/environment", __FILE__)

1
admin/trigger.txt Normal file
View File

@ -0,0 +1 @@
# trigger build

98
bitbucket-pipelines.yml Normal file
View File

@ -0,0 +1,98 @@
image: node:14.21.3
pipelines:
branches:
develop:
- step:
name: Build Staging
script:
- pushd jam-ui
- npm install
- popd
- pushd jam-ui/cicd
- npm install
- NODE_ENV=production PUBLIC_URL=https://staging.jamkazam.com REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_BASE_URL=https://staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-8W0GTL53NT ENVIRONMENT=staging ./generate.sh
- popd
- cd jam-ui
- NODE_ENV=production CI=false PUBLIC_URL=https://staging.jamkazam.com REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-8W0GTL53NT npm run build
artifacts:
- jam-ui/build/**
- step:
name: Deploy to staging - SPA
script:
- pipe: atlassian/aws-s3-deploy:1.6.2
variables:
S3_BUCKET: "jamkazam-ui/stg"
LOCAL_PATH: "jam-ui/build"
EXTRA_ARGS: "--exclude=*backing-tracks/*"
- step:
name: Deploy to staging - backing-tracks
script:
- pipe: atlassian/aws-s3-deploy:1.6.2
variables:
S3_BUCKET: "jamkazam-ui/stg/backing-tracks"
LOCAL_PATH: "jam-ui/build/backing-tracks"
EXTRA_ARGS: "--exclude=*.js --content-type text/html"
- step:
name: Deploy to staging - backing-tracks js
script:
- pipe: atlassian/aws-s3-deploy:1.6.2
variables:
S3_BUCKET: "jamkazam-ui/stg/js"
LOCAL_PATH: "jam-ui/build/js"
EXTRA_ARGS: "--content-type text/javascript"
# - step:
# name: Deploy to staging - invalidate cloudfront distribution
# deployment: staging
# script:
# - pipe: atlassian/aws-cloudfront-invalidate:0.10.1
# variables:
# DISTRIBUTION_ID: "E2AQIC9RSON94Q" # ESQDIABYLT0RV
custom:
build-and-deploy-to-production:
- step:
name: Build Production
script:
- pushd jam-ui
- npm install
- popd
- pushd jam-ui/cicd
- npm install
- NODE_ENV=production ENVIRONMENT=production PUBLIC_URL=https://www.jamkazam.com REACT_APP_ORIGIN=jamkazam.com REACT_APP_BASE_URL=https://www.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-SPTNJRW7WB ./generate.sh
- popd
- cd jam-ui
- NODE_ENV=production CI=false PUBLIC_URL=https://www.jamkazam.com REACT_APP_ORIGIN=jamkazam.com REACT_APP_BASE_URL=https://www.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-SPTNJRW7WB npm run build
artifacts:
- jam-ui/build/**
- step:
name: Deploy to production - SPA
script:
- pipe: atlassian/aws-s3-deploy:1.6.2
variables:
S3_BUCKET: "jamkazam-ui/prd"
LOCAL_PATH: "jam-ui/build"
EXTRA_ARGS: "--exclude=*backing-tracks/*"
- step:
name: Deploy to production - backing-tracks
script:
- pipe: atlassian/aws-s3-deploy:1.6.2
variables:
S3_BUCKET: "jamkazam-ui/prd/backing-tracks"
LOCAL_PATH: "jam-ui/build/backing-tracks"
EXTRA_ARGS: "--exclude=*.js --content-type text/html"
- step:
name: Deploy to production - backing-tracks js
script:
- pipe: atlassian/aws-s3-deploy:1.6.2
variables:
S3_BUCKET: "jamkazam-ui/prd/js"
LOCAL_PATH: "jam-ui/build/js"
EXTRA_ARGS: "--content-type text/javascript"
#- step:
# name: Deploy to production - invalidate cloudfront distribution
# deployment: production
# script:
# - pipe: atlassian/aws-cloudfront-invalidate:0.10.1
# variables:
# DISTRIBUTION_ID: "ESQDIABYLT0RV"

25
build
View File

@ -1,5 +1,6 @@
#!/bin/bash
# RUN_SLOW_TESTS, RUN_AWS_TESTS, SKIP_KARMA=1 SHOW_JS_ERRORS=1 PACKAGE=1
# WORKSPACE=/var/lib/jenkins/jobs/jam-web/workspace
@ -9,12 +10,6 @@ export BUNDLE_JOBS=1 # 6, which i want to use, makes the whole server crawl
echo ""
echo "BUILDING JAM-DB"
pushd db > /dev/null
./jenkins
popd > /dev/null
echo ""
echo "BUILDING JAM-PB"
pushd pb > /dev/null
@ -69,24 +64,6 @@ if [ ! -z "$PACKAGE" ]; then
# if still going, then push all debs up
if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* || "$GIT_BRANCH" == *release* || "$GIT_BRANCH" == *feature* || "$GIT_BRANCH" == *hotfix* ]]; then
echo ""
echo "PUSHING DB ARTIFACTS"
pushd db > /dev/null
echo "publishing ubuntu packages (.deb)"
for f in `find target -name '*.deb'`; do
DEBNAME=`basename $f`
DEBPATH="$f"
echo "publishing $DEBPATH to deb server"
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
if [ "$?" != "0" ]; then
echo "deb publish failed of $DEBPATH"
exit 1
fi
done
echo "done publishing debs"
popd > /dev/null
echo ""
echo "PUSHING WEB"
pushd web > /dev/null

View File

@ -1 +0,0 @@
2.0.0-p247

View File

@ -1,5 +1,10 @@
source 'http://rubygems.org'
ruby_version = ENV["JAM_RUBY_VERSION"]
ruby_version = "2.3.1" if ruby_version.nil?
ruby ruby_version
# Assumes you have already cloned pg_migrate_ruby in your workspace
# $ cd [workspace]
# $ git clone https://github.com/sethcall/pg_migrate_ruby

View File

@ -17,5 +17,8 @@ PLATFORMS
DEPENDENCIES
pg_migrate (= 0.1.14)!
RUBY VERSION
ruby 2.4.1p111
BUNDLED WITH
1.11.2
2.2.7

View File

@ -152,3 +152,12 @@ CREATE INDEX recorded_tracks_recording_id_idx ON recorded_tracks USING btree (re
CREATE INDEX recorded_backing_tracks_user_id_idx ON recorded_backing_tracks USING btree (user_id);
CREATE INDEX recorded_backing_tracks_recording_id_idx ON recorded_backing_tracks USING btree (recording_id);
CREATE INDEX mixes_recording_id_idx ON mixes USING btree (recording_id);
CREATE INDEX msuh_id_idx ON music_sessions_user_history USING btree (id);
CREATE INDEX quick_mixes_user_id_idx ON quick_mixes USING btree (user_id);
CREATE INDEX recorded_videos_user_id_idx ON recorded_videos USING btree (user_id);
CREATE INDEX music_sessions_user_id_idx ON music_sessions USING btree (user_id);
ALTER TABLE users ADD COLUMN used_current_month INT;
ALTER TABLE users ADD COLUMN used_month_play_time INT;
ALTER TABLE bands ADD COLUMN school_id INT;

0
init_data.dump Normal file
View File

6
jam-ui/.browserslistrc Normal file
View File

@ -0,0 +1,6 @@
# Browsers that we support
last 1 version
> 0.2%
not op_mini all
not dead

16
jam-ui/.env.development Normal file
View File

@ -0,0 +1,16 @@
HOST=beta.jamkazam.local
PORT=4000
REACT_APP_ORIGIN=jamkazam.local
REACT_APP_BASE_URL=http://beta.jamkazam.local:4000
REACT_APP_CLIENT_BASE_URL=http://www.jamkazam.local:3000
REACT_APP_API_BASE_URL=http://www.jamkazam.local:3000/api
REACT_APP_BITBUCKET_BUILD_NUMBER=dev
REACT_APP_BITBUCKET_COMMIT=dev
REACT_APP_ENV=development
REACT_APP_RECAPTCHA_ENABLED=false
REACT_APP_SITE_KEY=6Let8dgSAAAAAFheKGWrs6iaq_hIlPOZ2f3Bb56B
REACT_APP_GOOGLE_ANALYTICS_ID=G-MC9BTWXWY4
PUBLIC_URL=
REACT_APP_COOKIE_DOMAIN=.jamkazam.local
REACT_APP_RECURLY_PUBLIC_API_KEY=ewr1-hvDV1xQxDw0HPaaRFP4KNE
REACT_APP_BRAINTREE_TOKEN=sandbox_pgjp8dvs_5v5rwm94m2vrfbms

View File

@ -0,0 +1,13 @@
HOST=beta.jamkazam.local
PORT=4000
REACT_APP_ORIGIN=jamkazam.local
REACT_APP_BASE_URL=http://beta.jamkazam.local:4000
REACT_APP_CLIENT_BASE_URL=http://www.jamkazam.local:3000
REACT_APP_API_BASE_URL=http://www.jamkazam.local:3000/api
REACT_APP_BITBUCKET_BUILD_NUMBER=dev
REACT_APP_BITBUCKET_COMMIT=dev
REACT_APP_ENV=development
REACT_APP_COOKIE_DOMAIN=.jamkazam.com
REACT_APP_GOOGLE_ANALYTICS_ID=G-MC9BTWXWY4
REACT_APP_RECURLY_PUBLIC_API_KEY=
REACT_APP_BRAINTREE_TOKEN=

13
jam-ui/.env.production Normal file
View File

@ -0,0 +1,13 @@
HOST=beta.jamkazam.com
PORT=4000
REACT_APP_ORIGIN=jamkazam.com
REACT_APP_BASE_URL=https://www.jamkazam.com
REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com
REACT_APP_API_BASE_URL=https://www.jamkazam.com/api
REACT_APP_ENV=production
REACT_APP_RECAPTCHA_ENABLED=true
REACT_APP_SITE_KEY=6Let8dgSAAAAAFheKGWrs6iaq_hIlPOZ2f3Bb56B
REACT_APP_COOKIE_DOMAIN=.jamkazam.com
REACT_APP_GOOGLE_ANALYTICS_ID=G-SPTNJRW7WB
REACT_APP_RECURLY_PUBLIC_API_KEY=ewr1-hvDV1xQxDw0HPaaRFP4KNE
REACT_APP_BRAINTREE_TOKEN=production_hc7z69yq_pwwc6zm3d478kfrh

13
jam-ui/.env.staging Normal file
View File

@ -0,0 +1,13 @@
HOST=beta.staging.jamkazam.com
PORT=4000
REACT_APP_ORIGIN=staging.jamkazam.com
REACT_APP_BASE_URL=https://staging.jamkazam.com
REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com
REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api
REACT_APP_ENV=staging
REACT_APP_RECAPTCHA_ENABLED=false
REACT_APP_SITE_KEY=6Let8dgSAAAAAFheKGWrs6iaq_hIlPOZ2f3Bb56B
REACT_APP_COOKIE_DOMAIN=.staging.jamkazam.com
REACT_APP_GOOGLE_ANALYTICS_ID=G-8W0GTL53NT
REACT_APP_RECURLY_PUBLIC_API_KEY=ewr1-AjUHUfcLtIsPdtetD4mj2x
REACT_APP_BRAINTREE_TOKEN=sandbox_pgjp8dvs_5v5rwm94m2vrfbms

8
jam-ui/.eslintrc.json Normal file
View File

@ -0,0 +1,8 @@
{
"extends": ["react-app", "prettier", "plugin:react/recommended"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"react/no-unescaped-entities": 0
}
}

37
jam-ui/.gitignore vendored Normal file
View File

@ -0,0 +1,37 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.cypress.env.json
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.idea
/.vscode
/test-results
/cypress/videos/
/cypress/screenshots/
/public/backing-tracks
/public/js

31
jam-ui/.gitlab-ci.yml Normal file
View File

@ -0,0 +1,31 @@
# Using the node alpine image to build the React app
image: node:alpine
# Announce the URL as per CRA docs
# https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration
variables:
PUBLIC_URL: /react-falcon
# Cache node modules - speeds up future builds
cache:
paths:
- node_modules
# Name the stages involved in the pipeline
stages:
- deploy
# Job name for gitlab to recognise this results in assets for Gitlab Pages
# https://docs.gitlab.com/ee/user/project/pages/introduction.html#gitlab-pages-requirements
pages:
stage: deploy
script:
- npm install # Install all dependencies
- npm run build --prod # Build for prod
- mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline.
- mv build public # Move build files to public dir for Gitlab Pages
- cp public/index.html public/404.html # Required for react router browser history, but helps with https://blog.pshrmn.com/how-single-page-applications-work/
artifacts:
paths:
- public # The built files for Gitlab Pages to serve
only:
- master # Only run on master branch

1
jam-ui/.nvmrc Normal file
View File

@ -0,0 +1 @@
v14.21.3

4
jam-ui/.prettierrc Normal file
View File

@ -0,0 +1,4 @@
{
"singleQuote": true,
"printWidth": 120
}

1
jam-ui/.python-version Normal file
View File

@ -0,0 +1 @@
2.7.18

56
jam-ui/README.md Normal file
View File

@ -0,0 +1,56 @@
# JamKazam new react frontend UI/UX
`jam-ui` is a react app created using `create-react-app` utility. to run the app on your development environment you need to `cd jam-ui` and run `npm run start`
The changes to the source files are auto-loaded but sometimes you might need to force close it by crtl+c and then start manually.
The application files goes under `src` and the react components are placed under `src/components` directory. We have a convention of naming the files using JK prefix in the filename. For example `JKMusicSessions`.
The routes are defined in `jam-ui/src/components/dashboard/JKDashboardMain.js`
## Running react app
In production this React app is supposed to run on beta.jamkazam.com subdomain which is same origin domain to the production Rails app (www.jamkazam.com). This way we utilize same session based user authentication of Rails web app for authenticating users. (It looks for remember_token session cookie in headers and if it is not availale redirect the user to Rails web app sign in page)
The DOMAIN and PORT running this app is defined in env.production file. This file also has env variables for connecting with Rails app. (When setting up in development you can copy the content of env.development.example in to env.development.local and change them according to your host setup)
HOST=beta.jamkazam.local
PORT=4000
REACT_APP_CLIENT_BASE_URL=http://www.jamkazam.local:3000
REACT_APP_API_BASE_URL=http://www.jamkazam.local:3000/api
## Subdomains setup (development)
You need 2 host records created for React and and Rails app. For example
127.0.0.1 www.jamkazam.local #for Rails app
127.0.0.1 beta.jamkazam.local #for React app
## Installing npm dependencies
cd jam-ui
npm install
## Running the app
cd jam-ui
npm run start
This will open it in a borwser window at http://beta.jamkazam.local:3000. Of course for it to work you also need Rails (web) app and websocket app (websocket-gateway) running.
## Working with JamTracks
if you have the latest from develop, you can go:
```
cd cicd
npm install
./export_personal_jamtracks.sh
./generate.js
open http://beta.jamkazam.local:4000/backing-tracks/ac-dc/back-in-black.html
```
You can also do none of the above, and go straight to:
http://beta.jamkazam.local:4000/public/backing-tracks/ac-dc/back-in-black
I tried to make it so the SPA has 'secret routes' to these pages, which is convenient for us dev & testing
but also tried to make it convenient to run the cicd approach of actually generating separate pages for each landing page (which is what those 5 steps cover)

6
jam-ui/cicd/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
build
output
node_modules
public
jam_track_tracks_for_jam_ui*

1
jam-ui/cicd/.nvmrc Normal file
View File

@ -0,0 +1 @@
22

View File

@ -0,0 +1,7 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"ignore": [
"../src/components/e-commerce/*.js"
]
}

View File

@ -0,0 +1,29 @@
import 'react-app-polyfill/ie9';
import 'react-app-polyfill/stable';
import React from "react";
import ReactDOM from "react-dom";
import Main from "../src/Main.js"
import TemplatePage from "../src/components/jamtracks/JKJamTracksLandingTemplatePage.js"
import ArtistTemplatePage from "../src/components/jamtracks/JKJamTracksArtistLandingTemplatePage.js"
import '../src/helpers/initFA';
import '../src/i18n/config';
const rootElement = document.getElementById("root");
// Ensure props are passed correctly (or fetch from the server)
const props = window.jamtrack_data;
console.log('init', props, rootElement);
// Hydrate the server-rendered React component
//ReactDOM.hydrate(React.createElement(TemplatePage, props), rootElement);
ReactDOM.render(
<Main>
{props.song ? <TemplatePage {...props} /> : <ArtistTemplatePage {...props} /> }
</Main>, rootElement
);

View File

@ -0,0 +1,25 @@
#!/bin/bash
# check if 1st argument spceified; if it is, then set that to SAVE_TO
if [ -n "$1" ]; then
SAVE_TO="$1"
else
SAVE_TO=/tmp
fi
echo "Saving to $SAVE_TO"
psql jam -c "COPY( select id, original_artist, name , original_artist_slug, name_slug, plan_code, slug, allow_free, ('https://www.jamkazam.com/backing-tracks/' || original_artist_slug || '/' || name_slug) as \"URL\", (select name from jam_track_licensors l where l.id = licensor_id) as \"Licensor\", vendor_id as \"Vendor ID\" FROM jam_tracks) TO '$SAVE_TO/jam_tracks_for_jam_ui.$USER.csv' with CSV HEADER;"
//https://jamkazam-public.s3.amazonaws.com
# dump all artists
psql jam -c "COPY( select original_artist, original_artist_slug, ('https://www.jamkazam.com/backing-tracks/' || original_artist_slug ) as \"URL\" FROM jam_tracks group by original_artist, original_artist_slug) TO '$SAVE_TO/jam_tracks_for_jam_ui_artists.$USER.csv' with CSV HEADER;"
psql jam -c "COPY( select id, part, instrument_id, (select description from instruments where id = instrument_id) as instrument_description, track_type, position, preview_mp3_url, preview_url as preview_ogg_url, preview_aac_url from jam_track_tracks) TO '$SAVE_TO/jam_track_tracks_for_jam_ui.$USER.csv' with CSV HEADER;"
echo "Moving personal files to jamtracks-for-env"
mkdir -p jamtracks-for-env
sudo mv $SAVE_TO/jam_tracks_for_jam_ui.$USER.csv jamtracks-for-env
sudo mv $SAVE_TO/jam_tracks_for_jam_ui_artists.$USER.csv jamtracks-for-env
sudo mv $SAVE_TO/jam_track_tracks_for_jam_ui.$USER.csv jamtracks-for-env

View File

@ -0,0 +1,39 @@
#!/bin/bash
# Ensure the correct number of arguments
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <save_to_path> <server_env>"
exit 1
fi
SAVE_TO="$1"
server_env="$2"
# Validate server_env
if [ "$server_env" != "staging" ] && [ "$server_env" != "production" ]; then
echo "Error: server_env must be either 'staging' or 'production'"
exit 1
fi
# Determine SSH target
if [ "$server_env" == "staging" ]; then
SSH_TARGET="jam@int.jamkazam.com"
else
SSH_TARGET="jam@db.jamkazam.com"
fi
echo "Saving to $SAVE_TO on $server_env"
# Run psql commands remotely
ssh $SSH_TARGET "psql jam -c \"COPY( select id, original_artist, name, original_artist_slug, name_slug, plan_code, slug, allow_free, ('https://www.jamkazam.com/backing-tracks/' || original_artist_slug || '/' || name_slug) as \"URL\", (select name from jam_track_licensors l where l.id = licensor_id) as \"Licensor\" FROM jam_tracks order by id::int) TO '$SAVE_TO/jam_tracks_for_jam_ui.$server_env.csv' with CSV HEADER;\""
ssh $SSH_TARGET "psql jam -c \"COPY( select original_artist, original_artist_slug, ('https://www.jamkazam.com/backing-tracks/' || original_artist_slug ) as \"URL\" FROM jam_tracks group by original_artist, original_artist_slug order by original_artist) TO '$SAVE_TO/jam_tracks_for_jam_ui_artists.$server_env.csv' with CSV HEADER;\""
ssh $SSH_TARGET "psql jam -c \"COPY( select id, part, instrument_id, (select description from instruments where id = instrument_id) as instrument_description, track_type, position, preview_mp3_url, preview_url as preview_ogg_url, preview_aac_url from jam_track_tracks order by jam_track_id::int) TO '$SAVE_TO/jam_track_tracks_for_jam_ui.$server_env.csv' with CSV HEADER;\""
# Move files locally from the remote server
scp $SSH_TARGET:"$SAVE_TO/jam_tracks_for_jam_ui.$server_env.csv" jamtracks-for-env
scp $SSH_TARGET:"$SAVE_TO/jam_tracks_for_jam_ui_artists.$server_env.csv" jamtracks-for-env
scp $SSH_TARGET:"$SAVE_TO/jam_track_tracks_for_jam_ui.$server_env.csv" jamtracks-for-env
echo "Files moved successfully to local machine"

337
jam-ui/cicd/generate.js Normal file
View File

@ -0,0 +1,337 @@
const fs = require("fs");
const path = require("path");
const csv = require("csv-parser");
const React = require("react");
const dotenv = require("dotenv");
const ReactDOMServer = require("react-dom/server");
const TemplatePageModule = require("./build/components/jamtracks/JKJamTracksLandingTemplatePage");
const ArtistTemplatePageModule = require("./build/components/jamtracks/JKJamTracksArtistLandingTemplatePage");
var csvFilePath = `jamtracks-for-env/jam_tracks_for_jam_ui.${process.env.USER}.csv`
var artistCsvFilePath = `jamtracks-for-env/jam_tracks_for_jam_ui_artists.${process.env.USER}.csv`
var sitemapPath = path.join(__dirname, "..", "public", "sitemap.xml");
const clear_sitemap = () => {
fs.writeFileSync(sitemapPath, "");
// Add the root element
fs.writeFileSync(sitemapPath, `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n`, { flag: 'a' });
// Add the root url
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}</loc></url>\n`, { flag: 'a' });
// Add standard URLs specific to this site, such as:
// All prefix with /public
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/</loc></url>\n`, { flag: 'a' });
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/privacy</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/help</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/knowledge-base</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/help-desk</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/forum</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/unsubscribe</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/downloads</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/downloads-legacy</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/auth/login</loc></url>\n`, { flag: 'a' });
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/auth/signup</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/auth/forget-password</loc></url>\n`, { flag: 'a' } );
// Add the closing root element
}
const add_song_to_sitemap = (artistSlug, songSlug) => {
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/backing-tracks/${artistSlug}/${songSlug}</loc></url>\n`, { flag: 'a' });
}
const add_artist_to_sitemap = (artistSlug) => {
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/backing-tracks/${artistSlug}</loc></url>\n`, { flag: 'a' });
}
const close_sitemap = () => {
fs.writeFileSync(sitemapPath, "</urlset>", { flag: 'a' } );
}
/**
* Loads a CSV file into an array of objects.
* @param {string} csvPath - The path to the CSV file.
* @returns {Promise<Array<Object>>} - A promise that resolves with the parsed CSV data.
*/
const load_csv = (csvPath) => {
return new Promise((resolve, reject) => {
const results = [];
fs.createReadStream(csvPath)
.pipe(csv())
.on('data', (data) => results.push(data))
.on('end', () => resolve(results))
.on('error', (error) => reject(error));
});
};
/**
* Finds all songs for a given artist based on the original_artist_slug
* and sorts them alphabetically by the `slug` field.
* @param {string} artistSlug - The original_artist_slug to match.
* @param {Array<Object>} songsCsv - The songs CSV data.
* @returns {Array<Object>} - A sorted array of matching song objects.
*/
const collect_songs_for_artist = (artistSlug, songsCsv) => {
return songsCsv
.filter((song) => song.original_artist_slug === artistSlug)
.sort((a, b) => a.slug.localeCompare(b.slug)); // Sort alphabetically by slug
};
const init = () => {
const node_env = process.env.NODE_ENV || 'development';
const environment = process.env.ENVIRONMENT || 'development';
console.log(`environment=${environment} node_env=${node_env}`);
console.log(dotenv.config({ path: `../.env.${environment}` }));
if (environment === "production" || environment === "staging") {
csvFilePath = `jamtracks-for-env/jam_tracks_for_jam_ui.${environment}.csv`;
artistCsvFilePath = `jamtracks-for-env/jam_tracks_for_jam_ui_artists.${environment}.csv`;
}
console.log("Song csv file", csvFilePath);
console.log("Artist csv file", artistCsvFilePath);
if (!process.env.PUBLIC_URL) {
console.log("setting public url", process.env.REACT_APP_BASE_URL);
process.env.PUBLIC_URL = process.env.REACT_APP_BASE_URL;
}
clear_sitemap();
//const __dirname = path.resolve(path.dirname(''));
console.log("init done successfully")
}
const generateSongPages = async (render) => {
const rows = [];
const OUTPUT_DIR = path.join(__dirname, "..", "public", "backing-tracks");
if (!fs.existsSync(OUTPUT_DIR)) {
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
}
console.log("generatPages starting")
const TemplatePage = TemplatePageModule.default;
fs.createReadStream(csvFilePath)
.pipe(csv())
.on("data", (row) => rows.push(row))
.on("end", async () => {
console.log(`Processing ${rows.length} rows...`);
for (const row of rows) {
// id, original_artist, name, original_artist_slug, name_slug, plan_code, slug, URL, licensor, vendor_id
const { id, original_artist, name, original_artist_slug, name_slug, plan_code, slug, allow_free } = row;
const artist = original_artist;
const song = name;
const location = `/backing-tracks/${original_artist_slug}/${name_slug}`;
const fullPath = process.env.REACT_APP_BASE_URL + location;
const logoPath = process.env.REACT_APP_BASE_URL + "/favicon.svg";
add_song_to_sitemap(original_artist_slug, name_slug);
console.log(`Generating ${artist} - ${song}`);
const html = render
? ReactDOMServer.renderToStaticMarkup(
React.createElement(TemplatePage, { id, plan_code, slug, artist, song, location })
)
: "";
const fullHtml = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="/favicon.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${artist} - ${song} - Free Backing Track</title>
<link rel="stylesheet" href="${process.env.REACT_APP_BASE_URL}/css/theme.css">
<meta name="description" content="Get free ${song} by ${artist} backing track, plus free tools to mute any part, slow down for practice, record yourself, more">
<meta name="keywords" content="Backing Track, ${artist}, ${song}, Instrumental">
<meta name="author" content="JamKazam">
<!-- Open Graph (Facebook, LinkedIn, etc.) -->
<meta property="og:title" content="${artist} - ${song} | Free Backing Track">
<meta property="og:description" content="Get free ${song} by ${artist} backing track, plus free tools to mute any part, slow down for practice, record yourself, more">
<meta property="og:image" content="${logoPath}">
<meta property="og:url" content="${fullPath}">
<meta property="og:type" content="music.song">
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="${artist} - ${song} | Free Backing Track">
<meta name="twitter:description" content="Get free ${song} by ${artist} backing track, plus free tools to mute any part, slow down for practice, record yourself, more">
<meta name="twitter:image" content="${logoPath}">
<!-- Canonical URL -->
<link rel="canonical" href="${fullPath}" />
<!-- Structured Data (Schema.org) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "MusicRecording",
"name": "${song}",
"byArtist": {
"@type": "MusicGroup",
"name": "${artist}"
},
"url": "${fullPath}",
"image": "${logoPath}"
}
</script>
<script>
window.jamtrack_data = {
id: "${id}",
plan_code: "${plan_code}",
slug: "${slug}",
artist: "${artist}",
song: "${song}",
location: "${location}"
}
</script>
</head>
<body>
<div id="root">${html}</div>
<script src="/js/client-hydrate.bundle.js"></script>
</body>
</html>`;
const ARTIST_DIR = path.join(OUTPUT_DIR, original_artist_slug);
if (!fs.existsSync(ARTIST_DIR)) {
fs.mkdirSync(ARTIST_DIR, { recursive: false });
}
const finalOutputPath = process.env.NODE_ENV === "development" ? `${name_slug}.html` : `${name_slug}.html`;
const outputFilePath = path.join(ARTIST_DIR, finalOutputPath);
fs.writeFileSync(outputFilePath, fullHtml);
console.log(`Generated: ${outputFilePath}`);
}
console.log("All pages generated!");
});
};
const generateArtistPages = async (render) => {
const rows = [];
const OUTPUT_DIR = path.join(__dirname, "..", "public", "backing-tracks");
if (!fs.existsSync(OUTPUT_DIR)) {
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
}
console.log("generatPages starting")
const TemplatePage = TemplatePageModule.default;
const songs_csv = await load_csv(csvFilePath);
fs.createReadStream(artistCsvFilePath)
.pipe(csv())
.on("data", (row) => rows.push(row))
.on("end", async () => {
console.log(`Processing ${rows.length} rows...`);
for (const row of rows) {
const { original_artist, original_artist_slug, url } = row;
const artist = original_artist;
const matchingSongs = collect_songs_for_artist(original_artist_slug, songs_csv);
console.log(`Found ${matchingSongs.length} songs for ${artist}`);
const location = `/backing-tracks/${original_artist_slug}`;
const fullPath = process.env.REACT_APP_BASE_URL + location;
const logoPath = process.env.REACT_APP_BASE_URL + "/favicon.svg";
add_artist_to_sitemap(original_artist_slug);
console.log(`Generating ${artist}`);
const songs = matchingSongs.map((song) => {
return {
name: song.name,
plan_code: song.plan_code,
url: process.env.REACT_APP_BASE_URL + "/backing-tracks/" + song.original_artist_slug + "/" + song.name_slug
}
});
const html = render
? ReactDOMServer.renderToStaticMarkup(
React.createElement(ArtistTemplatePage, { artist, original_artist_slug, location })
)
: "";
const fullHtml = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="/favicon.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${artist} - Free Backing Track</title>
<link rel="stylesheet" href="${process.env.REACT_APP_BASE_URL}/css/theme.css">
<meta name="description" content="Get a free ${artist} backing track, plus free tools to mute any part, slow down for practice, record yourself, more">
<meta name="keywords" content="Backing Track, ${artist}, Instrumental">
<meta name="author" content="JamKazam">
<!-- Open Graph (Facebook, LinkedIn, etc.) -->
<meta property="og:title" content="${artist} | Free Backing Track">
<meta property="og:description" content="Get a free ${artist} backing track, plus free tools to mute any part, slow down for practice, record yourself, more">
<meta property="og:image" content="${logoPath}">
<meta property="og:url" content="${fullPath}">
<meta property="og:type" content="music.song">
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="${artist} | Free Backing Track">
<meta name="twitter:description" content="Get a free ${artist} backing track, plus free tools to mute any part, slow down for practice, record yourself, more">
<meta name="twitter:image" content="${logoPath}">
<!-- Canonical URL -->
<link rel="canonical" href="${fullPath}" />
<script>
window.jamtrack_data = {
artist: "${artist}",
original_artist_slug: "${original_artist_slug}",
location: "${location}",
songs: ${JSON.stringify(songs)}
}
</script>
</head>
<body>
<div id="root">${html}</div>
<script src="/js/client-hydrate.bundle.js"></script>
</body>
</html>`;
const finalOutputPath = process.env.NODE_ENV === "development" ? `${original_artist_slug}.html` : `${original_artist_slug}.html`;
const outputFilePath = path.join(OUTPUT_DIR, finalOutputPath);
fs.writeFileSync(outputFilePath, fullHtml);
console.log(`Generated: ${outputFilePath}`);
}
close_sitemap();
console.log("All pages generated!");
});
};
let render = false;
if (process.argv.length > 2) {
render = process.argv[2] === "true" || process.argv[2] === "yes" || process.argv[2] === "1";
}
init()
generateSongPages(render);
generateArtistPages(render);

40
jam-ui/cicd/generate.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# requires node 22 at least
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# default NODE_ENV to development if not set
if [ -z "$NODE_ENV" ]; then
NODE_ENV=development
fi
# default ENVIRONMENT to development if not set
if [ -z "$ENVIRONMENT" ]; then
ENVIRONMENT=development
fi
set -eo pipefail
export NODE_ENV
export ENVIRONMENT
echo "cleaning"
rm -rf $SCRIPT_DIR/build
echo "creating build dir - this is for correct image resolution; ideally this wouldn't be needed"
#mkdir -p $SCRIPT_DIR/build/assets/img
#cp -r $SCRIPT_DIR/../src/assets/img/* $SCRIPT_DIR/build/assets/img/
echo "creating client-hydrate.bundle.js for jamtrack landing pages"
# PUBLIC_URL=? for server builds
# NODE_ENV=production for server builds
npx webpack
#cp -r public/* output/
npm run build
echo "run generate.js for all jamtracks defined in the CSV"
NODE_ENV=$NODE_ENV ENVIRONMENT=$ENVIRONMENT npm run generate-song-landing-pages

View File

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3657
jam-ui/cicd/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More