analytics/lib/plausible_web/router.ex

244 lines
11 KiB
Elixir
Raw Normal View History

2019-09-02 14:29:19 +03:00
defmodule PlausibleWeb.Router do
use PlausibleWeb, :router
@two_weeks_in_seconds 60 * 60 * 24 * 14
pipeline :browser do
plug :accepts, ["html"]
plug PlausibleWeb.Firewall
2019-09-02 14:29:19 +03:00
plug :fetch_session
plug :fetch_flash
plug :put_secure_browser_headers
plug PlausibleWeb.SessionTimeoutPlug, timeout_after_seconds: @two_weeks_in_seconds
plug PlausibleWeb.AuthPlug
plug PlausibleWeb.LastSeenPlug
end
pipeline :shared_link do
plug :accepts, ["html"]
plug :put_secure_browser_headers
end
pipeline :csrf do
plug :protect_from_forgery
end
2019-09-02 14:29:19 +03:00
pipeline :api do
2019-12-03 12:42:17 +03:00
plug :accepts, ["json"]
plug PlausibleWeb.Firewall
2019-09-02 14:29:19 +03:00
plug :fetch_session
plug PlausibleWeb.AuthPlug
end
pipeline :internal_stats_api do
plug :accepts, ["json"]
plug PlausibleWeb.Firewall
plug :fetch_session
plug PlausibleWeb.AuthorizeSiteAccess
end
pipeline :public_api do
plug :accepts, ["json"]
plug PlausibleWeb.Firewall
end
if Mix.env() == :dev do
2019-09-02 14:29:19 +03:00
forward "/sent-emails", Bamboo.SentEmailViewerPlug
end
2021-01-07 11:42:45 +03:00
use Kaffy.Routes, scope: "/crm", pipe_through: [PlausibleWeb.CRMAuthPlug]
scope "/api/stats", PlausibleWeb.Api do
pipe_through :internal_stats_api
get "/:domain/current-visitors", StatsController, :current_visitors
get "/:domain/main-graph", StatsController, :main_graph
get "/:domain/sources", StatsController, :sources
get "/:domain/utm_mediums", StatsController, :utm_mediums
get "/:domain/utm_sources", StatsController, :utm_sources
get "/:domain/utm_campaigns", StatsController, :utm_campaigns
get "/:domain/utm_contents", StatsController, :utm_contents
get "/:domain/utm_terms", StatsController, :utm_terms
get "/:domain/referrers/:referrer", StatsController, :referrer_drilldown
get "/:domain/pages", StatsController, :pages
get "/:domain/entry-pages", StatsController, :entry_pages
get "/:domain/exit-pages", StatsController, :exit_pages
get "/:domain/countries", StatsController, :countries
get "/:domain/regions", StatsController, :regions
get "/:domain/cities", StatsController, :cities
get "/:domain/browsers", StatsController, :browsers
get "/:domain/browser-versions", StatsController, :browser_versions
get "/:domain/operating-systems", StatsController, :operating_systems
get "/:domain/operating-system-versions", StatsController, :operating_system_versions
get "/:domain/screen-sizes", StatsController, :screen_sizes
get "/:domain/conversions", StatsController, :conversions
2020-10-30 11:49:41 +03:00
get "/:domain/property/:prop_name", StatsController, :prop_breakdown
Adds manual, editable, auto-suggested filters, and negated&globbed path-based filters (#1121) * Adds manual-filters + friends commit 308192044d726e9a6f7406e333048ab3407aa260 Merge: 39287ab a299fab Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri Jun 11 03:40:55 2021 -0500 Merge branch 'manual-filters' into manual-filters-2 commit a299fab1fbe98ec04ea3dfbfbd175a2af5e73804 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri Jun 11 02:20:26 2021 -0500 Changes to split and pattern matched function for time_on_page commit 10f10c933af56a3482747f818bd580a8a1903ae2 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri Jun 11 01:53:18 2021 -0500 Fixes a couple of minor UX issues commit f2e5ce8eb33460cb2d1dc9ac0bd0d4ad0a20aa31 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri Jun 11 01:49:10 2021 -0500 Fixes time on page for globbed and negated page paths commit bb18af6526068860e4090dc91d02455e515f1238 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu Jun 10 05:24:05 2021 -0500 Close to finalized version of updated version Just needs some additional testing + potentially code cleanup commit d0b7bfe3dacb4c611e6857bed308b5954aa2cc1e Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri May 28 04:21:21 2021 -0500 Real Dialyzer Fix commit 296a76af34ff7e16c83e5b5bf62f0547dc30ece9 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri May 28 03:44:29 2021 -0500 Dialyzer fix commit 91f3b44017afb3838bbb4de8ec9f3ba4d39709bc Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 17:11:24 2021 -0500 Changelog commit e041f75745ab57b0d3c00d4a9ff7f8a490b27c17 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 17:09:52 2021 -0500 Formatting commit f689642204b02f6544dc072b95c9c22e180b9e87 Merge: e00929b 4ff25f6 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 17:08:47 2021 -0500 Merge branch 'master' into manual-filters commit e00929b1c51411fe4bf939266d3aeb6f67dcb2ab Merge: 83887c4 806975e Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 17:01:48 2021 -0500 Merge branch 'manual-filters' of github.com:Vigasaurus/plausible-analytics into manual-filters commit 83887c49ccc7fbc50ba1766bfa74c77994ef1900 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 16:59:32 2021 -0500 Adds tests for suggestions, formats goals suggestion query commit 1cb7732a08a50eddb81166fb796bf5731a0c5aba Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 16:36:31 2021 -0500 Adds goals as auto-complete capable filter commit 4ca39cc406777794bab7586116115031c6d8a82a Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 16:08:22 2021 -0500 95% completed auto-complete setup Still needs: - tests - goals added as filter commit 22d38c4cd83dd1d72ec435e1b8cf6fc3eb70d957 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Thu May 27 03:47:19 2021 -0500 80% of auto-complete filters progress Still needs - countries and screen into new format - re-style dropdown and background - drop debounce time - tests commit 806975ede9ebcbaa03ce888c41f20da866413697 Merge: 81c5e05 1a93542 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Tue May 25 15:28:21 2021 -0500 Merge branch 'master' into manual-filters commit 81c5e05760bf7f5d6fc05290e662ab61f9a4b73b Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Tue May 25 15:21:03 2021 -0500 Makes colorings on top bar elements consistent commit fa7f6c22680f5f00b89c7ea99032b409a5f8bbd2 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Tue May 25 14:58:25 2021 -0500 Makes requested changes, adds different version of filter button commit 7dc65b9b7a5a9678499a7c404109e710ae7da36d Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Sat May 22 04:29:01 2021 -0500 Changelog commit c684f1c76a2599324c19ca32de10b2f2849fd5e9 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Sat May 22 04:26:14 2021 -0500 Various UI Improvements - Makes edit buttons full-length & properly sized - Adds remove filter button in edit menu commit a632e7a8eea4a9897052cb08d3f7605403c227f7 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Sat May 22 03:11:50 2021 -0500 Adds tests for exclusions and wildcards commit eb91a7942b662d412511a4c47501a9b6d7f2d625 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Sat May 22 03:02:23 2021 -0500 Fixes editing UX on list view commit 6209d72aeede6aa8ce4f8e009d2ea168bb8f77a7 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri May 21 04:01:17 2021 -0500 Bugfix in realtime view, formatting commit 007d44df38dba254154b3450aacec9dd253ccd95 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri May 21 03:23:16 2021 -0500 Second pass - mostly everything user-facing is done Still needs: - Tests - Potentially negating other filters - Potentially some code cleanup commit cb7b5b9fbd83f618cf4ebbe6582a9202b4989033 Author: Vignesh Joglekar <rexvigasaurus@gmail.com> Date: Fri May 21 01:49:52 2021 -0500 First pass on manual filter & path regex/negated filters Still needs: - Form structure on filter modal - Edit filter button - Filter dropdown UI improvement - Filter modal mount data collection - Tests - Potentially negating other filters * Fixes an issue between the updated React version and Flatpickr not showing up Reverting to v16 was the simplest fix without diving into the issue upstream with Flatpickr * Resolves comments on UI and code style Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2021-06-21 14:42:16 +03:00
get "/:domain/suggestions/:filter_name", StatsController, :filter_suggestions
end
scope "/api/v1/stats", PlausibleWeb.Api do
pipe_through [:public_api, PlausibleWeb.AuthorizeStatsApiPlug]
get "/realtime/visitors", ExternalStatsController, :realtime_visitors
get "/aggregate", ExternalStatsController, :aggregate
get "/breakdown", ExternalStatsController, :breakdown
get "/timeseries", ExternalStatsController, :timeseries
end
scope "/api/v1/sites", PlausibleWeb.Api do
pipe_through [:public_api, PlausibleWeb.AuthorizeSitesApiPlug]
post "/", ExternalSitesController, :create_site
2021-11-30 12:21:56 +03:00
delete "/:site_id", ExternalSitesController, :delete_site
2021-04-15 11:38:44 +03:00
put "/shared-links", ExternalSitesController, :find_or_create_shared_link
put "/goals", ExternalSitesController, :find_or_create_goal
delete "/goals/:goal_id", ExternalSitesController, :delete_goal
end
2019-09-02 14:29:19 +03:00
scope "/api", PlausibleWeb do
pipe_through :api
2019-10-31 06:49:46 +03:00
post "/event", Api.ExternalController, :event
2019-09-02 14:29:19 +03:00
get "/error", Api.ExternalController, :error
2020-07-20 10:34:35 +03:00
get "/health", Api.ExternalController, :health
2019-09-02 14:29:19 +03:00
post "/paddle/webhook", Api.PaddleController, :webhook
get "/:domain/status", Api.InternalController, :domain_status
get "/sites", Api.InternalController, :sites
2019-09-02 14:29:19 +03:00
end
scope "/", PlausibleWeb do
pipe_through [:browser, :csrf]
2019-09-02 14:29:19 +03:00
get "/register", AuthController, :register_form
post "/register", AuthController, :register
get "/register/invitation/:invitation_id", AuthController, :register_from_invitation_form
post "/register/invitation/:invitation_id", AuthController, :register_from_invitation
get "/activate", AuthController, :activate_form
post "/activate/request-code", AuthController, :request_activation_code
post "/activate", AuthController, :activate
2019-09-02 14:29:19 +03:00
get "/login", AuthController, :login_form
post "/login", AuthController, :login
get "/password/request-reset", AuthController, :password_reset_request_form
post "/password/request-reset", AuthController, :password_reset_request
get "/password/reset", AuthController, :password_reset_form
post "/password/reset", AuthController, :password_reset
end
scope "/", PlausibleWeb do
pipe_through [:shared_link]
get "/share/:slug", StatsController, :shared_link
post "/share/:slug/authenticate", StatsController, :authenticate_shared_link
end
scope "/", PlausibleWeb do
pipe_through [:browser, :csrf]
2019-09-02 14:29:19 +03:00
get "/password", AuthController, :password_form
post "/password", AuthController, :set_password
get "/logout", AuthController, :logout
2019-09-02 14:29:19 +03:00
get "/settings", AuthController, :user_settings
put "/settings", AuthController, :save_settings
delete "/me", AuthController, :delete_me
get "/settings/api-keys/new", AuthController, :new_api_key
post "/settings/api-keys", AuthController, :create_api_key
delete "/settings/api-keys/:id", AuthController, :delete_api_key
2019-09-02 14:29:19 +03:00
get "/auth/google/callback", AuthController, :google_auth_callback
get "/", PageController, :index
get "/billing/change-plan", BillingController, :change_plan_form
get "/billing/change-plan/preview/:plan_id", BillingController, :change_plan_preview
post "/billing/change-plan/:new_plan_id", BillingController, :change_plan
2019-09-02 14:29:19 +03:00
get "/billing/upgrade", BillingController, :upgrade
2021-03-16 13:03:50 +03:00
get "/billing/upgrade/:plan_id", BillingController, :upgrade_to_plan
2021-10-20 17:49:11 +03:00
get "/billing/upgrade/enterprise/:plan_id", BillingController, :upgrade_enterprise_plan
get "/billing/change-plan/enterprise/:plan_id", BillingController, :change_enterprise_plan
get "/billing/upgrade-success", BillingController, :upgrade_success
2019-09-02 14:29:19 +03:00
2020-03-31 16:16:21 +03:00
get "/sites", SiteController, :index
2019-09-02 14:29:19 +03:00
get "/sites/new", SiteController, :new
post "/sites", SiteController, :create_site
post "/sites/:website/make-public", SiteController, :make_public
post "/sites/:website/make-private", SiteController, :make_private
2019-09-09 14:37:57 +03:00
post "/sites/:website/weekly-report/enable", SiteController, :enable_weekly_report
post "/sites/:website/weekly-report/disable", SiteController, :disable_weekly_report
post "/sites/:website/weekly-report/recipients", SiteController, :add_weekly_report_recipient
Formatting only changes - No code change (#75) * first commit with test and compile job Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding 'prepare' stage Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated ci script to include "test" compile phase Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding environment variables for connecting to postgresql Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated ci config for postgres Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * using non-alpine version of elixir Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * re-using the 'compile' artifacts and added explict env variables for testing Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * removing redundant deps fetching from common code Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * formatting using mix.format -- beware no-code changes! Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * added release config Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding consistent env variable for Database Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * more cleaning up of environment variables Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding releases config for enabling releases Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * cleaning up env configs Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Cleaned up config and prepared config for releases Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated CI script with new config for test Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added Dockerfile for creating production docker image Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding "docker" build job yay! Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * using non-slim version of debian and installing webpack Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding overlays for migrations on releases Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * restricting the docker built to master branch only Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * typo fix Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding "Hosting.md" to explain hosting instructions Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * removed the default comments Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added documentation related to env variables * updated documentation and fixed typo Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated documentation * Bumping up elixir version as `overlays` are only supported in latest version read release notes: https://github.com/elixir-lang/elixir/releases/tag/v1.10.0 Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding tarball assembly during release Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated HOSTING.md Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added support for db migration Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * minor corrections Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * initializing admin user Admin user has been added in the "migration" phase. A default user is automatically created in the process. One can provide the related env variables, else a new one will be automatically created for you. Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Initial base domain update - phase#1 These changes are only meant for correct operating it under self-hosting. There are many other cosmetic changes, that require updates to email, site and other places where the original website and author is used. Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Using dedicated config variable `base_domain` instead Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding base_domain to releases config Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * removing the dedicated config "base_domain", relying on endpoint host Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Removed the usage of "Mix" in code! It is bad practice to use "mix" module inside the code as in actual release this module is unavailable. Replacing this with a config environment variable Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added support for SMTP via Bamboo Smtp Adapter Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Capturing SMTP errors via Sentry Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Minor updates Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding junit formatter -- useful for generating test reports Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding documentation for default user * Resolve "Gitlab Adoption: Add supported services in "Security & Compliance"" * bumping up the debian version to fix issues fixing some vulnerabilities identified by the scanning tools * More updates for self-hosting Changes in most of the places to suit self-hosting. Although, there are some which have been left-off. Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * quick-dirty-fix! * bumping up the db connect timeout Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * bumping up the db connect timeout Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * bumping up the db connect timeout Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * bumping up timeout - skipping MRs :-/ * removing restrictions on watching for changes this stuff isn't working * Update HOSTING.md * renamed the module name * reverting formatting-whitespace changes Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * reverting the name to release Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding docker-compose.yml and related instructions Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * using `plausible_url` instead of assuming `https` this is because, it is much to test in local dev machines and in most cases there's already a layer above which is capable for `https` termination and http -> https upgrade Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * WIP: merging changes from upstream Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * wip: more changes * Pushing in changes from upstream Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * changes to ci for testing Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * cleaning up and finishing clickhouse integration Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updating readme with hosting details * removing deleted files from upstream * minor config adjustments Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * formatting changes Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>
2020-06-08 10:35:13 +03:00
delete "/sites/:website/weekly-report/recipients/:recipient",
SiteController,
:remove_weekly_report_recipient
2019-09-09 14:37:57 +03:00
post "/sites/:website/monthly-report/enable", SiteController, :enable_monthly_report
post "/sites/:website/monthly-report/disable", SiteController, :disable_monthly_report
Formatting only changes - No code change (#75) * first commit with test and compile job Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding 'prepare' stage Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated ci script to include "test" compile phase Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding environment variables for connecting to postgresql Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated ci config for postgres Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * using non-alpine version of elixir Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * re-using the 'compile' artifacts and added explict env variables for testing Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * removing redundant deps fetching from common code Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * formatting using mix.format -- beware no-code changes! Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * added release config Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding consistent env variable for Database Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * more cleaning up of environment variables Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding releases config for enabling releases Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * cleaning up env configs Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Cleaned up config and prepared config for releases Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated CI script with new config for test Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added Dockerfile for creating production docker image Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding "docker" build job yay! Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * using non-slim version of debian and installing webpack Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding overlays for migrations on releases Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * restricting the docker built to master branch only Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * typo fix Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding "Hosting.md" to explain hosting instructions Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * removed the default comments Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added documentation related to env variables * updated documentation and fixed typo Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated documentation * Bumping up elixir version as `overlays` are only supported in latest version read release notes: https://github.com/elixir-lang/elixir/releases/tag/v1.10.0 Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding tarball assembly during release Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updated HOSTING.md Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added support for db migration Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * minor corrections Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * initializing admin user Admin user has been added in the "migration" phase. A default user is automatically created in the process. One can provide the related env variables, else a new one will be automatically created for you. Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Initial base domain update - phase#1 These changes are only meant for correct operating it under self-hosting. There are many other cosmetic changes, that require updates to email, site and other places where the original website and author is used. Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Using dedicated config variable `base_domain` instead Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding base_domain to releases config Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * removing the dedicated config "base_domain", relying on endpoint host Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Removed the usage of "Mix" in code! It is bad practice to use "mix" module inside the code as in actual release this module is unavailable. Replacing this with a config environment variable Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Added support for SMTP via Bamboo Smtp Adapter Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Capturing SMTP errors via Sentry Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Minor updates Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * Adding junit formatter -- useful for generating test reports Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding documentation for default user * Resolve "Gitlab Adoption: Add supported services in "Security & Compliance"" * bumping up the debian version to fix issues fixing some vulnerabilities identified by the scanning tools * More updates for self-hosting Changes in most of the places to suit self-hosting. Although, there are some which have been left-off. Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * quick-dirty-fix! * bumping up the db connect timeout Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * bumping up the db connect timeout Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * bumping up the db connect timeout Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * bumping up timeout - skipping MRs :-/ * removing restrictions on watching for changes this stuff isn't working * Update HOSTING.md * renamed the module name * reverting formatting-whitespace changes Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * reverting the name to release Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * adding docker-compose.yml and related instructions Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * using `plausible_url` instead of assuming `https` this is because, it is much to test in local dev machines and in most cases there's already a layer above which is capable for `https` termination and http -> https upgrade Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * WIP: merging changes from upstream Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * wip: more changes * Pushing in changes from upstream Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * changes to ci for testing Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * cleaning up and finishing clickhouse integration Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * updating readme with hosting details * removing deleted files from upstream * minor config adjustments Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me> * formatting changes Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>
2020-06-08 10:35:13 +03:00
post "/sites/:website/monthly-report/recipients",
SiteController,
:add_monthly_report_recipient
delete "/sites/:website/monthly-report/recipients/:recipient",
SiteController,
:remove_monthly_report_recipient
post "/sites/:website/spike-notification/enable", SiteController, :enable_spike_notification
post "/sites/:website/spike-notification/disable", SiteController, :disable_spike_notification
put "/sites/:website/spike-notification", SiteController, :update_spike_notification
post "/sites/:website/spike-notification/recipients",
SiteController,
:add_spike_notification_recipient
delete "/sites/:website/spike-notification/recipients/:recipient",
SiteController,
:remove_spike_notification_recipient
get "/sites/:website/shared-links/new", SiteController, :new_shared_link
post "/sites/:website/shared-links", SiteController, :create_shared_link
get "/sites/:website/shared-links/:slug/edit", SiteController, :edit_shared_link
put "/sites/:website/shared-links/:slug", SiteController, :update_shared_link
delete "/sites/:website/shared-links/:slug", SiteController, :delete_shared_link
2020-06-30 11:00:19 +03:00
delete "/sites/:website/custom-domains/:id", SiteController, :delete_custom_domain
get "/sites/:website/memberships/invite", Site.MembershipController, :invite_member_form
post "/sites/:website/memberships/invite", Site.MembershipController, :invite_member
post "/sites//invitations/:invitation_id/accept", InvitationController, :accept_invitation
post "/sites//invitations/:invitation_id/reject", InvitationController, :reject_invitation
delete "/sites//invitations/:invitation_id", InvitationController, :remove_invitation
get "/sites/:website/transfer-ownership", Site.MembershipController, :transfer_ownership_form
post "/sites/:website/transfer-ownership", Site.MembershipController, :transfer_ownership
put "/sites/:website/memberships/:id/role/:new_role", Site.MembershipController, :update_role
delete "/sites/:website/memberships/:id", Site.MembershipController, :remove_member
get "/sites/:website/weekly-report/unsubscribe", UnsubscribeController, :weekly_report
get "/sites/:website/monthly-report/unsubscribe", UnsubscribeController, :monthly_report
2019-09-02 14:29:19 +03:00
get "/:website/snippet", SiteController, :add_snippet
get "/:website/settings", SiteController, :settings
2020-11-06 14:30:38 +03:00
get "/:website/settings/general", SiteController, :settings_general
get "/:website/settings/people", SiteController, :settings_people
2020-11-19 15:57:55 +03:00
get "/:website/settings/visibility", SiteController, :settings_visibility
2020-11-06 14:30:38 +03:00
get "/:website/settings/goals", SiteController, :settings_goals
2020-11-16 16:38:44 +03:00
get "/:website/settings/search-console", SiteController, :settings_search_console
get "/:website/settings/email-reports", SiteController, :settings_email_reports
get "/:website/settings/custom-domain", SiteController, :settings_custom_domain
2020-11-19 15:57:55 +03:00
get "/:website/settings/danger-zone", SiteController, :settings_danger_zone
2019-10-31 08:39:51 +03:00
get "/:website/goals/new", SiteController, :new_goal
post "/:website/goals", SiteController, :create_goal
2019-10-31 09:20:45 +03:00
delete "/:website/goals/:id", SiteController, :delete_goal
2019-09-02 14:29:19 +03:00
put "/:website/settings", SiteController, :update_settings
put "/:website/settings/google", SiteController, :update_google_auth
2020-06-30 11:11:47 +03:00
delete "/:website/settings/google", SiteController, :delete_google_auth
2019-09-02 14:29:19 +03:00
delete "/:website", SiteController, :delete_site
delete "/:website/stats", SiteController, :reset_stats
2019-09-02 14:29:19 +03:00
get "/:domain/export", StatsController, :csv_export
get "/:domain/*path", StatsController, :stats
2019-09-02 14:29:19 +03:00
end
end