mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
* feat: update auth sign in report query * fix chart config * fix type error for custom properties in chart attributes --------- Co-authored-by: Jordi Enric <jordi.err@gmail.com>
201 lines
4.6 KiB
TypeScript
201 lines
4.6 KiB
TypeScript
export const getAuthReportAttributes = (isFreePlan: boolean) => [
|
|
{
|
|
id: 'active-users',
|
|
label: 'Active Users',
|
|
valuePrecision: 0,
|
|
hide: false,
|
|
showTooltip: false,
|
|
showLegend: false,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'bar',
|
|
attributes: [
|
|
{ attribute: 'ActiveUsers', provider: 'logs', label: 'Active Users', enabled: true },
|
|
],
|
|
},
|
|
{
|
|
id: 'sign-in-attempts',
|
|
label: 'Sign In Attempts by Type',
|
|
valuePrecision: 0,
|
|
hide: false,
|
|
showTooltip: true,
|
|
showLegend: true,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'bar',
|
|
titleTooltip: 'The total number of sign in attempts by grant type.',
|
|
attributes: [
|
|
{
|
|
attribute: 'SignInAttempts',
|
|
provider: 'logs',
|
|
label: 'Password',
|
|
login_type_provider: 'password',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignInAttempts',
|
|
provider: 'logs',
|
|
label: 'PKCE',
|
|
login_type_provider: 'pkce',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignInAttempts',
|
|
provider: 'logs',
|
|
label: 'Refresh Token',
|
|
login_type_provider: 'token',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignInAttempts',
|
|
provider: 'logs',
|
|
label: 'ID Token',
|
|
login_type_provider: 'id_token',
|
|
enabled: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
id: 'signups',
|
|
label: 'Sign Ups',
|
|
valuePrecision: 0,
|
|
hide: false,
|
|
showTooltip: true,
|
|
showLegend: false,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'bar',
|
|
titleTooltip: 'The total number of sign ups.',
|
|
attributes: [
|
|
{
|
|
attribute: 'TotalSignUps',
|
|
provider: 'logs',
|
|
label: 'Sign Ups',
|
|
enabled: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
id: 'auth-errors',
|
|
label: 'Auth Errors',
|
|
valuePrecision: 0,
|
|
hide: false,
|
|
showTooltip: true,
|
|
showLegend: true,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'bar',
|
|
titleTooltip: 'The total number of auth errors by status code.',
|
|
attributes: [
|
|
{
|
|
attribute: 'ErrorsByStatus',
|
|
provider: 'logs',
|
|
label: 'Auth Errors',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
id: 'password-reset-requests',
|
|
label: 'Password Reset Requests',
|
|
valuePrecision: 0,
|
|
hide: false,
|
|
showTooltip: false,
|
|
showLegend: false,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'bar',
|
|
attributes: [
|
|
{
|
|
attribute: 'PasswordResetRequests',
|
|
provider: 'logs',
|
|
label: 'Password Reset Requests',
|
|
enabled: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
id: 'sign-in-latency',
|
|
label: 'Sign In Latency',
|
|
valuePrecision: 2,
|
|
hide: true, // Jordi: Hidden until we can fix the query
|
|
showTooltip: true,
|
|
showLegend: true,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'line',
|
|
titleTooltip: 'Average latency for sign in operations by grant type.',
|
|
attributes: [
|
|
{
|
|
attribute: 'SignInLatency',
|
|
provider: 'logs',
|
|
label: 'Password',
|
|
grantType: 'password',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignInLatency',
|
|
provider: 'logs',
|
|
label: 'PKCE',
|
|
grantType: 'pkce',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignInLatency',
|
|
provider: 'logs',
|
|
label: 'Refresh Token',
|
|
grantType: 'refresh_token',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignInLatency',
|
|
provider: 'logs',
|
|
label: 'ID Token',
|
|
grantType: 'id_token',
|
|
enabled: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
id: 'sign-up-latency',
|
|
label: 'Sign Up Latency',
|
|
valuePrecision: 2,
|
|
hide: true, // Jordi: Hidden until we can fix the query
|
|
showTooltip: true,
|
|
showLegend: true,
|
|
showMaxValue: false,
|
|
hideChartType: false,
|
|
defaultChartStyle: 'line',
|
|
titleTooltip: 'Average latency for sign up operations by provider.',
|
|
attributes: [
|
|
{
|
|
attribute: 'SignUpLatency',
|
|
provider: 'logs',
|
|
label: 'Email',
|
|
providerType: 'email',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignUpLatency',
|
|
provider: 'logs',
|
|
label: 'Google',
|
|
providerType: 'google',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignUpLatency',
|
|
provider: 'logs',
|
|
label: 'GitHub',
|
|
providerType: 'github',
|
|
enabled: true,
|
|
},
|
|
{
|
|
attribute: 'SignUpLatency',
|
|
provider: 'logs',
|
|
label: 'Apple',
|
|
providerType: 'apple',
|
|
enabled: true,
|
|
},
|
|
],
|
|
},
|
|
]
|