2020-12-02 20:48:03 +00:00
/ * *
* Route Mappings
* ( sails . config . routes )
*
* Your routes tell Sails what to do each time it receives a request .
*
* For more information on configuring custom routes , check out :
* https : //sailsjs.com/anatomy/config/routes-js
* /
module . exports . routes = {
// ╦ ╦╔═╗╔╗ ╔═╗╔═╗╔═╗╔═╗╔═╗
// ║║║║╣ ╠╩╗╠═╝╠═╣║ ╦║╣ ╚═╗
// ╚╩╝╚═╝╚═╝╩ ╩ ╩╚═╝╚═╝╚═╝
2021-09-16 07:23:59 +00:00
'GET /' : {
action : 'view-homepage-or-redirect' ,
locals : { isHomepage : true }
} ,
2020-12-02 20:48:03 +00:00
2021-09-16 07:23:59 +00:00
'GET /company/contact' : {
action : 'view-contact' ,
2021-10-11 05:42:07 +00:00
locals : {
2021-10-01 02:14:02 +00:00
pageTitleForMeta : 'Contact us | Fleet for osquery' ,
pageDescriptionForMeta : 'Get in touch with our team.'
2021-09-16 07:23:59 +00:00
}
} ,
2021-05-28 22:51:47 +00:00
2021-09-16 07:23:59 +00:00
'GET /get-started' : {
action : 'view-get-started' ,
2021-10-11 05:42:07 +00:00
locals : {
currentPage : 'get started' ,
2021-10-01 02:14:02 +00:00
pageTitleForMeta : 'Get started | Fleet for osquery' ,
pageDescriptionForMeta : 'Learn about getting started with Fleet.'
2021-09-16 07:23:59 +00:00
}
} ,
2021-07-09 05:58:40 +00:00
2021-09-16 07:23:59 +00:00
'GET /pricing' : {
action : 'view-pricing' ,
2021-10-11 05:42:07 +00:00
locals : {
currentPage : 'pricing' ,
2021-10-01 02:14:02 +00:00
pageTitleForMeta : 'Pricing | Fleet for osquery' ,
pageDescriptionForMeta : 'View Fleet plans and pricing details.'
2021-09-16 07:23:59 +00:00
}
} ,
2021-10-04 04:28:20 +00:00
'GET /logos' : {
2021-09-16 07:23:59 +00:00
action : 'view-press-kit' ,
2021-10-11 05:42:07 +00:00
locals : {
2021-10-04 04:28:20 +00:00
pageTitleForMeta : 'Logos | Fleet for osquery' ,
2021-10-01 02:14:02 +00:00
pageDescriptionForMeta : 'Download Fleet logos, wallpapers, and screenshots.'
2021-09-16 07:23:59 +00:00
}
} ,
'GET /queries' : {
action : 'view-query-library' ,
2021-10-11 05:42:07 +00:00
locals : {
currentPage : 'queries' ,
2021-10-01 02:14:02 +00:00
pageTitleForMeta : 'Queries | Fleet for osquery' ,
pageDescriptionForMeta : 'A growing collection of useful queries for organizations deploying Fleet and osquery.'
2021-09-16 07:23:59 +00:00
}
} ,
'GET /queries/:slug' : {
action : 'view-query-detail' ,
2021-10-11 05:42:07 +00:00
locals : {
currentPage : 'queries' ,
}
2021-09-16 07:23:59 +00:00
} ,
2022-01-17 19:13:11 +00:00
'GET /docs/?*' : {
2021-09-16 07:23:59 +00:00
skipAssets : false ,
action : 'docs/view-basic-documentation' ,
2021-10-11 05:42:07 +00:00
locals : {
currentPage : 'docs' ,
}
2022-01-17 19:13:11 +00:00
} , // handles /docs and /docs/foo/bar
2021-09-16 07:23:59 +00:00
Implement /handbook on fleetdm.com (#2230)
* uncomment handbook route, disable redirect, add link to top nav
* Handbook page, note: most of this is directly copied from the docs, build handbook
* added maintainer <meta> tags
* handbook styles
* handbook broken up into different files
* update handbook layout
* updating markdown files
* handbook layout, adjusted header margins to make room for handbook
* handling links to specific sections in markdown compilation
* lint fixes
* commented out search bar for now
* cleaned up page script
* update handbook and clean up styles
* Delete handbook.md
* updated product content from latest version
* clean up styles, remove hardcoded image widths
* markdown updates
* title and description for /handbook, removed commented out route
* fix styles on firefox, remove commented logs
* lint fix
* update class name
* fix broken link
* updated how hashes are handled in links, adjusted links in handbook
* lint fix
* updated function names, removed comments, small markdown syntax fix
* move handbook link into footer
2021-09-28 01:16:49 +00:00
'GET /handbook/?*' : {
skipAssets : false ,
action : 'handbook/view-basic-handbook' ,
} , // handles /handbook and /handbook/foo/bar
2021-09-16 07:23:59 +00:00
'GET /transparency' : {
action : 'view-transparency' ,
2021-10-11 05:42:07 +00:00
locals : {
2021-10-01 02:14:02 +00:00
pageTitleForMeta : 'Transparency | Fleet for osquery' ,
pageDescriptionForMeta : 'Learn what data osquery can see.' ,
2021-09-16 07:23:59 +00:00
}
} ,
Add customer portal and license dispenser to fleetdm.com (#3546)
* Add images for customer portal, dashboard, and email templates
* updated email layout and reset password template, new email template
* update ajax-button component to have an optional spinner
* updated cloud-error & stripe-card-element component styles
* updates to user model, add quote and subscription
* Login, signup, forgot password, update profile
* link to customer portal from pricing
* new-license page, bootstrap updates
* create quote action, dashboard page, update routes
* Add new page styles to importer, update component styles
* updates to js-timestamp
* update modal styles and layout
* using @submitted on ajax form, controller updates
* Update create-quote.js
* updates to quote model, action updates, truncate license key on dashboard
* update email layout, subscribe action, user model
* Update importer.less
* style updates, order confirmation
* use correct font
* style updates
* create license key
* new-license page changes
* signup page changes
* add billing format to js-timestamp component, dashboard updates, change password
* swap get started link for customers
* order -> subscription
* Update login.ejs
* Lint fixes, page updates, mobile styles
* remove edit-profile route, update layout, bootstrap, forms
* change customer-layout name to match other layout names, update copyright year in layouts
* changes requested from code review and #3570
* submit button width, contact font-size
* Update dashboard.less
* Update bootstrap-overrides.less
* slack logo update, login text
2022-01-05 02:02:42 +00:00
'GET /customers/new-license' : {
action : 'customers/view-new-license' ,
locals : {
layout : 'layouts/layout-customer' ,
pageTitleForMeta : 'Get Fleet Premium | Fleet for osquery' ,
pageDescriptionForMeta : 'Generate your quote and start using Fleet Premium today.' ,
}
} ,
'GET /customers/register' : {
action : 'entrance/view-signup' ,
locals : {
layout : 'layouts/layout-customer' ,
pageTitleForMeta : 'Sign up | Fleet for osquery' ,
pageDescriptionForMeta : 'Sign up for a Fleet Premium license.' ,
}
} ,
'GET /customers/login' : {
action : 'entrance/view-login' ,
locals : {
layout : 'layouts/layout-customer' ,
pageTitleForMeta : 'Log in | Fleet for osquery' ,
pageDescriptionForMeta : 'Log in to the Fleet customer portal.' ,
}
} ,
'GET /customers/dashboard' : {
action : 'customers/view-dashboard' ,
locals : {
layout : 'layouts/layout-customer' ,
pageTitleForMeta : 'Customer dashboard | Fleet for osquery' ,
pageDescriptionForMeta : 'View and edit information about your Fleet Premium license.' ,
}
} ,
'GET /customers/forgot-password' : {
action : 'entrance/view-forgot-password' ,
locals : {
layout : 'layouts/layout-customer' ,
pageTitleForMeta : 'Forgot password | Fleet for osquery' ,
pageDescriptionForMeta : 'Recover the password for your Fleet customer account.' ,
}
} ,
'GET /customers/new-password' : {
action : 'entrance/view-new-password' ,
locals : {
layout : 'layouts/layout-customer' ,
pageTitleForMeta : 'New password | Fleet for osquery' ,
pageDescriptionForMeta : 'Change the password for your Fleet customer account.' ,
}
} ,
2021-08-28 01:27:32 +00:00
2022-01-25 03:40:16 +00:00
'GET /platform' : {
action : 'view-platform' ,
locals : {
currentPage : 'platform' ,
pageTitleForMeta : 'Platform | Fleet for osquery' ,
pageDescriptionForMeta : 'Learn about the Fleet\'s features.' ,
}
} ,
Put live documentation on fleetdm.com (#1380)
* minor clarifications
* further expand comments and stubs
* absorb custom titles embedded in metadata, plus further comment expansion and a followup fix for something i left hanging in f8cbc14829d91e7577c63307fd9c4346dbc229bb
* Skip non-markdown files and use real path maths
* Prep for running in parallel (Remove `continue` so this isn't dependent on the `for` loop)
* determine + track unique HTML output paths
* Compile markdown + spit out real HTML (without involving any but the crunchy nougaty dependency from the very center of everything)
* add md metadata parsing
* add timestamp
* Update build-static-content.js
* attach misc metadata as "other"
* how doc images might should work (this also aligns with how the select few images in the sailsjs.com docs work)
* add file extension to generated HTML files
* "options"=>"meta"
* Make "htmlId" useful for alphabetically sorting pages within their bottom-level section
See recent comments on https://github.com/fleetdm/fleet/issues/706 for more information.
* list out the most important, specific build-time transformations
* Omit ordering prefixes like "1-" from expected content page URLs
* add a little zone for consolidating backwards compatible permalinks
* interpret README.md files by mapping their URLs to match their containing folder
* clarify plan for images
* decrease probability of collisions
* Make capitalization smarter using known acronyms, proper nouns, and a smarter numeric word trim
* Resolve app path in case pwd is different in prod
* Delete HTML output from previous runs, if any
* condense the stuff about github emojis
* got rid of "permalink" thing, since id gets automatically attached during markdown compilation anyway
Also "permalink" isn't even a good name for what this is. See https://github.com/fleetdm/fleet/issues/706#issuecomment-884693931
* …and that eliminates the need for the cheerio dep!
* Bring in bubbles+syntax highlighting into build script, and remove sails.helpers.compileMarkdownContent() -- this leaves link munging as a todo though
* trivial (condense comments)
* Remove unused code from toHtml() helper
* Implemented target="_blank" and root-relative-ification
* remove todo about emojis after testing and verifying it works just fine
* trivial: add link to comment in case github emojis matter at some point
* consolidate "what ifs" in comments
* Leave this up to Sarah, for now. (Either bring it back here in the build script or do it all on the frontend)
* Enable /docs and /handbook routes, and add example of a redirect for a legacy/deprecated URL
* implement routing
* Upgrade deps
this takes advantages of the latest work from @eashaw, @rachaelshaw, and the rest of the Sails community
* tweak var names and comments
* make readme pages use their folder names to determine their default (fallback) titles
as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884788002
* first (good enough for now) pass at link rewriting
as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884742072
* Adapt docs pages to build from markdown output
* Continue work on docs pages
* Add landing page
* Remove unused code; minor changes
* Replace regex
* fixes https://github.com/fleetdm/fleet/pull/1380#issuecomment-891429581
* Don't rely on "path" being a global var
* Syle fleetdm doc pages
* Continue work on docs pages
* Fix linting error
* Disable lesshint style warnings
* parasails-has-no-page-script attribute
Added a parasails-has-no-page-script attribute to the docs template, added a check for that attribute in parasails.js and removed the empty page script for 498
* bring in latest parasails dep
* trivial
* Update links to dedupe and not open in new tab unless actually external
* Disable handbook for now til styles are ready
* fix CTA links
* trivial
* make sitemap.xml get served in prod
* hide search boxes for now, remove hard-coded version and make releases open in new tab
* clean out unused files
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: eashaw <caglc@live.com>
2021-08-18 00:55:13 +00:00
// ╦ ╔═╗╔═╗╔═╗╔═╗╦ ╦ ╦═╗╔═╗╔╦╗╦╦═╗╔═╗╔═╗╔╦╗╔═╗
// ║ ║╣ ║ ╦╠═╣║ ╚╦╝ ╠╦╝║╣ ║║║╠╦╝║╣ ║ ║ ╚═╗
// ╩═╝╚═╝╚═╝╩ ╩╚═╝ ╩ ╩╚═╚═╝═╩╝╩╩╚═╚═╝╚═╝ ╩ ╚═╝
// ┌─ ┌─┐┌─┐┬─┐ ┌┐ ┌─┐┌─┐┬┌─┬ ┬┌─┐┬─┐┌┬┐┌─┐ ┌─┐┌─┐┌┬┐┌─┐┌─┐┌┬┐ ─┐
// │ ├┤ │ │├┬┘ ├┴┐├─┤│ ├┴┐│││├─┤├┬┘ ││└─┐ │ │ ││││├─┘├─┤ │ │
// └─ └ └─┘┴└─ └─┘┴ ┴└─┘┴ ┴└┴┘┴ ┴┴└──┴┘└─┘ └─┘└─┘┴ ┴┴ ┴ ┴ ┴o ─┘
2021-08-28 01:27:32 +00:00
// Add redirects here for deprecated/legacy links, so that they go to an appropriate new place instead of just being broken when pages move or get renamed.
//
// For example:
// If we were going to change fleetdm.com/company/about to fleetdm.com/company/story, we might do something like:
// ```
// 'GET /company/about': '/company/story',
// ```
//
// Or another example, if we were to rename a doc page:
// ```
// 'GET /docs/using-fleet/learn-how-to-use-fleet': '/docs/using-fleet/fleet-for-beginners',
// ```
'GET /try-fleet' : '/get-started' ,
2021-10-22 18:43:24 +00:00
'GET /docs/deploying/fleet-public-load-testing' : '/docs/deploying/load-testing' ,
2022-01-17 19:13:11 +00:00
'GET /handbook/customer-experience' : '/handbook/customers' ,
2022-01-28 00:59:24 +00:00
'GET /handbook/growth' : '/handbook/brand' ,
2021-08-28 01:27:32 +00:00
2020-12-02 20:48:03 +00:00
// ╔╦╗╦╔═╗╔═╗ ╦═╗╔═╗╔╦╗╦╦═╗╔═╗╔═╗╔╦╗╔═╗ ┬ ╔╦╗╔═╗╦ ╦╔╗╔╦ ╔═╗╔═╗╔╦╗╔═╗
// ║║║║╚═╗║ ╠╦╝║╣ ║║║╠╦╝║╣ ║ ║ ╚═╗ ┌┼─ ║║║ ║║║║║║║║ ║ ║╠═╣ ║║╚═╗
// ╩ ╩╩╚═╝╚═╝ ╩╚═╚═╝═╩╝╩╩╚═╚═╝╚═╝ ╩ ╚═╝ └┘ ═╩╝╚═╝╚╩╝╝╚╝╩═╝╚═╝╩ ╩═╩╝╚═╝
2021-05-06 02:27:58 +00:00
// Convenience
2021-08-28 01:27:32 +00:00
// =============================================================================================================
// Things that people are used to typing in to the URL and just randomly trying.
//
// For example, a clever user might try to visit fleetdm.com/documentation, not knowing that Fleet's website
// puts this kind of thing under /docs, NOT /documentation. These "convenience" redirects are to help them out.
'GET /documentation' : '/docs' ,
'GET /contribute' : '/docs/contribute' ,
'GET /install' : '/get-started' ,
'GET /company' : '/company/about' ,
'GET /company/about' : '/handbook' , // FUTURE: brief "about" page explaining the origins of the company
'GET /support' : '/company/contact' ,
'GET /contact' : '/company/contact' ,
'GET /legal' : '/legal/terms' ,
'GET /terms' : '/legal/terms' ,
Add customer portal and license dispenser to fleetdm.com (#3546)
* Add images for customer portal, dashboard, and email templates
* updated email layout and reset password template, new email template
* update ajax-button component to have an optional spinner
* updated cloud-error & stripe-card-element component styles
* updates to user model, add quote and subscription
* Login, signup, forgot password, update profile
* link to customer portal from pricing
* new-license page, bootstrap updates
* create quote action, dashboard page, update routes
* Add new page styles to importer, update component styles
* updates to js-timestamp
* update modal styles and layout
* using @submitted on ajax form, controller updates
* Update create-quote.js
* updates to quote model, action updates, truncate license key on dashboard
* update email layout, subscribe action, user model
* Update importer.less
* style updates, order confirmation
* use correct font
* style updates
* create license key
* new-license page changes
* signup page changes
* add billing format to js-timestamp component, dashboard updates, change password
* swap get started link for customers
* order -> subscription
* Update login.ejs
* Lint fixes, page updates, mobile styles
* remove edit-profile route, update layout, bootstrap, forms
* change customer-layout name to match other layout names, update copyright year in layouts
* changes requested from code review and #3570
* submit button width, contact font-size
* Update dashboard.less
* Update bootstrap-overrides.less
* slack logo update, login text
2022-01-05 02:02:42 +00:00
'GET /login' : '/customers/login' ,
2021-07-09 05:58:40 +00:00
// Sitemap
2021-08-28 01:27:32 +00:00
// =============================================================================================================
// This is for search engines, not humans. Search engines know to visit fleetdm.com/sitemap.xml to download this
// XML file, which helps search engines know which pages are available on the website.
2021-07-09 05:58:40 +00:00
'GET /sitemap.xml' : { action : 'download-sitemap' } ,
2021-08-28 01:27:32 +00:00
// Potential future pages
// =============================================================================================================
// Things that are not webpages here (in the Sails app) yet, but could be in the future. For now they are just
// redirects to somewhere else EXTERNAL to the Sails app.
'GET /security' : 'https://github.com/fleetdm/fleet/security/policy' ,
'GET /brand' : '/contact' , // FUTURE: a page like sailsjs.com/logos
'GET /blog' : 'https://blog.fleetdm.com' , // Currently, Fleet's blog lives outside of this website source code (the Sails app). We always link to fleetdm.com/blog, but since the blog lives elsewhere, we redirect to it.
'GET /hall-of-fame' : 'https://github.com/fleetdm/fleet/pulse' ,
'GET /apply' : 'https://fleet-device-management.breezy.hr' ,
2021-12-17 23:58:09 +00:00
'GET /jobs' : 'https://fleet-device-management.breezy.hr' ,
2021-08-28 01:27:32 +00:00
'GET /company/stewardship' : 'https://github.com/fleetdm/fleet' , // FUTURE: page about how we approach open source and our commitments to the community
'GET /legal/terms' : 'https://docs.google.com/document/d/1OM6YDVIs7bP8wg6iA3VG13X086r64tWDqBSRudG4a0Y/edit' ,
2021-10-29 00:53:20 +00:00
'GET /legal/privacy' : 'https://docs.google.com/document/d/17i_g1aGpnuSmlqj35-yHJiwj7WRrLdC_Typc1Yb7aBE/edit' ,
Add customer portal and license dispenser to fleetdm.com (#3546)
* Add images for customer portal, dashboard, and email templates
* updated email layout and reset password template, new email template
* update ajax-button component to have an optional spinner
* updated cloud-error & stripe-card-element component styles
* updates to user model, add quote and subscription
* Login, signup, forgot password, update profile
* link to customer portal from pricing
* new-license page, bootstrap updates
* create quote action, dashboard page, update routes
* Add new page styles to importer, update component styles
* updates to js-timestamp
* update modal styles and layout
* using @submitted on ajax form, controller updates
* Update create-quote.js
* updates to quote model, action updates, truncate license key on dashboard
* update email layout, subscribe action, user model
* Update importer.less
* style updates, order confirmation
* use correct font
* style updates
* create license key
* new-license page changes
* signup page changes
* add billing format to js-timestamp component, dashboard updates, change password
* swap get started link for customers
* order -> subscription
* Update login.ejs
* Lint fixes, page updates, mobile styles
* remove edit-profile route, update layout, bootstrap, forms
* change customer-layout name to match other layout names, update copyright year in layouts
* changes requested from code review and #3570
* submit button width, contact font-size
* Update dashboard.less
* Update bootstrap-overrides.less
* slack logo update, login text
2022-01-05 02:02:42 +00:00
'GET /logout' : '/api/v1/account/logout' ,
2021-05-26 08:24:38 +00:00
2020-12-02 20:48:03 +00:00
// ╦ ╦╔═╗╔╗ ╦ ╦╔═╗╔═╗╦╔═╔═╗
// ║║║║╣ ╠╩╗╠═╣║ ║║ ║╠╩╗╚═╗
// ╚╩╝╚═╝╚═╝╩ ╩╚═╝╚═╝╩ ╩╚═╝
2021-08-06 07:52:02 +00:00
'POST /api/v1/webhooks/receive-usage-analytics' : { action : 'webhooks/receive-usage-analytics' , csrf : false } ,
'/api/v1/webhooks/github' : { action : 'webhooks/receive-from-github' , csrf : false } ,
2020-12-02 20:48:03 +00:00
// ╔═╗╔═╗╦ ╔═╗╔╗╔╔╦╗╔═╗╔═╗╦╔╗╔╔╦╗╔═╗
// ╠═╣╠═╝║ ║╣ ║║║ ║║╠═╝║ ║║║║║ ║ ╚═╗
// ╩ ╩╩ ╩ ╚═╝╝╚╝═╩╝╩ ╚═╝╩╝╚╝ ╩ ╚═╝
// Note that, in this app, these API endpoints may be accessed using the `Cloud.*()` methods
// from the Parasails library, or by using those method names as the `action` in <ajax-form>.
Add customer portal and license dispenser to fleetdm.com (#3546)
* Add images for customer portal, dashboard, and email templates
* updated email layout and reset password template, new email template
* update ajax-button component to have an optional spinner
* updated cloud-error & stripe-card-element component styles
* updates to user model, add quote and subscription
* Login, signup, forgot password, update profile
* link to customer portal from pricing
* new-license page, bootstrap updates
* create quote action, dashboard page, update routes
* Add new page styles to importer, update component styles
* updates to js-timestamp
* update modal styles and layout
* using @submitted on ajax form, controller updates
* Update create-quote.js
* updates to quote model, action updates, truncate license key on dashboard
* update email layout, subscribe action, user model
* Update importer.less
* style updates, order confirmation
* use correct font
* style updates
* create license key
* new-license page changes
* signup page changes
* add billing format to js-timestamp component, dashboard updates, change password
* swap get started link for customers
* order -> subscription
* Update login.ejs
* Lint fixes, page updates, mobile styles
* remove edit-profile route, update layout, bootstrap, forms
* change customer-layout name to match other layout names, update copyright year in layouts
* changes requested from code review and #3570
* submit button width, contact font-size
* Update dashboard.less
* Update bootstrap-overrides.less
* slack logo update, login text
2022-01-05 02:02:42 +00:00
'POST /api/v1/deliver-contact-form-message' : { action : 'deliver-contact-form-message' } ,
'POST /api/v1/entrance/send-password-recovery-email' : { action : 'entrance/send-password-recovery-email' } ,
'POST /api/v1/customers/signup' : { action : 'entrance/signup' } ,
'POST /api/v1/account/update-profile' : { action : 'account/update-profile' } ,
'POST /api/v1/account/update-password' : { action : 'account/update-password' } ,
'POST /api/v1/account/update-billing-card' : { action : 'account/update-billing-card' } ,
'POST /api/v1/customers/login' : { action : 'entrance/login' } ,
'/api/v1/account/logout' : { action : 'account/logout' } ,
'POST /api/v1/customers/create-quote' : { action : 'customers/create-quote' } ,
'POST /api/v1/customers/save-billing-info-and-subscribe' : { action : 'customers/save-billing-info-and-subscribe' } ,
'POST /api/v1/entrance/update-password-and-login' : { action : 'entrance/update-password-and-login' } ,
2020-12-02 20:48:03 +00:00
} ;