Skip to content
Snippets Groups Projects
Unverified Commit 831ff3eb authored by Diego Sampaio's avatar Diego Sampaio Committed by GitHub
Browse files

[NEW] Add enterprise data to statistics (#19363)

parent 25c3457c
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ import { getStatistics as federationGetStatistics } from '../../../federation/se ...@@ -23,6 +23,7 @@ import { getStatistics as federationGetStatistics } from '../../../federation/se
import { NotificationQueue } from '../../../models/server/raw'; import { NotificationQueue } from '../../../models/server/raw';
import { readSecondaryPreferred } from '../../../../server/database/readSecondaryPreferred'; import { readSecondaryPreferred } from '../../../../server/database/readSecondaryPreferred';
import { getAppsStatistics } from './getAppsStatistics'; import { getAppsStatistics } from './getAppsStatistics';
import { getStatistics as getEnterpriseStatistics } from '../../../../ee/app/license/server';
const wizardFields = [ const wizardFields = [
'Organization_Type', 'Organization_Type',
...@@ -177,6 +178,8 @@ export const statistics = { ...@@ -177,6 +178,8 @@ export const statistics = {
statistics.pushQueue = Promise.await(NotificationQueue.col.estimatedDocumentCount()); statistics.pushQueue = Promise.await(NotificationQueue.col.estimatedDocumentCount());
statistics.enterprise = getEnterpriseStatistics();
return statistics; return statistics;
}, },
save() { save() {
......
import { getModules, getTags } from './license';
type ENTERPRISE_STATISTICS = {
modules: string[];
tags: string[];
}
export function getStatistics(): ENTERPRISE_STATISTICS {
const modules = getModules();
const tags = getTags().map(({ name }) => name);
return {
modules,
tags,
};
}
...@@ -2,4 +2,11 @@ import './settings'; ...@@ -2,4 +2,11 @@ import './settings';
import './methods'; import './methods';
import './startup'; import './startup';
export { onLicense, overwriteClassOnLicense, isEnterprise, getMaxGuestUsers } from './license'; export {
onLicense,
overwriteClassOnLicense,
isEnterprise,
getMaxGuestUsers,
} from './license';
export { getStatistics } from './getStatistics';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment