Website: Update /try-fleet (#17608)

Changes:
- Added `/start`, a page where users can choose whether to run a local
demo of Fleet, or purchase a Fleet Premium license
- Updated all "Try it now" links to go to the `/register` page.
- Updated the URL and added redirects:
   - `/customers/new-license` » `/new-license`
   - `/try-fleet/fleetctl-preview` » `/try-fleet`
   - `/customers/register` » `/register`
   - `/customers/login` » `/login`
- Removed the `/try-fleet/login` and `/try-fleet/register` pages
- Updated the /try-fleet/explore-data pages to redirect logged-out-users
to the /register page
- Updated policies, routes, and importer.less

---------

Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
This commit is contained in:
Eric
2024-03-14 10:28:23 -05:00
committed by GitHub
co-authored by Mike Thomas
parent 7e4964385c
commit b36256a053
38 changed files with 326 additions and 656 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = {
fn: async function () {
if (this.req.me) {
throw {redirect: '/customers/new-license'};
throw {redirect: '/start'};
}
return {};
+1 -1
View File
@@ -56,7 +56,7 @@ module.exports = {
// If the requesting user is not logged in, redirect them to the /try-fleet/register page with the specified hostPlatform added as a query parameter.
if(!this.req.me){
throw {redirect: `/try-fleet/register?targetPlatform=${encodeURIComponent(hostPlatform)}` };
throw {redirect: `/register?targetPlatform=${encodeURIComponent(hostPlatform)}` };
}
if(!sails.config.custom.queryIdsByTableName){
-38
View File
@@ -1,38 +0,0 @@
module.exports = {
friendlyName: 'View register',
description: 'Display "Register" page. Note: This page is the "signup" page skinned for Fleet Sandbox.',
exits: {
success: {
viewTemplatePath: 'pages/try-fleet/register'
},
redirect: {
description: 'The requesting user is already logged in.',
responseType: 'redirect'
}
},
fn: async function () {
// If the user is logged in, redirect them to the Fleet sandbox page.
// FUTURE: once all Sandbox instances have expired, redirect users to the fleetctl-preview page.
if (this.req.me) {
throw {redirect: '/try-fleet/sandbox'};
}
// Respond with view.
return {};
}
};
-38
View File
@@ -1,38 +0,0 @@
module.exports = {
friendlyName: 'View Sandbox login',
description: 'Display the "Sandbox Login" page. Note: This page is the "login" page skinned for Fleet Sandbox.',
exits: {
success: {
viewTemplatePath: 'pages/try-fleet/sandbox-login'
},
redirect: {
description: 'The requesting user is already logged in.',
responseType: 'redirect'
}
},
fn: async function () {
// If the user is logged in, redirect them to the Fleet sandbox page.
if (this.req.me) {
throw {redirect: '/try-fleet/sandbox'};
}
// Respond with view.
return {};
}
};
+27
View File
@@ -0,0 +1,27 @@
module.exports = {
friendlyName: 'View start',
description: 'Display "Start" page.',
exits: {
success: {
viewTemplatePath: 'pages/start'
}
},
fn: async function () {
// Respond with view.
return {};
}
};