mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
refactor(core): Add binary data S3 to telemetry (#7412)
https://n8nio.slack.com/archives/C04B1GZ4T0U/p1697033523039729
This commit is contained in:
parent
c3f0be809f
commit
c6ee1e30c0
|
@ -348,6 +348,7 @@ export interface IDiagnosticInfo {
|
|||
smtp_set_up: boolean;
|
||||
ldap_allowed: boolean;
|
||||
saml_enabled: boolean;
|
||||
binary_data_s3: boolean;
|
||||
licensePlanName?: string;
|
||||
licenseTenantId?: number;
|
||||
}
|
||||
|
|
|
@ -191,6 +191,10 @@ export class License {
|
|||
return this.isFeatureEnabled(LICENSE_FEATURES.DEBUG_IN_EDITOR);
|
||||
}
|
||||
|
||||
isBinaryDataS3Licensed() {
|
||||
return this.isFeatureEnabled(LICENSE_FEATURES.BINARY_DATA_S3);
|
||||
}
|
||||
|
||||
isVariablesEnabled() {
|
||||
return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES);
|
||||
}
|
||||
|
|
|
@ -219,6 +219,11 @@ export class Server extends AbstractServer {
|
|||
|
||||
const cpus = os.cpus();
|
||||
const binaryDataConfig = config.getEnv('binaryDataManager');
|
||||
|
||||
const isS3Selected = config.getEnv('binaryDataManager.mode') === 's3';
|
||||
const isS3Available = config.getEnv('binaryDataManager.availableModes').includes('s3');
|
||||
const isS3Licensed = Container.get(License).isBinaryDataS3Licensed();
|
||||
|
||||
const diagnosticInfo: IDiagnosticInfo = {
|
||||
databaseType: config.getEnv('database.type'),
|
||||
disableProductionWebhooksOnMainProcess: config.getEnv(
|
||||
|
@ -257,6 +262,7 @@ export class Server extends AbstractServer {
|
|||
smtp_set_up: config.getEnv('userManagement.emails.mode') === 'smtp',
|
||||
ldap_allowed: isLdapCurrentAuthenticationMethod(),
|
||||
saml_enabled: isSamlCurrentAuthenticationMethod(),
|
||||
binary_data_s3: isS3Available && isS3Selected && isS3Licensed,
|
||||
licensePlanName: Container.get(License).getPlanName(),
|
||||
licenseTenantId: config.getEnv('license.tenantId'),
|
||||
};
|
||||
|
|
|
@ -155,6 +155,7 @@ export class FrontendService {
|
|||
externalSecrets: false,
|
||||
showNonProdBanner: false,
|
||||
debugInEditor: false,
|
||||
binaryDataS3: false,
|
||||
workflowHistory: false,
|
||||
},
|
||||
mfa: {
|
||||
|
@ -224,6 +225,10 @@ export class FrontendService {
|
|||
|
||||
this.settings.banners.dismissed = dismissedBanners;
|
||||
|
||||
const isS3Selected = config.getEnv('binaryDataManager.mode') === 's3';
|
||||
const isS3Available = config.getEnv('binaryDataManager.availableModes').includes('s3');
|
||||
const isS3Licensed = this.license.isBinaryDataS3Licensed();
|
||||
|
||||
// refresh enterprise status
|
||||
Object.assign(this.settings.enterprise, {
|
||||
sharing: this.license.isSharingEnabled(),
|
||||
|
@ -236,6 +241,7 @@ export class FrontendService {
|
|||
externalSecrets: this.license.isExternalSecretsEnabled(),
|
||||
showNonProdBanner: this.license.isFeatureEnabled(LICENSE_FEATURES.SHOW_NON_PROD_BANNER),
|
||||
debugInEditor: this.license.isDebugInEditorLicensed(),
|
||||
binaryDataS3: isS3Available && isS3Selected && isS3Licensed,
|
||||
workflowHistory:
|
||||
this.license.isWorkflowHistoryLicensed() && config.getEnv('workflowHistory.enabled'),
|
||||
});
|
||||
|
|
|
@ -2300,6 +2300,7 @@ export interface IN8nUISettings {
|
|||
externalSecrets: boolean;
|
||||
showNonProdBanner: boolean;
|
||||
debugInEditor: boolean;
|
||||
binaryDataS3: boolean;
|
||||
workflowHistory: boolean;
|
||||
};
|
||||
hideUsagePage: boolean;
|
||||
|
|
Loading…
Reference in a new issue